diff --git a/go.mod b/go.mod index e2974331f..5b553a588 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/hashicorp/vault-plugin-auth-centrify v0.5.5 github.com/hashicorp/vault-plugin-auth-cf v0.5.4 github.com/hashicorp/vault-plugin-auth-gcp v0.7.0 - github.com/hashicorp/vault-plugin-auth-jwt v0.7.0 + github.com/hashicorp/vault-plugin-auth-jwt v0.7.1 github.com/hashicorp/vault-plugin-auth-kerberos v0.1.6 github.com/hashicorp/vault-plugin-auth-kubernetes v0.7.0 github.com/hashicorp/vault-plugin-auth-oci v0.5.5 @@ -149,7 +149,7 @@ require ( golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 golang.org/x/tools v0.0.0-20200416214402-fc959738d646 - google.golang.org/api v0.24.0 + google.golang.org/api v0.29.0 google.golang.org/grpc v1.29.1 google.golang.org/protobuf v1.24.0 gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce diff --git a/go.sum b/go.sum index 75600d0d8..5397e0089 100644 --- a/go.sum +++ b/go.sum @@ -525,8 +525,8 @@ github.com/hashicorp/vault-plugin-auth-cf v0.5.4/go.mod h1:idkFYHc6ske2BE7fe00Sp github.com/hashicorp/vault-plugin-auth-gcp v0.5.1/go.mod h1:eLj92eX8MPI4vY1jaazVLF2sVbSAJ3LRHLRhF/pUmlI= github.com/hashicorp/vault-plugin-auth-gcp v0.7.0 h1:38xERGtaK55lx5QOxBZP3i6aJZ/UvdfxVJlTai2FlE8= github.com/hashicorp/vault-plugin-auth-gcp v0.7.0/go.mod h1:sHDguHmyGScoalGLEjuxvDCrMPVlw2c3f+ieeiHcv6w= -github.com/hashicorp/vault-plugin-auth-jwt v0.7.0 h1:lHg02BB7IpUQbJStAPmGyS3KnZJC7PSEvc5LOZNPjHM= -github.com/hashicorp/vault-plugin-auth-jwt v0.7.0/go.mod h1:ZJJy4b0H3N7CSoJ6iPlWhV9EjHLSoB5NhP06CNm6ImU= +github.com/hashicorp/vault-plugin-auth-jwt v0.7.1 h1:6nuMtCs/c/rphMv05Z7Y4Nrt6Ae+AZjGb7yYdbJXIe8= +github.com/hashicorp/vault-plugin-auth-jwt v0.7.1/go.mod h1:pyR4z5f2Vuz9TXucuN0rivUJTtSdlOtDdZ16IqBjZVo= github.com/hashicorp/vault-plugin-auth-kerberos v0.1.6 h1:l5wu8J7aiQBLsTtkKhf1QQjGoeVjcfcput+uJ/pu2MM= github.com/hashicorp/vault-plugin-auth-kerberos v0.1.6/go.mod h1:IM/n7LY1rIM4MVzOfSH6cRmY/C2rGkrjGrEr0B/yO9c= github.com/hashicorp/vault-plugin-auth-kubernetes v0.7.0 h1:tt/kHMFB1qjp2b2ZRSI1KbH2CRV91VHghgr+5x9grgM= @@ -1165,6 +1165,8 @@ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.21.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0 h1:cG03eaksBzhfSIk7JRGctfp3lanklcOM/mTGvow7BbQ= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.mod b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.mod index ca956323a..2a51c9a23 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.mod +++ b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.mod @@ -14,15 +14,14 @@ require ( github.com/hashicorp/vault/api v1.0.5-0.20200215224050-f6547fa8e820 github.com/hashicorp/vault/sdk v0.1.14-0.20200215224050-f6547fa8e820 github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect + github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/pointerstructure v1.0.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect github.com/ryanuber/go-glob v1.0.0 - github.com/stretchr/testify v1.3.0 + github.com/stretchr/testify v1.4.0 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/sync v0.0.0-20190423024810-112230192c58 - golang.org/x/text v0.3.2 // indirect - google.golang.org/appengine v1.5.0 // indirect - google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 // indirect + golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a + google.golang.org/api v0.29.0 gopkg.in/square/go-jose.v2 v2.4.1 ) diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.sum b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.sum index 562126f7a..69165f685 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.sum +++ b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/go.sum @@ -1,6 +1,30 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= 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.56.0 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +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/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/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= +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/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= @@ -8,31 +32,71 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +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/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= 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/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/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/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +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/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 h1:28FVBuwkwowZMjbA7M0wXsI6t3PYulRTMio3SO+eKCM= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= 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 h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +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.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= 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.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +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/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 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -78,7 +142,16 @@ github.com/hashicorp/vault/sdk v0.1.14-0.20200215224050-f6547fa8e820/go.mod h1:W github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -115,8 +188,10 @@ github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAm github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= @@ -124,64 +199,227 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/yuin/goldmark v1.1.25/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 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 h1:O5YqonU5IWby+w98jVUG9h7zlCWCcH4RHyPVReBmhzk= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +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 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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/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-20181201002055-351d144fa1fc/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-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/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-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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 h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-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 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= 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 h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/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-20190222072716-a9d3bda3a223/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-20190403152447-81d4e9dc473e/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-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU= golang.org/x/sys v0.0.0-20191008105621-543471e840be/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-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/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 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +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-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/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.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= 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 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/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 h1:iKtrH9Y8mcbADOP0YFaEMth7OfuHY9xHOwNj4znpM1A= 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-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= 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.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +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 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +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/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +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= +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= diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/path_login.go b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/path_login.go index 3d1007256..7541dfcd5 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/path_login.go +++ b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/path_login.go @@ -318,6 +318,11 @@ func (b *jwtAuthBackend) createIdentity(allClaims map[string]interface{}, role * return nil, nil, fmt.Errorf("claim %q could not be converted to string", role.UserClaim) } + err := b.fetchUserInfo(allClaims, role) + if err != nil { + return nil, nil, err + } + metadata, err := extractMetadata(b.Logger(), allClaims, role.ClaimMappings) if err != nil { return nil, nil, err @@ -360,6 +365,22 @@ func (b *jwtAuthBackend) createIdentity(allClaims map[string]interface{}, role * return alias, groupAliases, nil } +// Checks if there's a custom provider_config and calls FetchUserInfo() if implemented. +func (b *jwtAuthBackend) fetchUserInfo(allClaims map[string]interface{}, role *jwtRole) error { + pConfig, err := NewProviderConfig(b.cachedConfig, ProviderMap()) + if err != nil { + return fmt.Errorf("failed to load custom provider config: %s", err) + } + // Fetch user info from custom provider if it's implemented + if pConfig != nil { + if uif, ok := pConfig.(UserInfoFetcher); ok { + return uif.FetchUserInfo(b, allClaims, role) + } + } + + return nil +} + // Checks if there's a custom provider_config and calls FetchGroups() if implemented func (b *jwtAuthBackend) fetchGroups(allClaims map[string]interface{}, role *jwtRole) (interface{}, error) { pConfig, err := NewProviderConfig(b.cachedConfig, ProviderMap()) diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_config.go b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_config.go index 97c36aa8c..c3f9542c1 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_config.go +++ b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_config.go @@ -11,7 +11,8 @@ import ( // ProviderMap returns a map of provider names to custom types func ProviderMap() map[string]CustomProvider { return map[string]CustomProvider{ - "azure": &AzureProvider{}, + "azure": &AzureProvider{}, + "gsuite": &GSuiteProvider{}, } } @@ -48,6 +49,11 @@ func NewProviderConfig(jc *jwtConfig, providerMap map[string]CustomProvider) (Cu return newCustomProvider, nil } +// UserInfoFetcher - Optional support for custom user info handling +type UserInfoFetcher interface { + FetchUserInfo(*jwtAuthBackend, map[string]interface{}, *jwtRole) error +} + // GroupsFetcher - Optional support for custom groups handling type GroupsFetcher interface { // FetchGroups queries for groups claims during login diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_gsuite.go b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_gsuite.go new file mode 100644 index 000000000..558076274 --- /dev/null +++ b/vendor/github.com/hashicorp/vault-plugin-auth-jwt/provider_gsuite.go @@ -0,0 +1,220 @@ +package jwtauth + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io/ioutil" + + "github.com/mitchellh/mapstructure" + "golang.org/x/oauth2/google" + "golang.org/x/oauth2/jwt" + admin "google.golang.org/api/admin/directory/v1" + "google.golang.org/api/option" +) + +// GSuiteProvider provides G Suite-specific configuration and behavior. +type GSuiteProvider struct { + config GSuiteProviderConfig // Configuration for the provider + jwtConfig *jwt.Config // Google JWT configuration + adminSvc *admin.Service // Google admin service +} + +// GSuiteProviderConfig represents the configuration for a GSuiteProvider. +type GSuiteProviderConfig struct { + // Path to a Google service account key file. Required. + ServiceAccountFilePath string `mapstructure:"gsuite_service_account"` + + // Email address of a G Suite admin to impersonate. Required. + AdminImpersonateEmail string `mapstructure:"gsuite_admin_impersonate"` + + // If set to true, groups will be fetched from G Suite. + FetchGroups bool `mapstructure:"fetch_groups"` + + // If set to true, user info will be fetched from G Suite using UserCustomSchemas. + FetchUserInfo bool `mapstructure:"fetch_user_info"` + + // Group membership recursion max depth (0 = do not recurse). + GroupsRecurseMaxDepth int `mapstructure:"groups_recurse_max_depth"` + + // Comma-separated list of G Suite custom schemas to fetch as claims. + UserCustomSchemas string `mapstructure:"user_custom_schemas"` + + // JSON contents of a Google service account key file. + serviceAccountKeyJSON []byte +} + +// Initialize initializes the GSuiteProvider by validating and creating configuration. +func (g *GSuiteProvider) Initialize(jc *jwtConfig) error { + // Decode the provider config + var config GSuiteProviderConfig + if err := mapstructure.Decode(jc.ProviderConfig, &config); err != nil { + return err + } + + // Read the Google service account key file + keyJSON, err := ioutil.ReadFile(config.ServiceAccountFilePath) + if err != nil { + return err + } + config.serviceAccountKeyJSON = keyJSON + + return g.initialize(config) +} + +func (g *GSuiteProvider) initialize(config GSuiteProviderConfig) error { + var err error + + // Validate configuration + if config.ServiceAccountFilePath == "" { + return errors.New("'gsuite_service_account' must be set to the file path for a " + + "service account key") + } + if config.AdminImpersonateEmail == "" { + return errors.New("'gsuite_admin_impersonate' must be set to an email address of a " + + "G Suite user with 'Read' permission to access the G Suite Admin User and Group APIs") + } + if config.GroupsRecurseMaxDepth < 0 { + return errors.New("'gsuite_recurse_max_depth' must be a positive integer") + } + + // Create the google JWT config from the service account key file + if g.jwtConfig, err = google.JWTConfigFromJSON(config.serviceAccountKeyJSON, + admin.AdminDirectoryGroupReadonlyScope, admin.AdminDirectoryUserReadonlyScope); err != nil { + return err + } + + // Set the subject to impersonate and config + g.jwtConfig.Subject = config.AdminImpersonateEmail + g.config = config + return nil +} + +// SensitiveKeys returns keys that should be redacted when reading the config of this provider +func (g *GSuiteProvider) SensitiveKeys() []string { + return []string{} +} + +// FetchGroups fetches and returns groups from G Suite. +func (g *GSuiteProvider) FetchGroups(b *jwtAuthBackend, allClaims map[string]interface{}, role *jwtRole) (interface{}, error) { + if !g.config.FetchGroups { + return nil, nil + } + + userName, err := g.getUserClaim(b, allClaims, role) + if err != nil { + return nil, err + } + + // Set context and create a new admin service for requests to Google admin APIs + g.adminSvc, err = admin.NewService(b.providerCtx, option.WithHTTPClient(g.jwtConfig.Client(b.providerCtx))) + if err != nil { + return nil, err + } + + // Get the G Suite groups + userGroupsMap := make(map[string]bool) + if err := g.search(b.providerCtx, userGroupsMap, userName, g.config.GroupsRecurseMaxDepth); err != nil { + return nil, err + } + + // Convert set of groups to list + var userGroups = make([]interface{}, 0, len(userGroupsMap)) + for email := range userGroupsMap { + userGroups = append(userGroups, email) + } + + b.Logger().Debug("fetched G Suite groups", "groups", userGroups) + return userGroups, nil +} + +// search recursively searches for G Suite groups based on a configured depth for this provider. +func (g *GSuiteProvider) search(ctx context.Context, visited map[string]bool, userName string, depth int) error { + call := g.adminSvc.Groups.List().UserKey(userName).Fields("nextPageToken", "groups(email)") + if err := call.Pages(ctx, func(groups *admin.Groups) error { + var newGroups []string + for _, group := range groups.Groups { + if _, ok := visited[group.Email]; ok { + continue + } + visited[group.Email] = true + newGroups = append(newGroups, group.Email) + } + // Only recursively search for new groups that haven't been seen + if depth > 0 { + for _, email := range newGroups { + if err := g.search(ctx, visited, email, depth-1); err != nil { + return err + } + } + } + return nil + }); err != nil { + return err + } + return nil +} + +// FetchUserInfo fetches additional user information from G Suite using custom schemas. +func (g *GSuiteProvider) FetchUserInfo(b *jwtAuthBackend, allClaims map[string]interface{}, role *jwtRole) error { + if !g.config.FetchUserInfo || g.config.UserCustomSchemas == "" { + if g.config.UserCustomSchemas != "" { + b.Logger().Warn(fmt.Sprintf("must set 'fetch_user_info=true' to fetch 'user_custom_schemas': %s", g.config.UserCustomSchemas)) + } + + return nil + } + + userName, err := g.getUserClaim(b, allClaims, role) + if err != nil { + return err + } + + // Set context and create a new admin service for requests to Google admin APIs + g.adminSvc, err = admin.NewService(b.providerCtx, option.WithHTTPClient(g.jwtConfig.Client(b.providerCtx))) + if err != nil { + return err + } + + return g.fillCustomSchemas(b.providerCtx, userName, allClaims) +} + +// fillCustomSchemas fetches G Suite user information associated with the custom schemas +// configured for this provider. It inserts the schema -> value pairs into the passed +// allClaims so that the values can be used for claim mapping to token and identity metadata. +func (g *GSuiteProvider) fillCustomSchemas(ctx context.Context, userName string, allClaims map[string]interface{}) error { + userResponse, err := g.adminSvc.Users.Get(userName).Context(ctx).Projection("custom"). + CustomFieldMask(g.config.UserCustomSchemas).Fields("customSchemas").Do() + if err != nil { + return err + } + + for schema, rawValue := range userResponse.CustomSchemas { + // note: metadata extraction via claim_mappings only supports strings + // as values, but filtering happens later so we must use interface{} + var value map[string]interface{} + if err := json.Unmarshal(rawValue, &value); err != nil { + return err + } + + allClaims[schema] = value + } + + return nil +} + +// getUserClaim returns the user claim value configured in the passed role. +// If the user claim is not found or is not a string, an error is returned. +func (g *GSuiteProvider) getUserClaim(b *jwtAuthBackend, allClaims map[string]interface{}, role *jwtRole) (string, error) { + userClaimRaw := getClaim(b.Logger(), allClaims, role.UserClaim) + if userClaimRaw == nil { + return "", fmt.Errorf("unable to locate %q in claims", role.UserClaim) + } + userClaim, ok := userClaimRaw.(string) + if !ok { + return "", fmt.Errorf("claim %q could not be converted to string", role.UserClaim) + } + + return userClaim, nil +} diff --git a/vendor/google.golang.org/api/admin/directory/v1/admin-api.json b/vendor/google.golang.org/api/admin/directory/v1/admin-api.json new file mode 100644 index 000000000..b016921cd --- /dev/null +++ b/vendor/google.golang.org/api/admin/directory/v1/admin-api.json @@ -0,0 +1,6939 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/admin.directory.customer": { + "description": "View and manage customer related information" + }, + "https://www.googleapis.com/auth/admin.directory.customer.readonly": { + "description": "View customer related information" + }, + "https://www.googleapis.com/auth/admin.directory.device.chromeos": { + "description": "View and manage your Chrome OS devices' metadata" + }, + "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly": { + "description": "View your Chrome OS devices' metadata" + }, + "https://www.googleapis.com/auth/admin.directory.device.mobile": { + "description": "View and manage your mobile devices' metadata" + }, + "https://www.googleapis.com/auth/admin.directory.device.mobile.action": { + "description": "Manage your mobile devices by performing administrative tasks" + }, + "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly": { + "description": "View your mobile devices' metadata" + }, + "https://www.googleapis.com/auth/admin.directory.domain": { + "description": "View and manage the provisioning of domains for your customers" + }, + "https://www.googleapis.com/auth/admin.directory.domain.readonly": { + "description": "View domains related to your customers" + }, + "https://www.googleapis.com/auth/admin.directory.group": { + "description": "View and manage the provisioning of groups on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.group.member": { + "description": "View and manage group subscriptions on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.group.member.readonly": { + "description": "View group subscriptions on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.group.readonly": { + "description": "View groups on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.notifications": { + "description": "View and manage notifications received on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.orgunit": { + "description": "View and manage organization units on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.orgunit.readonly": { + "description": "View organization units on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.resource.calendar": { + "description": "View and manage the provisioning of calendar resources on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly": { + "description": "View calendar resources on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.rolemanagement": { + "description": "Manage delegated admin roles for your domain" + }, + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly": { + "description": "View delegated admin roles for your domain" + }, + "https://www.googleapis.com/auth/admin.directory.user": { + "description": "View and manage the provisioning of users on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.user.alias": { + "description": "View and manage user aliases on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.user.alias.readonly": { + "description": "View user aliases on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.user.readonly": { + "description": "View users on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.user.security": { + "description": "Manage data access permissions for users on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.userschema": { + "description": "View and manage the provisioning of user schemas on your domain" + }, + "https://www.googleapis.com/auth/admin.directory.userschema.readonly": { + "description": "View user schemas on your domain" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "basePath": "/admin/directory/v1/", + "baseUrl": "https://www.googleapis.com/admin/directory/v1/", + "batchPath": "batch/admin/directory_v1", + "canonicalName": "directory", + "description": "Manages enterprise resources such as users and groups, administrative notifications, security features, and more.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/admin-sdk/directory/", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/6ejmeqs8pIMfxzC9gWby_uKyvCk\"", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "id": "admin:directory_v1", + "kind": "discovery#restDescription", + "name": "admin", + "ownerDomain": "google.com", + "ownerName": "Google", + "packagePath": "admin", + "parameters": { + "alt": { + "default": "json", + "description": "Data format for the response.", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "userIp": { + "description": "Deprecated. Please use quotaUser instead.", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "asps": { + "methods": { + "delete": { + "description": "Delete an ASP issued by a user.", + "httpMethod": "DELETE", + "id": "directory.asps.delete", + "parameterOrder": [ + "userKey", + "codeId" + ], + "parameters": { + "codeId": { + "description": "The unique ID of the ASP to be deleted.", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + }, + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/asps/{codeId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + }, + "get": { + "description": "Get information about an ASP issued by a user.", + "httpMethod": "GET", + "id": "directory.asps.get", + "parameterOrder": [ + "userKey", + "codeId" + ], + "parameters": { + "codeId": { + "description": "The unique ID of the ASP.", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + }, + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/asps/{codeId}", + "response": { + "$ref": "Asp" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + }, + "list": { + "description": "List the ASPs issued by a user.", + "httpMethod": "GET", + "id": "directory.asps.list", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/asps", + "response": { + "$ref": "Asps" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + } + } + }, + "channels": { + "methods": { + "stop": { + "description": "Stop watching resources through this channel", + "httpMethod": "POST", + "id": "admin.channels.stop", + "path": "/admin/directory_v1/channels/stop", + "request": { + "$ref": "Channel", + "parameterName": "resource" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.alias", + "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + "https://www.googleapis.com/auth/admin.directory.user.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "chromeosdevices": { + "methods": { + "action": { + "description": "Take action on Chrome OS Device", + "httpMethod": "POST", + "id": "directory.chromeosdevices.action", + "parameterOrder": [ + "customerId", + "resourceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "resourceId": { + "description": "Immutable ID of Chrome OS Device", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/devices/chromeos/{resourceId}/action", + "request": { + "$ref": "ChromeOsDeviceAction" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.chromeos" + ] + }, + "get": { + "description": "Retrieve Chrome OS Device", + "httpMethod": "GET", + "id": "directory.chromeosdevices.get", + "parameterOrder": [ + "customerId", + "deviceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "deviceId": { + "description": "Immutable ID of Chrome OS Device", + "location": "path", + "required": true, + "type": "string" + }, + "projection": { + "description": "Restrict information returned to a set of selected fields.", + "enum": [ + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + "Includes all metadata fields" + ], + "location": "query", + "type": "string" + } + }, + "path": "customer/{customerId}/devices/chromeos/{deviceId}", + "response": { + "$ref": "ChromeOsDevice" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.chromeos", + "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly" + ] + }, + "list": { + "description": "Retrieve all Chrome OS Devices of a customer (paginated)", + "httpMethod": "GET", + "id": "directory.chromeosdevices.list", + "parameterOrder": [ + "customerId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "default": "100", + "description": "Maximum number of results to return. Max allowed value is 200.", + "format": "int32", + "location": "query", + "minimum": "1", + "type": "integer" + }, + "orderBy": { + "description": "Column to use for sorting results", + "enum": [ + "annotatedLocation", + "annotatedUser", + "lastSync", + "notes", + "serialNumber", + "status", + "supportEndDate" + ], + "enumDescriptions": [ + "Chromebook location as annotated by the administrator.", + "Chromebook user as annotated by administrator.", + "Chromebook last sync.", + "Chromebook notes as annotated by the administrator.", + "Chromebook Serial Number.", + "Chromebook status.", + "Chromebook support end date." + ], + "location": "query", + "type": "string" + }, + "orgUnitPath": { + "description": "Full path of the organizational unit or its ID", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Token to specify next page in the list", + "location": "query", + "type": "string" + }, + "projection": { + "description": "Restrict information returned to a set of selected fields.", + "enum": [ + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + "Includes all metadata fields" + ], + "location": "query", + "type": "string" + }, + "query": { + "description": "Search string in the format provided by this Help Center article.", + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", + "enum": [ + "ASCENDING", + "DESCENDING" + ], + "enumDescriptions": [ + "Ascending order.", + "Descending order." + ], + "location": "query", + "type": "string" + } + }, + "path": "customer/{customerId}/devices/chromeos", + "response": { + "$ref": "ChromeOsDevices" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.chromeos", + "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly" + ] + }, + "moveDevicesToOu": { + "description": "Move or insert multiple Chrome OS Devices to organizational unit", + "httpMethod": "POST", + "id": "directory.chromeosdevices.moveDevicesToOu", + "parameterOrder": [ + "customerId", + "orgUnitPath" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "orgUnitPath": { + "description": "Full path of the target organizational unit or its ID", + "location": "query", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/devices/chromeos/moveDevicesToOu", + "request": { + "$ref": "ChromeOsMoveDevicesToOu" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.chromeos" + ] + }, + "patch": { + "description": "Update Chrome OS Device. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.chromeosdevices.patch", + "parameterOrder": [ + "customerId", + "deviceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "deviceId": { + "description": "Immutable ID of Chrome OS Device", + "location": "path", + "required": true, + "type": "string" + }, + "projection": { + "description": "Restrict information returned to a set of selected fields.", + "enum": [ + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + "Includes all metadata fields" + ], + "location": "query", + "type": "string" + } + }, + "path": "customer/{customerId}/devices/chromeos/{deviceId}", + "request": { + "$ref": "ChromeOsDevice" + }, + "response": { + "$ref": "ChromeOsDevice" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.chromeos" + ] + }, + "update": { + "description": "Update Chrome OS Device", + "httpMethod": "PUT", + "id": "directory.chromeosdevices.update", + "parameterOrder": [ + "customerId", + "deviceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "deviceId": { + "description": "Immutable ID of Chrome OS Device", + "location": "path", + "required": true, + "type": "string" + }, + "projection": { + "description": "Restrict information returned to a set of selected fields.", + "enum": [ + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + "Includes all metadata fields" + ], + "location": "query", + "type": "string" + } + }, + "path": "customer/{customerId}/devices/chromeos/{deviceId}", + "request": { + "$ref": "ChromeOsDevice" + }, + "response": { + "$ref": "ChromeOsDevice" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.chromeos" + ] + } + } + }, + "customers": { + "methods": { + "get": { + "description": "Retrieves a customer.", + "httpMethod": "GET", + "id": "directory.customers.get", + "parameterOrder": [ + "customerKey" + ], + "parameters": { + "customerKey": { + "description": "Id of the customer to be retrieved", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customers/{customerKey}", + "response": { + "$ref": "Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.customer", + "https://www.googleapis.com/auth/admin.directory.customer.readonly" + ] + }, + "patch": { + "description": "Updates a customer. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.customers.patch", + "parameterOrder": [ + "customerKey" + ], + "parameters": { + "customerKey": { + "description": "Id of the customer to be updated", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customers/{customerKey}", + "request": { + "$ref": "Customer" + }, + "response": { + "$ref": "Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.customer" + ] + }, + "update": { + "description": "Updates a customer.", + "httpMethod": "PUT", + "id": "directory.customers.update", + "parameterOrder": [ + "customerKey" + ], + "parameters": { + "customerKey": { + "description": "Id of the customer to be updated", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customers/{customerKey}", + "request": { + "$ref": "Customer" + }, + "response": { + "$ref": "Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.customer" + ] + } + } + }, + "domainAliases": { + "methods": { + "delete": { + "description": "Deletes a Domain Alias of the customer.", + "httpMethod": "DELETE", + "id": "directory.domainAliases.delete", + "parameterOrder": [ + "customer", + "domainAliasName" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "domainAliasName": { + "description": "Name of domain alias to be retrieved.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domainaliases/{domainAliasName}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain" + ] + }, + "get": { + "description": "Retrieves a domain alias of the customer.", + "httpMethod": "GET", + "id": "directory.domainAliases.get", + "parameterOrder": [ + "customer", + "domainAliasName" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "domainAliasName": { + "description": "Name of domain alias to be retrieved.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domainaliases/{domainAliasName}", + "response": { + "$ref": "DomainAlias" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain", + "https://www.googleapis.com/auth/admin.directory.domain.readonly" + ] + }, + "insert": { + "description": "Inserts a Domain alias of the customer.", + "httpMethod": "POST", + "id": "directory.domainAliases.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domainaliases", + "request": { + "$ref": "DomainAlias" + }, + "response": { + "$ref": "DomainAlias" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain" + ] + }, + "list": { + "description": "Lists the domain aliases of the customer.", + "httpMethod": "GET", + "id": "directory.domainAliases.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "parentDomainName": { + "description": "Name of the parent domain for which domain aliases are to be fetched.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/domainaliases", + "response": { + "$ref": "DomainAliases" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain", + "https://www.googleapis.com/auth/admin.directory.domain.readonly" + ] + } + } + }, + "domains": { + "methods": { + "delete": { + "description": "Deletes a domain of the customer.", + "httpMethod": "DELETE", + "id": "directory.domains.delete", + "parameterOrder": [ + "customer", + "domainName" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "domainName": { + "description": "Name of domain to be deleted", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domains/{domainName}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain" + ] + }, + "get": { + "description": "Retrieves a domain of the customer.", + "httpMethod": "GET", + "id": "directory.domains.get", + "parameterOrder": [ + "customer", + "domainName" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "domainName": { + "description": "Name of domain to be retrieved", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domains/{domainName}", + "response": { + "$ref": "Domains" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain", + "https://www.googleapis.com/auth/admin.directory.domain.readonly" + ] + }, + "insert": { + "description": "Inserts a domain of the customer.", + "httpMethod": "POST", + "id": "directory.domains.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domains", + "request": { + "$ref": "Domains" + }, + "response": { + "$ref": "Domains" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain" + ] + }, + "list": { + "description": "Lists the domains of the customer.", + "httpMethod": "GET", + "id": "directory.domains.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/domains", + "response": { + "$ref": "Domains2" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.domain", + "https://www.googleapis.com/auth/admin.directory.domain.readonly" + ] + } + } + }, + "groups": { + "methods": { + "delete": { + "description": "Delete Group", + "httpMethod": "DELETE", + "id": "directory.groups.delete", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group" + ] + }, + "get": { + "description": "Retrieve Group", + "httpMethod": "GET", + "id": "directory.groups.get", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}", + "response": { + "$ref": "Group" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.readonly" + ] + }, + "insert": { + "description": "Create Group", + "httpMethod": "POST", + "id": "directory.groups.insert", + "path": "groups", + "request": { + "$ref": "Group" + }, + "response": { + "$ref": "Group" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group" + ] + }, + "list": { + "description": "Retrieve all groups of a domain or of a user given a userKey (paginated)", + "httpMethod": "GET", + "id": "directory.groups.list", + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.", + "location": "query", + "type": "string" + }, + "domain": { + "description": "Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "200", + "description": "Maximum number of results to return. Max allowed value is 200.", + "format": "int32", + "location": "query", + "minimum": "1", + "type": "integer" + }, + "orderBy": { + "description": "Column to use for sorting results", + "enum": [ + "email" + ], + "enumDescriptions": [ + "Email of the group." + ], + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Token to specify next page in the list", + "location": "query", + "type": "string" + }, + "query": { + "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups", + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", + "enum": [ + "ASCENDING", + "DESCENDING" + ], + "enumDescriptions": [ + "Ascending order.", + "Descending order." + ], + "location": "query", + "type": "string" + }, + "userKey": { + "description": "Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.", + "location": "query", + "type": "string" + } + }, + "path": "groups", + "response": { + "$ref": "Groups" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.readonly" + ] + }, + "patch": { + "description": "Update Group. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.groups.patch", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}", + "request": { + "$ref": "Group" + }, + "response": { + "$ref": "Group" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group" + ] + }, + "update": { + "description": "Update Group", + "httpMethod": "PUT", + "id": "directory.groups.update", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}", + "request": { + "$ref": "Group" + }, + "response": { + "$ref": "Group" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group" + ] + } + }, + "resources": { + "aliases": { + "methods": { + "delete": { + "description": "Remove a alias for the group", + "httpMethod": "DELETE", + "id": "directory.groups.aliases.delete", + "parameterOrder": [ + "groupKey", + "alias" + ], + "parameters": { + "alias": { + "description": "The alias to be removed", + "location": "path", + "required": true, + "type": "string" + }, + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/aliases/{alias}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group" + ] + }, + "insert": { + "description": "Add a alias for the group", + "httpMethod": "POST", + "id": "directory.groups.aliases.insert", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/aliases", + "request": { + "$ref": "Alias" + }, + "response": { + "$ref": "Alias" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group" + ] + }, + "list": { + "description": "List all aliases for a group", + "httpMethod": "GET", + "id": "directory.groups.aliases.list", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/aliases", + "response": { + "$ref": "Aliases" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.readonly" + ], + "supportsSubscription": true + } + } + } + } + }, + "members": { + "methods": { + "delete": { + "description": "Remove membership.", + "httpMethod": "DELETE", + "id": "directory.members.delete", + "parameterOrder": [ + "groupKey", + "memberKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + }, + "memberKey": { + "description": "Email or immutable ID of the member", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/members/{memberKey}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member" + ] + }, + "get": { + "description": "Retrieve Group Member", + "httpMethod": "GET", + "id": "directory.members.get", + "parameterOrder": [ + "groupKey", + "memberKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + }, + "memberKey": { + "description": "Email or immutable ID of the member", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/members/{memberKey}", + "response": { + "$ref": "Member" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member", + "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + "https://www.googleapis.com/auth/admin.directory.group.readonly" + ] + }, + "hasMember": { + "description": "Checks whether the given user is a member of the group. Membership can be direct or nested.", + "httpMethod": "GET", + "id": "directory.members.hasMember", + "parameterOrder": [ + "groupKey", + "memberKey" + ], + "parameters": { + "groupKey": { + "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.", + "location": "path", + "required": true, + "type": "string" + }, + "memberKey": { + "description": "Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/hasMember/{memberKey}", + "response": { + "$ref": "MembersHasMember" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member", + "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + "https://www.googleapis.com/auth/admin.directory.group.readonly" + ] + }, + "insert": { + "description": "Add user to the specified group.", + "httpMethod": "POST", + "id": "directory.members.insert", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/members", + "request": { + "$ref": "Member" + }, + "response": { + "$ref": "Member" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member" + ] + }, + "list": { + "description": "Retrieve all members in a group (paginated)", + "httpMethod": "GET", + "id": "directory.members.list", + "parameterOrder": [ + "groupKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group", + "location": "path", + "required": true, + "type": "string" + }, + "includeDerivedMembership": { + "description": "Whether to list indirect memberships. Default: false.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "200", + "description": "Maximum number of results to return. Max allowed value is 200.", + "format": "int32", + "location": "query", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify next page in the list", + "location": "query", + "type": "string" + }, + "roles": { + "description": "Comma separated role values to filter list results on.", + "location": "query", + "type": "string" + } + }, + "path": "groups/{groupKey}/members", + "response": { + "$ref": "Members" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member", + "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + "https://www.googleapis.com/auth/admin.directory.group.readonly" + ] + }, + "patch": { + "description": "Update membership of a user in the specified group. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.members.patch", + "parameterOrder": [ + "groupKey", + "memberKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + "location": "path", + "required": true, + "type": "string" + }, + "memberKey": { + "description": "Email or immutable ID of the user. If ID, it should match with id of member object", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/members/{memberKey}", + "request": { + "$ref": "Member" + }, + "response": { + "$ref": "Member" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member" + ] + }, + "update": { + "description": "Update membership of a user in the specified group.", + "httpMethod": "PUT", + "id": "directory.members.update", + "parameterOrder": [ + "groupKey", + "memberKey" + ], + "parameters": { + "groupKey": { + "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + "location": "path", + "required": true, + "type": "string" + }, + "memberKey": { + "description": "Email or immutable ID of the user. If ID, it should match with id of member object", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "groups/{groupKey}/members/{memberKey}", + "request": { + "$ref": "Member" + }, + "response": { + "$ref": "Member" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member" + ] + } + } + }, + "mobiledevices": { + "methods": { + "action": { + "description": "Take action on Mobile Device", + "httpMethod": "POST", + "id": "directory.mobiledevices.action", + "parameterOrder": [ + "customerId", + "resourceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "resourceId": { + "description": "Immutable ID of Mobile Device", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/devices/mobile/{resourceId}/action", + "request": { + "$ref": "MobileDeviceAction" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.mobile", + "https://www.googleapis.com/auth/admin.directory.device.mobile.action" + ] + }, + "delete": { + "description": "Delete Mobile Device", + "httpMethod": "DELETE", + "id": "directory.mobiledevices.delete", + "parameterOrder": [ + "customerId", + "resourceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "resourceId": { + "description": "Immutable ID of Mobile Device", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/devices/mobile/{resourceId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.mobile" + ] + }, + "get": { + "description": "Retrieve Mobile Device", + "httpMethod": "GET", + "id": "directory.mobiledevices.get", + "parameterOrder": [ + "customerId", + "resourceId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "projection": { + "description": "Restrict information returned to a set of selected fields.", + "enum": [ + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)", + "Includes all metadata fields" + ], + "location": "query", + "type": "string" + }, + "resourceId": { + "description": "Immutable ID of Mobile Device", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/devices/mobile/{resourceId}", + "response": { + "$ref": "MobileDevice" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.mobile", + "https://www.googleapis.com/auth/admin.directory.device.mobile.action", + "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly" + ] + }, + "list": { + "description": "Retrieve all Mobile Devices of a customer (paginated)", + "httpMethod": "GET", + "id": "directory.mobiledevices.list", + "parameterOrder": [ + "customerId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "default": "100", + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "100", + "minimum": "1", + "type": "integer" + }, + "orderBy": { + "description": "Column to use for sorting results", + "enum": [ + "deviceId", + "email", + "lastSync", + "model", + "name", + "os", + "status", + "type" + ], + "enumDescriptions": [ + "Mobile Device serial number.", + "Owner user email.", + "Last policy settings sync date time of the device.", + "Mobile Device model.", + "Owner user name.", + "Mobile operating system.", + "Status of the device.", + "Type of the device." + ], + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Token to specify next page in the list", + "location": "query", + "type": "string" + }, + "projection": { + "description": "Restrict information returned to a set of selected fields.", + "enum": [ + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)", + "Includes all metadata fields" + ], + "location": "query", + "type": "string" + }, + "query": { + "description": "Search string in the format provided by this Help Center article.", + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", + "enum": [ + "ASCENDING", + "DESCENDING" + ], + "enumDescriptions": [ + "Ascending order.", + "Descending order." + ], + "location": "query", + "type": "string" + } + }, + "path": "customer/{customerId}/devices/mobile", + "response": { + "$ref": "MobileDevices" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.device.mobile", + "https://www.googleapis.com/auth/admin.directory.device.mobile.action", + "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly" + ] + } + } + }, + "notifications": { + "methods": { + "delete": { + "description": "Deletes a notification", + "httpMethod": "DELETE", + "id": "directory.notifications.delete", + "parameterOrder": [ + "customer", + "notificationId" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.", + "location": "path", + "required": true, + "type": "string" + }, + "notificationId": { + "description": "The unique ID of the notification.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/notifications/{notificationId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.notifications" + ] + }, + "get": { + "description": "Retrieves a notification.", + "httpMethod": "GET", + "id": "directory.notifications.get", + "parameterOrder": [ + "customer", + "notificationId" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.", + "location": "path", + "required": true, + "type": "string" + }, + "notificationId": { + "description": "The unique ID of the notification.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/notifications/{notificationId}", + "response": { + "$ref": "Notification" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.notifications" + ] + }, + "list": { + "description": "Retrieves a list of notifications.", + "httpMethod": "GET", + "id": "directory.notifications.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "language": { + "description": "The ISO 639-1 code of the language notifications are returned in. The default is English (en).", + "location": "query", + "type": "string" + }, + "maxResults": { + "description": "Maximum number of notifications to return per page. The default is 100.", + "format": "uint32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The token to specify the page of results to retrieve.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/notifications", + "response": { + "$ref": "Notifications" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.notifications" + ] + }, + "patch": { + "description": "Updates a notification. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.notifications.patch", + "parameterOrder": [ + "customer", + "notificationId" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "notificationId": { + "description": "The unique ID of the notification.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/notifications/{notificationId}", + "request": { + "$ref": "Notification" + }, + "response": { + "$ref": "Notification" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.notifications" + ] + }, + "update": { + "description": "Updates a notification.", + "httpMethod": "PUT", + "id": "directory.notifications.update", + "parameterOrder": [ + "customer", + "notificationId" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "notificationId": { + "description": "The unique ID of the notification.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/notifications/{notificationId}", + "request": { + "$ref": "Notification" + }, + "response": { + "$ref": "Notification" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.notifications" + ] + } + } + }, + "orgunits": { + "methods": { + "delete": { + "description": "Remove organizational unit", + "httpMethod": "DELETE", + "id": "directory.orgunits.delete", + "parameterOrder": [ + "customerId", + "orgUnitPath" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "orgUnitPath": { + "description": "Full path of the organizational unit or its ID", + "location": "path", + "repeated": true, + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.orgunit" + ] + }, + "get": { + "description": "Retrieve organizational unit", + "httpMethod": "GET", + "id": "directory.orgunits.get", + "parameterOrder": [ + "customerId", + "orgUnitPath" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "orgUnitPath": { + "description": "Full path of the organizational unit or its ID", + "location": "path", + "repeated": true, + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + "response": { + "$ref": "OrgUnit" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.orgunit", + "https://www.googleapis.com/auth/admin.directory.orgunit.readonly" + ] + }, + "insert": { + "description": "Add organizational unit", + "httpMethod": "POST", + "id": "directory.orgunits.insert", + "parameterOrder": [ + "customerId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/orgunits", + "request": { + "$ref": "OrgUnit" + }, + "response": { + "$ref": "OrgUnit" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.orgunit" + ] + }, + "list": { + "description": "Retrieve all organizational units", + "httpMethod": "GET", + "id": "directory.orgunits.list", + "parameterOrder": [ + "customerId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "orgUnitPath": { + "default": "", + "description": "the URL-encoded organizational unit's path or its ID", + "location": "query", + "type": "string" + }, + "type": { + "description": "Whether to return all sub-organizations or just immediate children", + "enum": [ + "all", + "children" + ], + "enumDescriptions": [ + "All sub-organizational units.", + "Immediate children only (default)." + ], + "location": "query", + "type": "string" + } + }, + "path": "customer/{customerId}/orgunits", + "response": { + "$ref": "OrgUnits" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.orgunit", + "https://www.googleapis.com/auth/admin.directory.orgunit.readonly" + ] + }, + "patch": { + "description": "Update organizational unit. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.orgunits.patch", + "parameterOrder": [ + "customerId", + "orgUnitPath" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "orgUnitPath": { + "description": "Full path of the organizational unit or its ID", + "location": "path", + "repeated": true, + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + "request": { + "$ref": "OrgUnit" + }, + "response": { + "$ref": "OrgUnit" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.orgunit" + ] + }, + "update": { + "description": "Update organizational unit", + "httpMethod": "PUT", + "id": "directory.orgunits.update", + "parameterOrder": [ + "customerId", + "orgUnitPath" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "orgUnitPath": { + "description": "Full path of the organizational unit or its ID", + "location": "path", + "repeated": true, + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + "request": { + "$ref": "OrgUnit" + }, + "response": { + "$ref": "OrgUnit" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.orgunit" + ] + } + } + }, + "privileges": { + "methods": { + "list": { + "description": "Retrieves a paginated list of all privileges for a customer.", + "httpMethod": "GET", + "id": "directory.privileges.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roles/ALL/privileges", + "response": { + "$ref": "Privileges" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement", + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + ] + } + } + }, + "resources": { + "resources": { + "buildings": { + "methods": { + "delete": { + "description": "Deletes a building.", + "httpMethod": "DELETE", + "id": "directory.resources.buildings.delete", + "parameterOrder": [ + "customer", + "buildingId" + ], + "parameters": { + "buildingId": { + "description": "The ID of the building to delete.", + "location": "path", + "required": true, + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/buildings/{buildingId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "get": { + "description": "Retrieves a building.", + "httpMethod": "GET", + "id": "directory.resources.buildings.get", + "parameterOrder": [ + "customer", + "buildingId" + ], + "parameters": { + "buildingId": { + "description": "The unique ID of the building to retrieve.", + "location": "path", + "required": true, + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/buildings/{buildingId}", + "response": { + "$ref": "Building" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + ] + }, + "insert": { + "description": "Inserts a building.", + "httpMethod": "POST", + "id": "directory.resources.buildings.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "coordinatesSource": { + "default": "SOURCE_UNSPECIFIED", + "description": "Source from which Building.coordinates are derived.", + "enum": [ + "CLIENT_SPECIFIED", + "RESOLVED_FROM_ADDRESS", + "SOURCE_UNSPECIFIED" + ], + "enumDescriptions": [ + "Building.coordinates are set to the coordinates included in the request.", + "Building.coordinates are automatically populated based on the postal address.", + "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided." + ], + "location": "query", + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/buildings", + "request": { + "$ref": "Building" + }, + "response": { + "$ref": "Building" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "list": { + "description": "Retrieves a list of buildings for an account.", + "httpMethod": "GET", + "id": "directory.resources.buildings.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "500", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify the next page in the list.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/resources/buildings", + "response": { + "$ref": "Buildings" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + ] + }, + "patch": { + "description": "Updates a building. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.resources.buildings.patch", + "parameterOrder": [ + "customer", + "buildingId" + ], + "parameters": { + "buildingId": { + "description": "The ID of the building to update.", + "location": "path", + "required": true, + "type": "string" + }, + "coordinatesSource": { + "default": "SOURCE_UNSPECIFIED", + "description": "Source from which Building.coordinates are derived.", + "enum": [ + "CLIENT_SPECIFIED", + "RESOLVED_FROM_ADDRESS", + "SOURCE_UNSPECIFIED" + ], + "enumDescriptions": [ + "Building.coordinates are set to the coordinates included in the request.", + "Building.coordinates are automatically populated based on the postal address.", + "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided." + ], + "location": "query", + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/buildings/{buildingId}", + "request": { + "$ref": "Building" + }, + "response": { + "$ref": "Building" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "update": { + "description": "Updates a building.", + "httpMethod": "PUT", + "id": "directory.resources.buildings.update", + "parameterOrder": [ + "customer", + "buildingId" + ], + "parameters": { + "buildingId": { + "description": "The ID of the building to update.", + "location": "path", + "required": true, + "type": "string" + }, + "coordinatesSource": { + "default": "SOURCE_UNSPECIFIED", + "description": "Source from which Building.coordinates are derived.", + "enum": [ + "CLIENT_SPECIFIED", + "RESOLVED_FROM_ADDRESS", + "SOURCE_UNSPECIFIED" + ], + "enumDescriptions": [ + "Building.coordinates are set to the coordinates included in the request.", + "Building.coordinates are automatically populated based on the postal address.", + "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided." + ], + "location": "query", + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/buildings/{buildingId}", + "request": { + "$ref": "Building" + }, + "response": { + "$ref": "Building" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + } + } + }, + "calendars": { + "methods": { + "delete": { + "description": "Deletes a calendar resource.", + "httpMethod": "DELETE", + "id": "directory.resources.calendars.delete", + "parameterOrder": [ + "customer", + "calendarResourceId" + ], + "parameters": { + "calendarResourceId": { + "description": "The unique ID of the calendar resource to delete.", + "location": "path", + "required": true, + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "get": { + "description": "Retrieves a calendar resource.", + "httpMethod": "GET", + "id": "directory.resources.calendars.get", + "parameterOrder": [ + "customer", + "calendarResourceId" + ], + "parameters": { + "calendarResourceId": { + "description": "The unique ID of the calendar resource to retrieve.", + "location": "path", + "required": true, + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + "response": { + "$ref": "CalendarResource" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + ] + }, + "insert": { + "description": "Inserts a calendar resource.", + "httpMethod": "POST", + "id": "directory.resources.calendars.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/calendars", + "request": { + "$ref": "CalendarResource" + }, + "response": { + "$ref": "CalendarResource" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "list": { + "description": "Retrieves a list of calendar resources for an account.", + "httpMethod": "GET", + "id": "directory.resources.calendars.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "500", + "minimum": "1", + "type": "integer" + }, + "orderBy": { + "description": "Field(s) to sort results by in either ascending or descending order. Supported fields include resourceId, resourceName, capacity, buildingId, and floorName. If no order is specified, defaults to ascending. Should be of the form \"field [asc|desc], field [asc|desc], ...\". For example buildingId, capacity desc would return results sorted first by buildingId in ascending order then by capacity in descending order.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Token to specify the next page in the list.", + "location": "query", + "type": "string" + }, + "query": { + "description": "String query used to filter results. Should be of the form \"field operator value\" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Supported fields include generatedResourceName, name, buildingId, featureInstances.feature.name. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/resources/calendars", + "response": { + "$ref": "CalendarResources" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + ] + }, + "patch": { + "description": "Updates a calendar resource.\n\nThis method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.resources.calendars.patch", + "parameterOrder": [ + "customer", + "calendarResourceId" + ], + "parameters": { + "calendarResourceId": { + "description": "The unique ID of the calendar resource to update.", + "location": "path", + "required": true, + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + "request": { + "$ref": "CalendarResource" + }, + "response": { + "$ref": "CalendarResource" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "update": { + "description": "Updates a calendar resource.\n\nThis method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.", + "httpMethod": "PUT", + "id": "directory.resources.calendars.update", + "parameterOrder": [ + "customer", + "calendarResourceId" + ], + "parameters": { + "calendarResourceId": { + "description": "The unique ID of the calendar resource to update.", + "location": "path", + "required": true, + "type": "string" + }, + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + "request": { + "$ref": "CalendarResource" + }, + "response": { + "$ref": "CalendarResource" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + } + } + }, + "features": { + "methods": { + "delete": { + "description": "Deletes a feature.", + "httpMethod": "DELETE", + "id": "directory.resources.features.delete", + "parameterOrder": [ + "customer", + "featureKey" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "featureKey": { + "description": "The unique ID of the feature to delete.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/features/{featureKey}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "get": { + "description": "Retrieves a feature.", + "httpMethod": "GET", + "id": "directory.resources.features.get", + "parameterOrder": [ + "customer", + "featureKey" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "featureKey": { + "description": "The unique ID of the feature to retrieve.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/features/{featureKey}", + "response": { + "$ref": "Feature" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + ] + }, + "insert": { + "description": "Inserts a feature.", + "httpMethod": "POST", + "id": "directory.resources.features.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/features", + "request": { + "$ref": "Feature" + }, + "response": { + "$ref": "Feature" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "list": { + "description": "Retrieves a list of features for an account.", + "httpMethod": "GET", + "id": "directory.resources.features.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "500", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify the next page in the list.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/resources/features", + "response": { + "$ref": "Features" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + ] + }, + "patch": { + "description": "Updates a feature. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.resources.features.patch", + "parameterOrder": [ + "customer", + "featureKey" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "featureKey": { + "description": "The unique ID of the feature to update.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/features/{featureKey}", + "request": { + "$ref": "Feature" + }, + "response": { + "$ref": "Feature" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "rename": { + "description": "Renames a feature.", + "httpMethod": "POST", + "id": "directory.resources.features.rename", + "parameterOrder": [ + "customer", + "oldName" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "oldName": { + "description": "The unique ID of the feature to rename.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/features/{oldName}/rename", + "request": { + "$ref": "FeatureRename" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + }, + "update": { + "description": "Updates a feature.", + "httpMethod": "PUT", + "id": "directory.resources.features.update", + "parameterOrder": [ + "customer", + "featureKey" + ], + "parameters": { + "customer": { + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "location": "path", + "required": true, + "type": "string" + }, + "featureKey": { + "description": "The unique ID of the feature to update.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/resources/features/{featureKey}", + "request": { + "$ref": "Feature" + }, + "response": { + "$ref": "Feature" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.resource.calendar" + ] + } + } + } + } + }, + "roleAssignments": { + "methods": { + "delete": { + "description": "Deletes a role assignment.", + "httpMethod": "DELETE", + "id": "directory.roleAssignments.delete", + "parameterOrder": [ + "customer", + "roleAssignmentId" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "roleAssignmentId": { + "description": "Immutable ID of the role assignment.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roleassignments/{roleAssignmentId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement" + ] + }, + "get": { + "description": "Retrieve a role assignment.", + "httpMethod": "GET", + "id": "directory.roleAssignments.get", + "parameterOrder": [ + "customer", + "roleAssignmentId" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "roleAssignmentId": { + "description": "Immutable ID of the role assignment.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roleassignments/{roleAssignmentId}", + "response": { + "$ref": "RoleAssignment" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement", + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + ] + }, + "insert": { + "description": "Creates a role assignment.", + "httpMethod": "POST", + "id": "directory.roleAssignments.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roleassignments", + "request": { + "$ref": "RoleAssignment" + }, + "response": { + "$ref": "RoleAssignment" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement" + ] + }, + "list": { + "description": "Retrieves a paginated list of all roleAssignments.", + "httpMethod": "GET", + "id": "directory.roleAssignments.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "200", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify the next page in the list.", + "location": "query", + "type": "string" + }, + "roleId": { + "description": "Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.", + "location": "query", + "type": "string" + }, + "userKey": { + "description": "The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/roleassignments", + "response": { + "$ref": "RoleAssignments" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement", + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + ] + } + } + }, + "roles": { + "methods": { + "delete": { + "description": "Deletes a role.", + "httpMethod": "DELETE", + "id": "directory.roles.delete", + "parameterOrder": [ + "customer", + "roleId" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "roleId": { + "description": "Immutable ID of the role.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roles/{roleId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement" + ] + }, + "get": { + "description": "Retrieves a role.", + "httpMethod": "GET", + "id": "directory.roles.get", + "parameterOrder": [ + "customer", + "roleId" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "roleId": { + "description": "Immutable ID of the role.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roles/{roleId}", + "response": { + "$ref": "Role" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement", + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + ] + }, + "insert": { + "description": "Creates a role.", + "httpMethod": "POST", + "id": "directory.roles.insert", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roles", + "request": { + "$ref": "Role" + }, + "response": { + "$ref": "Role" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement" + ] + }, + "list": { + "description": "Retrieves a paginated list of all the roles in a domain.", + "httpMethod": "GET", + "id": "directory.roles.list", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "100", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify the next page in the list.", + "location": "query", + "type": "string" + } + }, + "path": "customer/{customer}/roles", + "response": { + "$ref": "Roles" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement", + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + ] + }, + "patch": { + "description": "Updates a role. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.roles.patch", + "parameterOrder": [ + "customer", + "roleId" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "roleId": { + "description": "Immutable ID of the role.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roles/{roleId}", + "request": { + "$ref": "Role" + }, + "response": { + "$ref": "Role" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement" + ] + }, + "update": { + "description": "Updates a role.", + "httpMethod": "PUT", + "id": "directory.roles.update", + "parameterOrder": [ + "customer", + "roleId" + ], + "parameters": { + "customer": { + "description": "Immutable ID of the G Suite account.", + "location": "path", + "required": true, + "type": "string" + }, + "roleId": { + "description": "Immutable ID of the role.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customer}/roles/{roleId}", + "request": { + "$ref": "Role" + }, + "response": { + "$ref": "Role" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.rolemanagement" + ] + } + } + }, + "schemas": { + "methods": { + "delete": { + "description": "Delete schema", + "httpMethod": "DELETE", + "id": "directory.schemas.delete", + "parameterOrder": [ + "customerId", + "schemaKey" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "schemaKey": { + "description": "Name or immutable ID of the schema", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/schemas/{schemaKey}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.userschema" + ] + }, + "get": { + "description": "Retrieve schema", + "httpMethod": "GET", + "id": "directory.schemas.get", + "parameterOrder": [ + "customerId", + "schemaKey" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "schemaKey": { + "description": "Name or immutable ID of the schema", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/schemas/{schemaKey}", + "response": { + "$ref": "Schema" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.userschema", + "https://www.googleapis.com/auth/admin.directory.userschema.readonly" + ] + }, + "insert": { + "description": "Create schema.", + "httpMethod": "POST", + "id": "directory.schemas.insert", + "parameterOrder": [ + "customerId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/schemas", + "request": { + "$ref": "Schema" + }, + "response": { + "$ref": "Schema" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.userschema" + ] + }, + "list": { + "description": "Retrieve all schemas for a customer", + "httpMethod": "GET", + "id": "directory.schemas.list", + "parameterOrder": [ + "customerId" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/schemas", + "response": { + "$ref": "Schemas" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.userschema", + "https://www.googleapis.com/auth/admin.directory.userschema.readonly" + ] + }, + "patch": { + "description": "Update schema. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.schemas.patch", + "parameterOrder": [ + "customerId", + "schemaKey" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "schemaKey": { + "description": "Name or immutable ID of the schema.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/schemas/{schemaKey}", + "request": { + "$ref": "Schema" + }, + "response": { + "$ref": "Schema" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.userschema" + ] + }, + "update": { + "description": "Update schema", + "httpMethod": "PUT", + "id": "directory.schemas.update", + "parameterOrder": [ + "customerId", + "schemaKey" + ], + "parameters": { + "customerId": { + "description": "Immutable ID of the G Suite account", + "location": "path", + "required": true, + "type": "string" + }, + "schemaKey": { + "description": "Name or immutable ID of the schema.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "customer/{customerId}/schemas/{schemaKey}", + "request": { + "$ref": "Schema" + }, + "response": { + "$ref": "Schema" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.userschema" + ] + } + } + }, + "tokens": { + "methods": { + "delete": { + "description": "Delete all access tokens issued by a user for an application.", + "httpMethod": "DELETE", + "id": "directory.tokens.delete", + "parameterOrder": [ + "userKey", + "clientId" + ], + "parameters": { + "clientId": { + "description": "The Client ID of the application the token is issued to.", + "location": "path", + "required": true, + "type": "string" + }, + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/tokens/{clientId}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + }, + "get": { + "description": "Get information about an access token issued by a user.", + "httpMethod": "GET", + "id": "directory.tokens.get", + "parameterOrder": [ + "userKey", + "clientId" + ], + "parameters": { + "clientId": { + "description": "The Client ID of the application the token is issued to.", + "location": "path", + "required": true, + "type": "string" + }, + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/tokens/{clientId}", + "response": { + "$ref": "Token" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + }, + "list": { + "description": "Returns the set of tokens specified user has issued to 3rd party applications.", + "httpMethod": "GET", + "id": "directory.tokens.list", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/tokens", + "response": { + "$ref": "Tokens" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + } + } + }, + "users": { + "methods": { + "delete": { + "description": "Delete user", + "httpMethod": "DELETE", + "id": "directory.users.delete", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "get": { + "description": "retrieve user", + "httpMethod": "GET", + "id": "directory.users.get", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "customFieldMask": { + "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.", + "location": "query", + "type": "string" + }, + "projection": { + "default": "basic", + "description": "What subset of fields to fetch for this user.", + "enum": [ + "basic", + "custom", + "full" + ], + "enumDescriptions": [ + "Do not include any custom fields for the user.", + "Include custom fields from schemas mentioned in customFieldMask.", + "Include all fields associated with this user." + ], + "location": "query", + "type": "string" + }, + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + }, + "viewType": { + "default": "admin_view", + "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.", + "enum": [ + "admin_view", + "domain_public" + ], + "enumDescriptions": [ + "Fetches the ADMIN_VIEW of the user.", + "Fetches the DOMAIN_PUBLIC view of the user." + ], + "location": "query", + "type": "string" + } + }, + "path": "users/{userKey}", + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.readonly" + ] + }, + "insert": { + "description": "create user.", + "httpMethod": "POST", + "id": "directory.users.insert", + "path": "users", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "list": { + "description": "Retrieve either deleted users or all users in a domain (paginated)", + "httpMethod": "GET", + "id": "directory.users.list", + "parameters": { + "customFieldMask": { + "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.", + "location": "query", + "type": "string" + }, + "customer": { + "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", + "location": "query", + "type": "string" + }, + "domain": { + "description": "Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.", + "location": "query", + "type": "string" + }, + "event": { + "description": "Event on which subscription is intended (if subscribing)", + "enum": [ + "add", + "delete", + "makeAdmin", + "undelete", + "update" + ], + "enumDescriptions": [ + "User Created Event", + "User Deleted Event", + "User Admin Status Change Event", + "User Undeleted Event", + "User Updated Event" + ], + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "100", + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "500", + "minimum": "1", + "type": "integer" + }, + "orderBy": { + "description": "Column to use for sorting results", + "enum": [ + "email", + "familyName", + "givenName" + ], + "enumDescriptions": [ + "Primary email of the user.", + "User's family name.", + "User's given name." + ], + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Token to specify next page in the list", + "location": "query", + "type": "string" + }, + "projection": { + "default": "basic", + "description": "What subset of fields to fetch for this user.", + "enum": [ + "basic", + "custom", + "full" + ], + "enumDescriptions": [ + "Do not include any custom fields for the user.", + "Include custom fields from schemas mentioned in customFieldMask.", + "Include all fields associated with this user." + ], + "location": "query", + "type": "string" + }, + "query": { + "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users", + "location": "query", + "type": "string" + }, + "showDeleted": { + "description": "If set to true, retrieves the list of deleted users. (Default: false)", + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Whether to return results in ascending or descending order.", + "enum": [ + "ASCENDING", + "DESCENDING" + ], + "enumDescriptions": [ + "Ascending order.", + "Descending order." + ], + "location": "query", + "type": "string" + }, + "viewType": { + "default": "admin_view", + "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.", + "enum": [ + "admin_view", + "domain_public" + ], + "enumDescriptions": [ + "Fetches the ADMIN_VIEW of the user.", + "Fetches the DOMAIN_PUBLIC view of the user." + ], + "location": "query", + "type": "string" + } + }, + "path": "users", + "response": { + "$ref": "Users" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ], + "supportsSubscription": true + }, + "makeAdmin": { + "description": "change admin status of a user", + "httpMethod": "POST", + "id": "directory.users.makeAdmin", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user as admin", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/makeAdmin", + "request": { + "$ref": "UserMakeAdmin" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "patch": { + "description": "update user. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.users.patch", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user. If ID, it should match with id of user object", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "undelete": { + "description": "Undelete a deleted user", + "httpMethod": "POST", + "id": "directory.users.undelete", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "The immutable id of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/undelete", + "request": { + "$ref": "UserUndelete" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "update": { + "description": "update user", + "httpMethod": "PUT", + "id": "directory.users.update", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user. If ID, it should match with id of user object", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "watch": { + "description": "Watch for changes in users list", + "httpMethod": "POST", + "id": "directory.users.watch", + "parameters": { + "customFieldMask": { + "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.", + "location": "query", + "type": "string" + }, + "customer": { + "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", + "location": "query", + "type": "string" + }, + "domain": { + "description": "Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.", + "location": "query", + "type": "string" + }, + "event": { + "description": "Event on which subscription is intended (if subscribing)", + "enum": [ + "add", + "delete", + "makeAdmin", + "undelete", + "update" + ], + "enumDescriptions": [ + "User Created Event", + "User Deleted Event", + "User Admin Status Change Event", + "User Undeleted Event", + "User Updated Event" + ], + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "100", + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "maximum": "500", + "minimum": "1", + "type": "integer" + }, + "orderBy": { + "description": "Column to use for sorting results", + "enum": [ + "email", + "familyName", + "givenName" + ], + "enumDescriptions": [ + "Primary email of the user.", + "User's family name.", + "User's given name." + ], + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Token to specify next page in the list", + "location": "query", + "type": "string" + }, + "projection": { + "default": "basic", + "description": "What subset of fields to fetch for this user.", + "enum": [ + "basic", + "custom", + "full" + ], + "enumDescriptions": [ + "Do not include any custom fields for the user.", + "Include custom fields from schemas mentioned in customFieldMask.", + "Include all fields associated with this user." + ], + "location": "query", + "type": "string" + }, + "query": { + "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users", + "location": "query", + "type": "string" + }, + "showDeleted": { + "description": "If set to true, retrieves the list of deleted users. (Default: false)", + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Whether to return results in ascending or descending order.", + "enum": [ + "ASCENDING", + "DESCENDING" + ], + "enumDescriptions": [ + "Ascending order.", + "Descending order." + ], + "location": "query", + "type": "string" + }, + "viewType": { + "default": "admin_view", + "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.", + "enum": [ + "admin_view", + "domain_public" + ], + "enumDescriptions": [ + "Fetches the ADMIN_VIEW of the user.", + "Fetches the DOMAIN_PUBLIC view of the user." + ], + "location": "query", + "type": "string" + } + }, + "path": "users/watch", + "request": { + "$ref": "Channel", + "parameterName": "resource" + }, + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ], + "supportsSubscription": true + } + }, + "resources": { + "aliases": { + "methods": { + "delete": { + "description": "Remove a alias for the user", + "httpMethod": "DELETE", + "id": "directory.users.aliases.delete", + "parameterOrder": [ + "userKey", + "alias" + ], + "parameters": { + "alias": { + "description": "The alias to be removed", + "location": "path", + "required": true, + "type": "string" + }, + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/aliases/{alias}", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.alias" + ] + }, + "insert": { + "description": "Add a alias for the user", + "httpMethod": "POST", + "id": "directory.users.aliases.insert", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/aliases", + "request": { + "$ref": "Alias" + }, + "response": { + "$ref": "Alias" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.alias" + ] + }, + "list": { + "description": "List all aliases for a user", + "httpMethod": "GET", + "id": "directory.users.aliases.list", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "event": { + "description": "Event on which subscription is intended (if subscribing)", + "enum": [ + "add", + "delete" + ], + "enumDescriptions": [ + "Alias Created Event", + "Alias Deleted Event" + ], + "location": "query", + "type": "string" + }, + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/aliases", + "response": { + "$ref": "Aliases" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.alias", + "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + "https://www.googleapis.com/auth/admin.directory.user.readonly" + ], + "supportsSubscription": true + }, + "watch": { + "description": "Watch for changes in user aliases list", + "httpMethod": "POST", + "id": "directory.users.aliases.watch", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "event": { + "description": "Event on which subscription is intended (if subscribing)", + "enum": [ + "add", + "delete" + ], + "enumDescriptions": [ + "Alias Created Event", + "Alias Deleted Event" + ], + "location": "query", + "type": "string" + }, + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/aliases/watch", + "request": { + "$ref": "Channel", + "parameterName": "resource" + }, + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.alias", + "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + "https://www.googleapis.com/auth/admin.directory.user.readonly" + ], + "supportsSubscription": true + } + } + }, + "photos": { + "methods": { + "delete": { + "description": "Remove photos for the user", + "httpMethod": "DELETE", + "id": "directory.users.photos.delete", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/photos/thumbnail", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "get": { + "description": "Retrieve photo of a user", + "httpMethod": "GET", + "id": "directory.users.photos.get", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/photos/thumbnail", + "response": { + "$ref": "UserPhoto" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.readonly" + ] + }, + "patch": { + "description": "Add a photo for the user. This method supports patch semantics.", + "httpMethod": "PATCH", + "id": "directory.users.photos.patch", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/photos/thumbnail", + "request": { + "$ref": "UserPhoto" + }, + "response": { + "$ref": "UserPhoto" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + }, + "update": { + "description": "Add a photo for the user", + "httpMethod": "PUT", + "id": "directory.users.photos.update", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/photos/thumbnail", + "request": { + "$ref": "UserPhoto" + }, + "response": { + "$ref": "UserPhoto" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user" + ] + } + } + } + } + }, + "verificationCodes": { + "methods": { + "generate": { + "description": "Generate new backup verification codes for the user.", + "httpMethod": "POST", + "id": "directory.verificationCodes.generate", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/verificationCodes/generate", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + }, + "invalidate": { + "description": "Invalidate the current backup verification codes for the user.", + "httpMethod": "POST", + "id": "directory.verificationCodes.invalidate", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Email or immutable ID of the user", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/verificationCodes/invalidate", + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + }, + "list": { + "description": "Returns the current set of valid backup verification codes for the specified user.", + "httpMethod": "GET", + "id": "directory.verificationCodes.list", + "parameterOrder": [ + "userKey" + ], + "parameters": { + "userKey": { + "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "users/{userKey}/verificationCodes", + "response": { + "$ref": "VerificationCodes" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.directory.user.security" + ] + } + } + } + }, + "revision": "20200605", + "rootUrl": "https://www.googleapis.com/", + "schemas": { + "Alias": { + "description": "JSON template for Alias object in Directory API.", + "id": "Alias", + "properties": { + "alias": { + "description": "A alias email", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "id": { + "description": "Unique id of the group (Read-only) Unique id of the user (Read-only)", + "type": "string" + }, + "kind": { + "default": "admin#directory#alias", + "description": "Kind of resource this is.", + "type": "string" + }, + "primaryEmail": { + "description": "Group's primary email (Read-only) User's primary email (Read-only)", + "type": "string" + } + }, + "type": "object" + }, + "Aliases": { + "description": "JSON response template to list aliases in Directory API.", + "id": "Aliases", + "properties": { + "aliases": { + "description": "List of alias objects.", + "items": { + "type": "any" + }, + "type": "array" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#aliases", + "description": "Kind of resource this is.", + "type": "string" + } + }, + "type": "object" + }, + "Asp": { + "description": "The template that returns individual ASP (Access Code) data.", + "id": "Asp", + "properties": { + "codeId": { + "description": "The unique ID of the ASP.", + "format": "int32", + "type": "integer" + }, + "creationTime": { + "description": "The time when the ASP was created. Expressed in Unix time format.", + "format": "int64", + "type": "string" + }, + "etag": { + "description": "ETag of the ASP.", + "type": "string" + }, + "kind": { + "default": "admin#directory#asp", + "description": "The type of the API resource. This is always admin#directory#asp.", + "type": "string" + }, + "lastTimeUsed": { + "description": "The time when the ASP was last used. Expressed in Unix time format.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "The name of the application that the user, represented by their userId, entered when the ASP was created.", + "type": "string" + }, + "userKey": { + "description": "The unique ID of the user who issued the ASP.", + "type": "string" + } + }, + "type": "object" + }, + "Asps": { + "id": "Asps", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "A list of ASP resources.", + "items": { + "$ref": "Asp" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#aspList", + "description": "The type of the API resource. This is always admin#directory#aspList.", + "type": "string" + } + }, + "type": "object" + }, + "Building": { + "description": "JSON template for Building object in Directory API.", + "id": "Building", + "properties": { + "address": { + "$ref": "BuildingAddress", + "description": "The postal address of the building. See PostalAddress for details. Note that only a single address line and region code are required." + }, + "buildingId": { + "description": "Unique identifier for the building. The maximum length is 100 characters.", + "type": "string" + }, + "buildingName": { + "description": "The building name as seen by users in Calendar. Must be unique for the customer. For example, \"NYC-CHEL\". The maximum length is 100 characters.", + "type": "string" + }, + "coordinates": { + "$ref": "BuildingCoordinates", + "description": "The geographic coordinates of the center of the building, expressed as latitude and longitude in decimal degrees." + }, + "description": { + "description": "A brief description of the building. For example, \"Chelsea Market\".", + "type": "string" + }, + "etags": { + "description": "ETag of the resource.", + "type": "string" + }, + "floorNames": { + "description": "The display names for all floors in this building. The floors are expected to be sorted in ascending order, from lowest floor to highest floor. For example, [\"B2\", \"B1\", \"L\", \"1\", \"2\", \"2M\", \"3\", \"PH\"] Must contain at least one entry.", + "items": { + "type": "string" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#resources#buildings#Building", + "description": "Kind of resource this is.", + "type": "string" + } + }, + "type": "object" + }, + "BuildingAddress": { + "description": "JSON template for the postal address of a building in Directory API.", + "id": "BuildingAddress", + "properties": { + "addressLines": { + "description": "Unstructured address lines describing the lower levels of an address.", + "items": { + "type": "string" + }, + "type": "array" + }, + "administrativeArea": { + "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region.", + "type": "string" + }, + "languageCode": { + "description": "Optional. BCP-47 language code of the contents of this address (if known).", + "type": "string" + }, + "locality": { + "description": "Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines.", + "type": "string" + }, + "postalCode": { + "description": "Optional. Postal code of the address.", + "type": "string" + }, + "regionCode": { + "description": "Required. CLDR region code of the country/region of the address.", + "type": "string" + }, + "sublocality": { + "description": "Optional. Sublocality of the address.", + "type": "string" + } + }, + "type": "object" + }, + "BuildingCoordinates": { + "description": "JSON template for coordinates of a building in Directory API.", + "id": "BuildingCoordinates", + "properties": { + "latitude": { + "description": "Latitude in decimal degrees.", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "Longitude in decimal degrees.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Buildings": { + "description": "JSON template for Building List Response object in Directory API.", + "id": "Buildings", + "properties": { + "buildings": { + "description": "The Buildings in this page of results.", + "items": { + "$ref": "Building" + }, + "type": "array" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#resources#buildings#buildingsList", + "description": "Kind of resource this is.", + "type": "string" + }, + "nextPageToken": { + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "CalendarResource": { + "description": "JSON template for Calendar Resource object in Directory API.", + "id": "CalendarResource", + "properties": { + "buildingId": { + "description": "Unique ID for the building a resource is located in.", + "type": "string" + }, + "capacity": { + "description": "Capacity of a resource, number of seats in a room.", + "format": "int32", + "type": "integer" + }, + "etags": { + "description": "ETag of the resource.", + "type": "string" + }, + "featureInstances": { + "type": "any" + }, + "floorName": { + "description": "Name of the floor a resource is located on.", + "type": "string" + }, + "floorSection": { + "description": "Name of the section within a floor a resource is located in.", + "type": "string" + }, + "generatedResourceName": { + "description": "The read-only auto-generated name of the calendar resource which includes metadata about the resource such as building name, floor, capacity, etc. For example, \"NYC-2-Training Room 1A (16)\".", + "type": "string" + }, + "kind": { + "default": "admin#directory#resources#calendars#CalendarResource", + "description": "The type of the resource. For calendar resources, the value is admin#directory#resources#calendars#CalendarResource.", + "type": "string" + }, + "resourceCategory": { + "description": "The category of the calendar resource. Either CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN.", + "type": "string" + }, + "resourceDescription": { + "description": "Description of the resource, visible only to admins.", + "type": "string" + }, + "resourceEmail": { + "description": "The read-only email for the calendar resource. Generated as part of creating a new calendar resource.", + "type": "string" + }, + "resourceId": { + "annotations": { + "required": [ + "directory.resources.calendars.insert" + ] + }, + "description": "The unique ID for the calendar resource.", + "type": "string" + }, + "resourceName": { + "annotations": { + "required": [ + "directory.resources.calendars.insert" + ] + }, + "description": "The name of the calendar resource. For example, \"Training Room 1A\".", + "type": "string" + }, + "resourceType": { + "description": "The type of the calendar resource, intended for non-room resources.", + "type": "string" + }, + "userVisibleDescription": { + "description": "Description of the resource, visible to users and admins.", + "type": "string" + } + }, + "type": "object" + }, + "CalendarResources": { + "description": "JSON template for Calendar Resource List Response object in Directory API.", + "id": "CalendarResources", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "The CalendarResources in this page of results.", + "items": { + "$ref": "CalendarResource" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#resources#calendars#calendarResourcesList", + "description": "Identifies this as a collection of CalendarResources. This is always admin#directory#resources#calendars#calendarResourcesList.", + "type": "string" + }, + "nextPageToken": { + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "Channel": { + "description": "An notification channel used to watch for resource changes.", + "id": "Channel", + "properties": { + "address": { + "description": "The address where notifications are delivered for this channel.", + "type": "string" + }, + "expiration": { + "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.", + "format": "int64", + "type": "string" + }, + "id": { + "description": "A UUID or similar unique string that identifies this channel.", + "type": "string" + }, + "kind": { + "default": "api#channel", + "description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".", + "type": "string" + }, + "params": { + "additionalProperties": { + "description": "Declares a new parameter by name.", + "type": "string" + }, + "description": "Additional parameters controlling delivery channel behavior. Optional.", + "type": "object" + }, + "payload": { + "description": "A Boolean value to indicate whether payload is wanted. Optional.", + "type": "boolean" + }, + "resourceId": { + "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.", + "type": "string" + }, + "resourceUri": { + "description": "A version-specific identifier for the watched resource.", + "type": "string" + }, + "token": { + "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.", + "type": "string" + }, + "type": { + "description": "The type of delivery mechanism used for this channel.", + "type": "string" + } + }, + "type": "object" + }, + "ChromeOsDevice": { + "description": "JSON template for Chrome Os Device resource in Directory API.", + "id": "ChromeOsDevice", + "properties": { + "activeTimeRanges": { + "description": "List of active time ranges (Read-only)", + "items": { + "properties": { + "activeTime": { + "description": "Duration in milliseconds", + "format": "int32", + "type": "integer" + }, + "date": { + "description": "Date of usage", + "format": "date", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "annotatedAssetId": { + "description": "AssetId specified during enrollment or through later annotation", + "type": "string" + }, + "annotatedLocation": { + "description": "Address or location of the device as noted by the administrator", + "type": "string" + }, + "annotatedUser": { + "description": "User of the device", + "type": "string" + }, + "autoUpdateExpiration": { + "description": "(Read-only) The timestamp after which the device will stop receiving Chrome updates or support", + "format": "int64", + "type": "string" + }, + "bootMode": { + "description": "Chromebook boot mode (Read-only)", + "type": "string" + }, + "cpuStatusReports": { + "description": "Reports of CPU utilization and temperature (Read-only)", + "items": { + "properties": { + "cpuTemperatureInfo": { + "description": "List of CPU temperature samples.", + "items": { + "properties": { + "label": { + "description": "CPU label", + "type": "string" + }, + "temperature": { + "description": "Temperature in Celsius degrees.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "cpuUtilizationPercentageInfo": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "reportTime": { + "description": "Date and time the report was received.", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "deviceFiles": { + "description": "List of device files to download (Read-only)", + "items": { + "properties": { + "createTime": { + "description": "Date and time the file was created", + "format": "date-time", + "type": "string" + }, + "downloadUrl": { + "description": "File download URL", + "type": "string" + }, + "name": { + "description": "File name", + "type": "string" + }, + "type": { + "description": "File type", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "deviceId": { + "description": "Unique identifier of Chrome OS Device (Read-only)", + "type": "string" + }, + "diskVolumeReports": { + "description": "Reports of disk space and other info about mounted/connected volumes.", + "items": { + "properties": { + "volumeInfo": { + "description": "Disk volumes", + "items": { + "properties": { + "storageFree": { + "description": "Free disk space [in bytes]", + "format": "int64", + "type": "string" + }, + "storageTotal": { + "description": "Total disk space [in bytes]", + "format": "int64", + "type": "string" + }, + "volumeId": { + "description": "Volume id", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "dockMacAddress": { + "description": "(Read-only) Built-in MAC address for the docking station that the device connected to. Factory sets Media access control address (MAC address) assigned for use by a dock. Currently this is only supported on the Dell Arcada / Sarien devices and the Dell WD19 / WD19TB Docking Station. It is reserved specifically for MAC pass through device policy. The format is twelve (12) hexadecimal digits without any delimiter (uppercase letters). This is only relevant for Dell devices.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "ethernetMacAddress": { + "description": "Chromebook Mac Address on ethernet network interface (Read-only)", + "type": "string" + }, + "ethernetMacAddress0": { + "description": "(Read-only) MAC address used by the Chromebook’s internal ethernet port, and for onboard network (ethernet) interface. The format is twelve (12) hexadecimal digits without any delimiter (uppercase letters). This is only relevant for some devices.", + "type": "string" + }, + "firmwareVersion": { + "description": "Chromebook firmware version (Read-only)", + "type": "string" + }, + "kind": { + "default": "admin#directory#chromeosdevice", + "description": "Kind of resource this is.", + "type": "string" + }, + "lastEnrollmentTime": { + "description": "Date and time the device was last enrolled (Read-only)", + "format": "date-time", + "type": "string" + }, + "lastKnownNetwork": { + "description": "Contains last used network (Read-only)", + "items": { + "properties": { + "ipAddress": { + "description": "The IP address", + "type": "string" + }, + "wanIpAddress": { + "description": "The WAN IP address", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "lastSync": { + "description": "Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)", + "format": "date-time", + "type": "string" + }, + "macAddress": { + "description": "Chromebook Mac Address on wifi network interface (Read-only)", + "type": "string" + }, + "manufactureDate": { + "description": "(Read-only) The date the device was manufactured in yyyy-mm-dd format.", + "type": "string" + }, + "meid": { + "description": "Contains either the Mobile Equipment identifier (MEID) or the International Mobile Equipment Identity (IMEI) for the 3G mobile card in the Chromebook (Read-only)", + "type": "string" + }, + "model": { + "description": "Chromebook Model (Read-only)", + "type": "string" + }, + "notes": { + "description": "Notes added by the administrator", + "type": "string" + }, + "orderNumber": { + "description": "Chromebook order number (Read-only)", + "type": "string" + }, + "orgUnitPath": { + "description": "OrgUnit of the device", + "type": "string" + }, + "osVersion": { + "description": "Chromebook Os Version (Read-only)", + "type": "string" + }, + "platformVersion": { + "description": "Chromebook platform version (Read-only)", + "type": "string" + }, + "recentUsers": { + "description": "List of recent device users, in descending order by last login time (Read-only)", + "items": { + "properties": { + "email": { + "description": "Email address of the user. Present only if the user type is managed", + "type": "string" + }, + "type": { + "description": "The type of the user", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "serialNumber": { + "description": "Chromebook serial number (Read-only)", + "type": "string" + }, + "status": { + "description": "status of the device (Read-only)", + "type": "string" + }, + "supportEndDate": { + "description": "Final date the device will be supported (Read-only)", + "format": "date-time", + "type": "string" + }, + "systemRamFreeReports": { + "description": "Reports of amounts of available RAM memory (Read-only)", + "items": { + "properties": { + "reportTime": { + "description": "Date and time the report was received.", + "format": "date-time", + "type": "string" + }, + "systemRamFreeInfo": { + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "systemRamTotal": { + "description": "Total RAM on the device [in bytes] (Read-only)", + "format": "int64", + "type": "string" + }, + "tpmVersionInfo": { + "description": "Trusted Platform Module (TPM) (Read-only)", + "properties": { + "family": { + "description": "TPM family.", + "type": "string" + }, + "firmwareVersion": { + "description": "TPM firmware version.", + "type": "string" + }, + "manufacturer": { + "description": "TPM manufacturer code.", + "type": "string" + }, + "specLevel": { + "description": "TPM specification level.", + "type": "string" + }, + "tpmModel": { + "description": "TPM model number.", + "type": "string" + }, + "vendorSpecific": { + "description": "Vendor-specific information such as Vendor ID.", + "type": "string" + } + }, + "type": "object" + }, + "willAutoRenew": { + "description": "Will Chromebook auto renew after support end date (Read-only)", + "type": "boolean" + } + }, + "type": "object" + }, + "ChromeOsDeviceAction": { + "description": "JSON request template for firing actions on ChromeOs Device in Directory Devices API.", + "id": "ChromeOsDeviceAction", + "properties": { + "action": { + "annotations": { + "required": [ + "directory.chromeosdevices.action" + ] + }, + "description": "Action to be taken on the ChromeOs Device", + "type": "string" + }, + "deprovisionReason": { + "type": "string" + } + }, + "type": "object" + }, + "ChromeOsDevices": { + "description": "JSON response template for List Chrome OS Devices operation in Directory API.", + "id": "ChromeOsDevices", + "properties": { + "chromeosdevices": { + "description": "List of Chrome OS Device objects.", + "items": { + "$ref": "ChromeOsDevice" + }, + "type": "array" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#chromeosdevices", + "description": "Kind of resource this is.", + "type": "string" + }, + "nextPageToken": { + "description": "Token used to access next page of this result.", + "type": "string" + } + }, + "type": "object" + }, + "ChromeOsMoveDevicesToOu": { + "description": "JSON request template for moving ChromeOs Device to given OU in Directory Devices API.", + "id": "ChromeOsMoveDevicesToOu", + "properties": { + "deviceIds": { + "annotations": { + "required": [ + "directory.chromeosdevices.moveDevicesToOu" + ] + }, + "description": "ChromeOs Devices to be moved to OU", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Customer": { + "description": "JSON template for Customer Resource object in Directory API.", + "id": "Customer", + "properties": { + "alternateEmail": { + "description": "The customer's secondary contact email address. This email address cannot be on the same domain as the customerDomain", + "type": "string" + }, + "customerCreationTime": { + "description": "The customer's creation time (Readonly)", + "format": "date-time", + "type": "string" + }, + "customerDomain": { + "description": "The customer's primary domain name string. Do not include the www prefix when creating a new customer.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "id": { + "description": "The unique ID for the customer's G Suite account. (Readonly)", + "type": "string" + }, + "kind": { + "default": "admin#directory#customer", + "description": "Identifies the resource as a customer. Value: admin#directory#customer", + "type": "string" + }, + "language": { + "description": "The customer's ISO 639-2 language code. The default value is en-US", + "type": "string" + }, + "phoneNumber": { + "description": "The customer's contact phone number in E.164 format.", + "type": "string" + }, + "postalAddress": { + "$ref": "CustomerPostalAddress", + "description": "The customer's postal address information." + } + }, + "type": "object" + }, + "CustomerPostalAddress": { + "description": "JSON template for postal address of a customer.", + "id": "CustomerPostalAddress", + "properties": { + "addressLine1": { + "description": "A customer's physical address. The address can be composed of one to three lines.", + "type": "string" + }, + "addressLine2": { + "description": "Address line 2 of the address.", + "type": "string" + }, + "addressLine3": { + "description": "Address line 3 of the address.", + "type": "string" + }, + "contactName": { + "description": "The customer contact's name.", + "type": "string" + }, + "countryCode": { + "description": "This is a required property. For countryCode information see the ISO 3166 country code elements.", + "type": "string" + }, + "locality": { + "description": "Name of the locality. An example of a locality value is the city of San Francisco.", + "type": "string" + }, + "organizationName": { + "description": "The company or company division name.", + "type": "string" + }, + "postalCode": { + "description": "The postal code. A postalCode example is a postal zip code such as 10009. This is in accordance with - http://portablecontacts.net/draft-spec.html#address_element.", + "type": "string" + }, + "region": { + "description": "Name of the region. An example of a region value is NY for the state of New York.", + "type": "string" + } + }, + "type": "object" + }, + "DomainAlias": { + "description": "JSON template for Domain Alias object in Directory API.", + "id": "DomainAlias", + "properties": { + "creationTime": { + "description": "The creation time of the domain alias. (Read-only).", + "format": "int64", + "type": "string" + }, + "domainAliasName": { + "description": "The domain alias name.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#domainAlias", + "description": "Kind of resource this is.", + "type": "string" + }, + "parentDomainName": { + "annotations": { + "required": [ + "directory.domains.insert" + ] + }, + "description": "The parent domain name that the domain alias is associated with. This can either be a primary or secondary domain name within a customer.", + "type": "string" + }, + "verified": { + "description": "Indicates the verification state of a domain alias. (Read-only)", + "type": "boolean" + } + }, + "type": "object" + }, + "DomainAliases": { + "description": "JSON response template to list domain aliases in Directory API.", + "id": "DomainAliases", + "properties": { + "domainAliases": { + "description": "List of domain alias objects.", + "items": { + "$ref": "DomainAlias" + }, + "type": "array" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#domainAliases", + "description": "Kind of resource this is.", + "type": "string" + } + }, + "type": "object" + }, + "Domains": { + "description": "JSON template for Domain object in Directory API.", + "id": "Domains", + "properties": { + "creationTime": { + "description": "Creation time of the domain. (Read-only).", + "format": "int64", + "type": "string" + }, + "domainAliases": { + "description": "List of domain alias objects. (Read-only)", + "items": { + "$ref": "DomainAlias" + }, + "type": "array" + }, + "domainName": { + "annotations": { + "required": [ + "directory.domains.insert" + ] + }, + "description": "The domain name of the customer.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "isPrimary": { + "description": "Indicates if the domain is a primary domain (Read-only).", + "type": "boolean" + }, + "kind": { + "default": "admin#directory#domain", + "description": "Kind of resource this is.", + "type": "string" + }, + "verified": { + "description": "Indicates the verification state of a domain. (Read-only).", + "type": "boolean" + } + }, + "type": "object" + }, + "Domains2": { + "description": "JSON response template to list Domains in Directory API.", + "id": "Domains2", + "properties": { + "domains": { + "description": "List of domain objects.", + "items": { + "$ref": "Domains" + }, + "type": "array" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#domains", + "description": "Kind of resource this is.", + "type": "string" + } + }, + "type": "object" + }, + "Feature": { + "description": "JSON template for Feature object in Directory API.", + "id": "Feature", + "properties": { + "etags": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#resources#features#Feature", + "description": "Kind of resource this is.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "directory.resources.features.insert" + ] + }, + "description": "The name of the feature.", + "type": "string" + } + }, + "type": "object" + }, + "FeatureInstance": { + "description": "JSON template for a \"feature instance\".", + "id": "FeatureInstance", + "properties": { + "feature": { + "$ref": "Feature", + "description": "The feature that this is an instance of. A calendar resource may have multiple instances of a feature." + } + }, + "type": "object" + }, + "FeatureRename": { + "description": "JSON request template for renaming a feature.", + "id": "FeatureRename", + "properties": { + "newName": { + "annotations": { + "required": [ + "directory.resources.features.rename" + ] + }, + "description": "New name of the feature.", + "type": "string" + } + }, + "type": "object" + }, + "Features": { + "description": "JSON template for Feature List Response object in Directory API.", + "id": "Features", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "features": { + "description": "The Features in this page of results.", + "items": { + "$ref": "Feature" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#resources#features#featuresList", + "description": "Kind of resource this is.", + "type": "string" + }, + "nextPageToken": { + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "Group": { + "description": "JSON template for Group resource in Directory API.", + "id": "Group", + "properties": { + "adminCreated": { + "description": "Is the group created by admin (Read-only) *", + "type": "boolean" + }, + "aliases": { + "description": "List of aliases (Read-only)", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Description of the group", + "type": "string" + }, + "directMembersCount": { + "description": "Group direct members count", + "format": "int64", + "type": "string" + }, + "email": { + "annotations": { + "required": [ + "directory.groups.insert" + ] + }, + "description": "Email of Group", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "id": { + "description": "Unique identifier of Group (Read-only)", + "type": "string" + }, + "kind": { + "default": "admin#directory#group", + "description": "Kind of resource this is.", + "type": "string" + }, + "name": { + "description": "Group name", + "type": "string" + }, + "nonEditableAliases": { + "description": "List of non editable aliases (Read-only)", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Groups": { + "description": "JSON response template for List Groups operation in Directory API.", + "id": "Groups", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "groups": { + "description": "List of group objects.", + "items": { + "$ref": "Group" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#groups", + "description": "Kind of resource this is.", + "type": "string" + }, + "nextPageToken": { + "description": "Token used to access next page of this result.", + "type": "string" + } + }, + "type": "object" + }, + "Member": { + "description": "JSON template for Member resource in Directory API.", + "id": "Member", + "properties": { + "delivery_settings": { + "description": "Delivery settings of member", + "type": "string" + }, + "email": { + "description": "Email of member (Read-only)", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "id": { + "description": "The unique ID of the group member. A member id can be used as a member request URI's memberKey. Unique identifier of group (Read-only) Unique identifier of member (Read-only)", + "type": "string" + }, + "kind": { + "default": "admin#directory#member", + "description": "Kind of resource this is.", + "type": "string" + }, + "role": { + "description": "Role of member", + "type": "string" + }, + "status": { + "description": "Status of member (Immutable)", + "type": "string" + }, + "type": { + "description": "Type of member (Immutable)", + "type": "string" + } + }, + "type": "object" + }, + "Members": { + "description": "JSON response template for List Members operation in Directory API.", + "id": "Members", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#members", + "description": "Kind of resource this is.", + "type": "string" + }, + "members": { + "description": "List of member objects.", + "items": { + "$ref": "Member" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token used to access next page of this result.", + "type": "string" + } + }, + "type": "object" + }, + "MembersHasMember": { + "description": "JSON template for Has Member response in Directory API.", + "id": "MembersHasMember", + "properties": { + "isMember": { + "description": "Identifies whether the given user is a member of the group. Membership can be direct or nested.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "MobileDevice": { + "description": "JSON template for Mobile Device resource in Directory API.", + "id": "MobileDevice", + "properties": { + "adbStatus": { + "description": "Adb (USB debugging) enabled or disabled on device (Read-only)", + "type": "boolean" + }, + "applications": { + "description": "List of applications installed on Mobile Device", + "items": { + "properties": { + "displayName": { + "description": "Display name of application", + "type": "string" + }, + "packageName": { + "description": "Package name of application", + "type": "string" + }, + "permission": { + "description": "List of Permissions for application", + "items": { + "type": "string" + }, + "type": "array" + }, + "versionCode": { + "description": "Version code of application", + "format": "int32", + "type": "integer" + }, + "versionName": { + "description": "Version name of application", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "basebandVersion": { + "description": "Mobile Device Baseband version (Read-only)", + "type": "string" + }, + "bootloaderVersion": { + "description": "Mobile Device Bootloader version (Read-only)", + "type": "string" + }, + "brand": { + "description": "Mobile Device Brand (Read-only)", + "type": "string" + }, + "buildNumber": { + "description": "Mobile Device Build number (Read-only)", + "type": "string" + }, + "defaultLanguage": { + "description": "The default locale used on the Mobile Device (Read-only)", + "type": "string" + }, + "developerOptionsStatus": { + "description": "Developer options enabled or disabled on device (Read-only)", + "type": "boolean" + }, + "deviceCompromisedStatus": { + "description": "Mobile Device compromised status (Read-only)", + "type": "string" + }, + "deviceId": { + "description": "Mobile Device serial number (Read-only)", + "type": "string" + }, + "devicePasswordStatus": { + "description": "DevicePasswordStatus (Read-only)", + "type": "string" + }, + "email": { + "description": "List of owner user's email addresses (Read-only)", + "items": { + "type": "string" + }, + "type": "array" + }, + "encryptionStatus": { + "description": "Mobile Device Encryption Status (Read-only)", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "firstSync": { + "description": "Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only)", + "format": "date-time", + "type": "string" + }, + "hardware": { + "description": "Mobile Device Hardware (Read-only)", + "type": "string" + }, + "hardwareId": { + "description": "Mobile Device Hardware Id (Read-only)", + "type": "string" + }, + "imei": { + "description": "Mobile Device IMEI number (Read-only)", + "type": "string" + }, + "kernelVersion": { + "description": "Mobile Device Kernel version (Read-only)", + "type": "string" + }, + "kind": { + "default": "admin#directory#mobiledevice", + "description": "Kind of resource this is.", + "type": "string" + }, + "lastSync": { + "description": "Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)", + "format": "date-time", + "type": "string" + }, + "managedAccountIsOnOwnerProfile": { + "description": "Boolean indicating if this account is on owner/primary profile or not (Read-only)", + "type": "boolean" + }, + "manufacturer": { + "description": "Mobile Device manufacturer (Read-only)", + "type": "string" + }, + "meid": { + "description": "Mobile Device MEID number (Read-only)", + "type": "string" + }, + "model": { + "description": "Name of the model of the device", + "type": "string" + }, + "name": { + "description": "List of owner user's names (Read-only)", + "items": { + "type": "string" + }, + "type": "array" + }, + "networkOperator": { + "description": "Mobile Device mobile or network operator (if available) (Read-only)", + "type": "string" + }, + "os": { + "description": "Name of the mobile operating system", + "type": "string" + }, + "otherAccountsInfo": { + "description": "List of accounts added on device (Read-only)", + "items": { + "type": "string" + }, + "type": "array" + }, + "privilege": { + "description": "DMAgentPermission (Read-only)", + "type": "string" + }, + "releaseVersion": { + "description": "Mobile Device release version version (Read-only)", + "type": "string" + }, + "resourceId": { + "description": "Unique identifier of Mobile Device (Read-only)", + "type": "string" + }, + "securityPatchLevel": { + "description": "Mobile Device Security patch level (Read-only)", + "format": "int64", + "type": "string" + }, + "serialNumber": { + "description": "Mobile Device SSN or Serial Number (Read-only)", + "type": "string" + }, + "status": { + "description": "Status of the device (Read-only)", + "type": "string" + }, + "supportsWorkProfile": { + "description": "Work profile supported on device (Read-only)", + "type": "boolean" + }, + "type": { + "description": "The type of device (Read-only)", + "type": "string" + }, + "unknownSourcesStatus": { + "description": "Unknown sources enabled or disabled on device (Read-only)", + "type": "boolean" + }, + "userAgent": { + "description": "Mobile Device user agent", + "type": "string" + }, + "wifiMacAddress": { + "description": "Mobile Device WiFi MAC address (Read-only)", + "type": "string" + } + }, + "type": "object" + }, + "MobileDeviceAction": { + "description": "JSON request template for firing commands on Mobile Device in Directory Devices API.", + "id": "MobileDeviceAction", + "properties": { + "action": { + "annotations": { + "required": [ + "directory.mobiledevices.action" + ] + }, + "description": "Action to be taken on the Mobile Device", + "type": "string" + } + }, + "type": "object" + }, + "MobileDevices": { + "description": "JSON response template for List Mobile Devices operation in Directory API.", + "id": "MobileDevices", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#mobiledevices", + "description": "Kind of resource this is.", + "type": "string" + }, + "mobiledevices": { + "description": "List of Mobile Device objects.", + "items": { + "$ref": "MobileDevice" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token used to access next page of this result.", + "type": "string" + } + }, + "type": "object" + }, + "Notification": { + "description": "Template for a notification resource.", + "id": "Notification", + "properties": { + "body": { + "description": "Body of the notification (Read-only)", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "fromAddress": { + "description": "Address from which the notification is received (Read-only)", + "type": "string" + }, + "isUnread": { + "annotations": { + "required": [ + "directory.notifications.patch", + "directory.notifications.update" + ] + }, + "description": "Boolean indicating whether the notification is unread or not.", + "type": "boolean" + }, + "kind": { + "default": "admin#directory#notification", + "description": "The type of the resource.", + "type": "string" + }, + "notificationId": { + "type": "string" + }, + "sendTime": { + "description": "Time at which notification was sent (Read-only)", + "format": "date-time", + "type": "string" + }, + "subject": { + "description": "Subject of the notification (Read-only)", + "type": "string" + } + }, + "type": "object" + }, + "Notifications": { + "description": "Template for notifications list response.", + "id": "Notifications", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "List of notifications in this page.", + "items": { + "$ref": "Notification" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#notifications", + "description": "The type of the resource.", + "type": "string" + }, + "nextPageToken": { + "description": "Token for fetching the next page of notifications.", + "type": "string" + }, + "unreadNotificationsCount": { + "description": "Number of unread notification for the domain.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "OrgUnit": { + "description": "JSON template for Org Unit resource in Directory API.", + "id": "OrgUnit", + "properties": { + "blockInheritance": { + "description": "Should block inheritance", + "type": "boolean" + }, + "description": { + "description": "Description of OrgUnit", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#orgUnit", + "description": "Kind of resource this is.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "directory.orgunits.insert" + ] + }, + "description": "Name of OrgUnit", + "type": "string" + }, + "orgUnitId": { + "description": "Id of OrgUnit", + "type": "string" + }, + "orgUnitPath": { + "description": "Path of OrgUnit", + "type": "string" + }, + "parentOrgUnitId": { + "description": "Id of parent OrgUnit", + "type": "string" + }, + "parentOrgUnitPath": { + "description": "Path of parent OrgUnit", + "type": "string" + } + }, + "type": "object" + }, + "OrgUnits": { + "description": "JSON response template for List Organization Units operation in Directory API.", + "id": "OrgUnits", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#orgUnits", + "description": "Kind of resource this is.", + "type": "string" + }, + "organizationUnits": { + "description": "List of user objects.", + "items": { + "$ref": "OrgUnit" + }, + "type": "array" + } + }, + "type": "object" + }, + "Privilege": { + "description": "JSON template for privilege resource in Directory API.", + "id": "Privilege", + "properties": { + "childPrivileges": { + "description": "A list of child privileges. Privileges for a service form a tree. Each privilege can have a list of child privileges; this list is empty for a leaf privilege.", + "items": { + "$ref": "Privilege" + }, + "type": "array" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "isOuScopable": { + "description": "If the privilege can be restricted to an organization unit.", + "type": "boolean" + }, + "kind": { + "default": "admin#directory#privilege", + "description": "The type of the API resource. This is always admin#directory#privilege.", + "type": "string" + }, + "privilegeName": { + "description": "The name of the privilege.", + "type": "string" + }, + "serviceId": { + "description": "The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().", + "type": "string" + }, + "serviceName": { + "description": "The name of the service this privilege is for.", + "type": "string" + } + }, + "type": "object" + }, + "Privileges": { + "description": "JSON response template for List privileges operation in Directory API.", + "id": "Privileges", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "A list of Privilege resources.", + "items": { + "$ref": "Privilege" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#privileges", + "description": "The type of the API resource. This is always admin#directory#privileges.", + "type": "string" + } + }, + "type": "object" + }, + "Role": { + "description": "JSON template for role resource in Directory API.", + "id": "Role", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "isSuperAdminRole": { + "description": "Returns true if the role is a super admin role.", + "type": "boolean" + }, + "isSystemRole": { + "description": "Returns true if this is a pre-defined system role.", + "type": "boolean" + }, + "kind": { + "default": "admin#directory#role", + "description": "The type of the API resource. This is always admin#directory#role.", + "type": "string" + }, + "roleDescription": { + "description": "A short description of the role.", + "type": "string" + }, + "roleId": { + "description": "ID of the role.", + "format": "int64", + "type": "string" + }, + "roleName": { + "annotations": { + "required": [ + "directory.roles.insert" + ] + }, + "description": "Name of the role.", + "type": "string" + }, + "rolePrivileges": { + "annotations": { + "required": [ + "directory.roles.insert" + ] + }, + "description": "The set of privileges that are granted to this role.", + "items": { + "properties": { + "privilegeName": { + "description": "The name of the privilege.", + "type": "string" + }, + "serviceId": { + "description": "The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "RoleAssignment": { + "description": "JSON template for roleAssignment resource in Directory API.", + "id": "RoleAssignment", + "properties": { + "assignedTo": { + "description": "The unique ID of the user this role is assigned to.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#roleAssignment", + "description": "The type of the API resource. This is always admin#directory#roleAssignment.", + "type": "string" + }, + "orgUnitId": { + "description": "If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to.", + "type": "string" + }, + "roleAssignmentId": { + "description": "ID of this roleAssignment.", + "format": "int64", + "type": "string" + }, + "roleId": { + "description": "The ID of the role that is assigned.", + "format": "int64", + "type": "string" + }, + "scopeType": { + "description": "The scope in which this role is assigned. Possible values are: \n- CUSTOMER\n- ORG_UNIT", + "type": "string" + } + }, + "type": "object" + }, + "RoleAssignments": { + "description": "JSON response template for List roleAssignments operation in Directory API.", + "id": "RoleAssignments", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "A list of RoleAssignment resources.", + "items": { + "$ref": "RoleAssignment" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#roleAssignments", + "description": "The type of the API resource. This is always admin#directory#roleAssignments.", + "type": "string" + }, + "nextPageToken": { + "type": "string" + } + }, + "type": "object" + }, + "Roles": { + "description": "JSON response template for List roles operation in Directory API.", + "id": "Roles", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "A list of Role resources.", + "items": { + "$ref": "Role" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#roles", + "description": "The type of the API resource. This is always admin#directory#roles.", + "type": "string" + }, + "nextPageToken": { + "type": "string" + } + }, + "type": "object" + }, + "Schema": { + "description": "JSON template for Schema resource in Directory API.", + "id": "Schema", + "properties": { + "displayName": { + "annotations": { + "required": [ + "directory.schemas.insert" + ] + }, + "description": "Display name for the schema.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "fields": { + "annotations": { + "required": [ + "directory.schemas.insert", + "directory.schemas.update" + ] + }, + "description": "Fields of Schema", + "items": { + "$ref": "SchemaFieldSpec" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#schema", + "description": "Kind of resource this is.", + "type": "string" + }, + "schemaId": { + "description": "Unique identifier of Schema (Read-only)", + "type": "string" + }, + "schemaName": { + "annotations": { + "required": [ + "directory.schemas.insert" + ] + }, + "description": "Schema name", + "type": "string" + } + }, + "type": "object" + }, + "SchemaFieldSpec": { + "description": "JSON template for FieldSpec resource for Schemas in Directory API.", + "id": "SchemaFieldSpec", + "properties": { + "displayName": { + "annotations": { + "required": [ + "directory.schemas.insert", + "directory.schemas.update" + ] + }, + "description": "Display Name of the field.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "fieldId": { + "description": "Unique identifier of Field (Read-only)", + "type": "string" + }, + "fieldName": { + "annotations": { + "required": [ + "directory.schemas.insert", + "directory.schemas.update" + ] + }, + "description": "Name of the field.", + "type": "string" + }, + "fieldType": { + "annotations": { + "required": [ + "directory.schemas.insert", + "directory.schemas.update" + ] + }, + "description": "Type of the field.", + "type": "string" + }, + "indexed": { + "default": "true", + "description": "Boolean specifying whether the field is indexed or not.", + "type": "boolean" + }, + "kind": { + "default": "admin#directory#schema#fieldspec", + "description": "Kind of resource this is.", + "type": "string" + }, + "multiValued": { + "description": "Boolean specifying whether this is a multi-valued field or not.", + "type": "boolean" + }, + "numericIndexingSpec": { + "description": "Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.", + "properties": { + "maxValue": { + "description": "Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.", + "format": "double", + "type": "number" + }, + "minValue": { + "description": "Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "readAccessType": { + "default": "ALL_DOMAIN_USERS", + "description": "Read ACLs on the field specifying who can view values of this field. Valid values are \"ALL_DOMAIN_USERS\" and \"ADMINS_AND_SELF\".", + "type": "string" + } + }, + "type": "object" + }, + "Schemas": { + "description": "JSON response template for List Schema operation in Directory API.", + "id": "Schemas", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#schemas", + "description": "Kind of resource this is.", + "type": "string" + }, + "schemas": { + "description": "List of UserSchema objects.", + "items": { + "$ref": "Schema" + }, + "type": "array" + } + }, + "type": "object" + }, + "Token": { + "description": "JSON template for token resource in Directory API.", + "id": "Token", + "properties": { + "anonymous": { + "description": "Whether the application is registered with Google. The value is true if the application has an anonymous Client ID.", + "type": "boolean" + }, + "clientId": { + "description": "The Client ID of the application the token is issued to.", + "type": "string" + }, + "displayText": { + "description": "The displayable name of the application the token is issued to.", + "type": "string" + }, + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#token", + "description": "The type of the API resource. This is always admin#directory#token.", + "type": "string" + }, + "nativeApp": { + "description": "Whether the token is issued to an installed application. The value is true if the application is installed to a desktop or mobile device.", + "type": "boolean" + }, + "scopes": { + "description": "A list of authorization scopes the application is granted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "userKey": { + "description": "The unique ID of the user that issued the token.", + "type": "string" + } + }, + "type": "object" + }, + "Tokens": { + "description": "JSON response template for List tokens operation in Directory API.", + "id": "Tokens", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "A list of Token resources.", + "items": { + "$ref": "Token" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#tokenList", + "description": "The type of the API resource. This is always admin#directory#tokenList.", + "type": "string" + } + }, + "type": "object" + }, + "User": { + "description": "JSON template for User object in Directory API.", + "id": "User", + "properties": { + "addresses": { + "type": "any" + }, + "agreedToTerms": { + "description": "Indicates if user has agreed to terms (Read-only)", + "readOnly": true, + "type": "boolean" + }, + "aliases": { + "description": "List of aliases (Read-only)", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "archived": { + "description": "Indicates if user is archived.", + "type": "boolean" + }, + "changePasswordAtNextLogin": { + "description": "Boolean indicating if the user should change password in next login", + "type": "boolean" + }, + "creationTime": { + "description": "User's G Suite account creation time. (Read-only)", + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "customSchemas": { + "additionalProperties": { + "$ref": "UserCustomProperties" + }, + "description": "Custom fields of the user.", + "type": "object" + }, + "customerId": { + "description": "CustomerId of User (Read-only)", + "readOnly": true, + "type": "string" + }, + "deletionTime": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "emails": { + "type": "any" + }, + "etag": { + "description": "ETag of the resource.", + "readOnly": true, + "type": "string" + }, + "externalIds": { + "type": "any" + }, + "gender": { + "type": "any" + }, + "hashFunction": { + "description": "Hash function name for password. Supported are MD5, SHA-1 and crypt", + "type": "string" + }, + "id": { + "description": "Unique identifier of User (Read-only)", + "type": "string" + }, + "ims": { + "type": "any" + }, + "includeInGlobalAddressList": { + "description": "Boolean indicating if user is included in Global Address List", + "type": "boolean" + }, + "ipWhitelisted": { + "description": "Boolean indicating if ip is whitelisted", + "type": "boolean" + }, + "isAdmin": { + "description": "Boolean indicating if the user is admin (Read-only)", + "readOnly": true, + "type": "boolean" + }, + "isDelegatedAdmin": { + "description": "Boolean indicating if the user is delegated admin (Read-only)", + "readOnly": true, + "type": "boolean" + }, + "isEnforcedIn2Sv": { + "description": "Is 2-step verification enforced (Read-only)", + "readOnly": true, + "type": "boolean" + }, + "isEnrolledIn2Sv": { + "description": "Is enrolled in 2-step verification (Read-only)", + "readOnly": true, + "type": "boolean" + }, + "isMailboxSetup": { + "description": "Is mailbox setup (Read-only)", + "readOnly": true, + "type": "boolean" + }, + "keywords": { + "type": "any" + }, + "kind": { + "default": "admin#directory#user", + "description": "Kind of resource this is.", + "readOnly": true, + "type": "string" + }, + "languages": { + "type": "any" + }, + "lastLoginTime": { + "description": "User's last login time. (Read-only)", + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "locations": { + "type": "any" + }, + "name": { + "$ref": "UserName", + "annotations": { + "required": [ + "directory.users.insert" + ] + }, + "description": "User's name" + }, + "nonEditableAliases": { + "description": "List of non editable aliases (Read-only)", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "notes": { + "type": "any" + }, + "orgUnitPath": { + "description": "OrgUnit of User", + "type": "string" + }, + "organizations": { + "type": "any" + }, + "password": { + "annotations": { + "required": [ + "directory.users.insert" + ] + }, + "description": "User's password", + "type": "string" + }, + "phones": { + "type": "any" + }, + "posixAccounts": { + "type": "any" + }, + "primaryEmail": { + "annotations": { + "required": [ + "directory.users.insert" + ] + }, + "description": "username of User", + "type": "string" + }, + "recoveryEmail": { + "description": "Recovery email of the user.", + "type": "string" + }, + "recoveryPhone": { + "description": "Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.", + "type": "string" + }, + "relations": { + "type": "any" + }, + "sshPublicKeys": { + "type": "any" + }, + "suspended": { + "description": "Indicates if user is suspended.", + "type": "boolean" + }, + "suspensionReason": { + "description": "Suspension reason if user is suspended (Read-only)", + "readOnly": true, + "type": "string" + }, + "thumbnailPhotoEtag": { + "description": "ETag of the user's photo (Read-only)", + "readOnly": true, + "type": "string" + }, + "thumbnailPhotoUrl": { + "description": "Photo Url of the user (Read-only)", + "readOnly": true, + "type": "string" + }, + "websites": { + "type": "any" + } + }, + "type": "object" + }, + "UserAbout": { + "description": "JSON template for About (notes) of a user in Directory API.", + "id": "UserAbout", + "properties": { + "contentType": { + "description": "About entry can have a type which indicates the content type. It can either be plain or html. By default, notes contents are assumed to contain plain text.", + "type": "string" + }, + "value": { + "description": "Actual value of notes.", + "type": "string" + } + }, + "type": "object" + }, + "UserAddress": { + "description": "JSON template for address.", + "id": "UserAddress", + "properties": { + "country": { + "description": "Country.", + "type": "string" + }, + "countryCode": { + "description": "Country code.", + "type": "string" + }, + "customType": { + "description": "Custom type.", + "type": "string" + }, + "extendedAddress": { + "description": "Extended Address.", + "type": "string" + }, + "formatted": { + "description": "Formatted address.", + "type": "string" + }, + "locality": { + "description": "Locality.", + "type": "string" + }, + "poBox": { + "description": "Other parts of address.", + "type": "string" + }, + "postalCode": { + "description": "Postal code.", + "type": "string" + }, + "primary": { + "description": "If this is user's primary address. Only one entry could be marked as primary.", + "type": "boolean" + }, + "region": { + "description": "Region.", + "type": "string" + }, + "sourceIsStructured": { + "description": "User supplied address was structured. Structured addresses are NOT supported at this time. You might be able to write structured addresses, but any values will eventually be clobbered.", + "type": "boolean" + }, + "streetAddress": { + "description": "Street.", + "type": "string" + }, + "type": { + "description": "Each entry can have a type which indicates standard values of that entry. For example address could be of home, work etc. In addition to the standard type, an entry can have a custom type and can take any value. Such type should have the CUSTOM value as type and also have a customType value.", + "type": "string" + } + }, + "type": "object" + }, + "UserCustomProperties": { + "additionalProperties": { + "type": "any" + }, + "description": "JSON template for a set of custom properties (i.e. all fields in a particular schema)", + "id": "UserCustomProperties", + "type": "object" + }, + "UserEmail": { + "description": "JSON template for an email.", + "id": "UserEmail", + "properties": { + "address": { + "description": "Email id of the user.", + "type": "string" + }, + "customType": { + "description": "Custom Type.", + "type": "string" + }, + "primary": { + "description": "If this is user's primary email. Only one entry could be marked as primary.", + "type": "boolean" + }, + "type": { + "description": "Each entry can have a type which indicates standard types of that entry. For example email could be of home, work etc. In addition to the standard type, an entry can have a custom type and can take any value Such types should have the CUSTOM value as type and also have a customType value.", + "type": "string" + } + }, + "type": "object" + }, + "UserExternalId": { + "description": "JSON template for an externalId entry.", + "id": "UserExternalId", + "properties": { + "customType": { + "description": "Custom type.", + "type": "string" + }, + "type": { + "description": "The type of the Id.", + "type": "string" + }, + "value": { + "description": "The value of the id.", + "type": "string" + } + }, + "type": "object" + }, + "UserGender": { + "id": "UserGender", + "properties": { + "addressMeAs": { + "description": "AddressMeAs. A human-readable string containing the proper way to refer to the profile owner by humans, for example \"he/him/his\" or \"they/them/their\".", + "type": "string" + }, + "customGender": { + "description": "Custom gender.", + "type": "string" + }, + "type": { + "description": "Gender.", + "type": "string" + } + }, + "type": "object" + }, + "UserIm": { + "description": "JSON template for instant messenger of an user.", + "id": "UserIm", + "properties": { + "customProtocol": { + "description": "Custom protocol.", + "type": "string" + }, + "customType": { + "description": "Custom type.", + "type": "string" + }, + "im": { + "description": "Instant messenger id.", + "type": "string" + }, + "primary": { + "description": "If this is user's primary im. Only one entry could be marked as primary.", + "type": "boolean" + }, + "protocol": { + "description": "Protocol used in the instant messenger. It should be one of the values from ImProtocolTypes map. Similar to type, it can take a CUSTOM value and specify the custom name in customProtocol field.", + "type": "string" + }, + "type": { + "description": "Each entry can have a type which indicates standard types of that entry. For example instant messengers could be of home, work etc. In addition to the standard type, an entry can have a custom type and can take any value. Such types should have the CUSTOM value as type and also have a customType value.", + "type": "string" + } + }, + "type": "object" + }, + "UserKeyword": { + "description": "JSON template for a keyword entry.", + "id": "UserKeyword", + "properties": { + "customType": { + "description": "Custom Type.", + "type": "string" + }, + "type": { + "description": "Each entry can have a type which indicates standard type of that entry. For example, keyword could be of type occupation or outlook. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value.", + "type": "string" + }, + "value": { + "description": "Keyword.", + "type": "string" + } + }, + "type": "object" + }, + "UserLanguage": { + "description": "JSON template for a language entry.", + "id": "UserLanguage", + "properties": { + "customLanguage": { + "description": "Other language. User can provide own language name if there is no corresponding Google III language code. If this is set LanguageCode can't be set", + "type": "string" + }, + "languageCode": { + "description": "Language Code. Should be used for storing Google III LanguageCode string representation for language. Illegal values cause SchemaException.", + "type": "string" + } + }, + "type": "object" + }, + "UserLocation": { + "description": "JSON template for a location entry.", + "id": "UserLocation", + "properties": { + "area": { + "description": "Textual location. This is most useful for display purposes to concisely describe the location. For example, \"Mountain View, CA\", \"Near Seattle\", \"US-NYC-9TH 9A209A\".", + "type": "string" + }, + "buildingId": { + "description": "Building Identifier.", + "type": "string" + }, + "customType": { + "description": "Custom Type.", + "type": "string" + }, + "deskCode": { + "description": "Most specific textual code of individual desk location.", + "type": "string" + }, + "floorName": { + "description": "Floor name/number.", + "type": "string" + }, + "floorSection": { + "description": "Floor section. More specific location within the floor. For example, if a floor is divided into sections \"A\", \"B\", and \"C\", this field would identify one of those values.", + "type": "string" + }, + "type": { + "description": "Each entry can have a type which indicates standard types of that entry. For example location could be of types default and desk. In addition to standard type, an entry can have a custom type and can give it any name. Such types should have \"custom\" as type and also have a customType value.", + "type": "string" + } + }, + "type": "object" + }, + "UserMakeAdmin": { + "description": "JSON request template for setting/revoking admin status of a user in Directory API.", + "id": "UserMakeAdmin", + "properties": { + "status": { + "annotations": { + "required": [ + "directory.users.makeAdmin" + ] + }, + "description": "Boolean indicating new admin status of the user", + "type": "boolean" + } + }, + "type": "object" + }, + "UserName": { + "description": "JSON template for name of a user in Directory API.", + "id": "UserName", + "properties": { + "familyName": { + "annotations": { + "required": [ + "directory.users.insert" + ] + }, + "description": "Last Name", + "type": "string" + }, + "fullName": { + "description": "Full Name", + "type": "string" + }, + "givenName": { + "annotations": { + "required": [ + "directory.users.insert" + ] + }, + "description": "First Name", + "type": "string" + } + }, + "type": "object" + }, + "UserOrganization": { + "description": "JSON template for an organization entry.", + "id": "UserOrganization", + "properties": { + "costCenter": { + "description": "The cost center of the users department.", + "type": "string" + }, + "customType": { + "description": "Custom type.", + "type": "string" + }, + "department": { + "description": "Department within the organization.", + "type": "string" + }, + "description": { + "description": "Description of the organization.", + "type": "string" + }, + "domain": { + "description": "The domain to which the organization belongs to.", + "type": "string" + }, + "fullTimeEquivalent": { + "description": "The full-time equivalent millipercent within the organization (100000 = 100%).", + "format": "int32", + "type": "integer" + }, + "location": { + "description": "Location of the organization. This need not be fully qualified address.", + "type": "string" + }, + "name": { + "description": "Name of the organization", + "type": "string" + }, + "primary": { + "description": "If it user's primary organization.", + "type": "boolean" + }, + "symbol": { + "description": "Symbol of the organization.", + "type": "string" + }, + "title": { + "description": "Title (designation) of the user in the organization.", + "type": "string" + }, + "type": { + "description": "Each entry can have a type which indicates standard types of that entry. For example organization could be of school, work etc. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a CustomType value.", + "type": "string" + } + }, + "type": "object" + }, + "UserPhone": { + "description": "JSON template for a phone entry.", + "id": "UserPhone", + "properties": { + "customType": { + "description": "Custom Type.", + "type": "string" + }, + "primary": { + "description": "If this is user's primary phone or not.", + "type": "boolean" + }, + "type": { + "description": "Each entry can have a type which indicates standard types of that entry. For example phone could be of home_fax, work, mobile etc. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value.", + "type": "string" + }, + "value": { + "description": "Phone number.", + "type": "string" + } + }, + "type": "object" + }, + "UserPhoto": { + "description": "JSON template for Photo object in Directory API.", + "id": "UserPhoto", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "height": { + "description": "Height in pixels of the photo", + "format": "int32", + "type": "integer" + }, + "id": { + "description": "Unique identifier of User (Read-only)", + "type": "string" + }, + "kind": { + "default": "admin#directory#user#photo", + "description": "Kind of resource this is.", + "type": "string" + }, + "mimeType": { + "description": "Mime Type of the photo", + "type": "string" + }, + "photoData": { + "annotations": { + "required": [ + "directory.users.photos.update" + ] + }, + "description": "Base64 encoded photo data", + "format": "byte", + "type": "string" + }, + "primaryEmail": { + "description": "Primary email of User (Read-only)", + "type": "string" + }, + "width": { + "description": "Width in pixels of the photo", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "UserPosixAccount": { + "description": "JSON template for a POSIX account entry. Description of the field family: go/fbs-posix.", + "id": "UserPosixAccount", + "properties": { + "accountId": { + "description": "A POSIX account field identifier.", + "type": "string" + }, + "gecos": { + "description": "The GECOS (user information) for this account.", + "type": "string" + }, + "gid": { + "description": "The default group ID.", + "format": "uint64", + "type": "string" + }, + "homeDirectory": { + "description": "The path to the home directory for this account.", + "type": "string" + }, + "operatingSystemType": { + "description": "The operating system type for this account.", + "type": "string" + }, + "primary": { + "description": "If this is user's primary account within the SystemId.", + "type": "boolean" + }, + "shell": { + "description": "The path to the login shell for this account.", + "type": "string" + }, + "systemId": { + "description": "System identifier for which account Username or Uid apply to.", + "type": "string" + }, + "uid": { + "description": "The POSIX compliant user ID.", + "format": "uint64", + "type": "string" + }, + "username": { + "description": "The username of the account.", + "type": "string" + } + }, + "type": "object" + }, + "UserRelation": { + "description": "JSON template for a relation entry.", + "id": "UserRelation", + "properties": { + "customType": { + "description": "Custom Type.", + "type": "string" + }, + "type": { + "description": "The relation of the user. Some of the possible values are mother, father, sister, brother, manager, assistant, partner.", + "type": "string" + }, + "value": { + "description": "The name of the relation.", + "type": "string" + } + }, + "type": "object" + }, + "UserSshPublicKey": { + "description": "JSON template for a POSIX account entry.", + "id": "UserSshPublicKey", + "properties": { + "expirationTimeUsec": { + "description": "An expiration time in microseconds since epoch.", + "format": "int64", + "type": "string" + }, + "fingerprint": { + "description": "A SHA-256 fingerprint of the SSH public key. (Read-only)", + "readOnly": true, + "type": "string" + }, + "key": { + "description": "An SSH public key.", + "type": "string" + } + }, + "type": "object" + }, + "UserUndelete": { + "description": "JSON request template to undelete a user in Directory API.", + "id": "UserUndelete", + "properties": { + "orgUnitPath": { + "description": "OrgUnit of User", + "type": "string" + } + }, + "type": "object" + }, + "UserWebsite": { + "description": "JSON template for a website entry.", + "id": "UserWebsite", + "properties": { + "customType": { + "description": "Custom Type.", + "type": "string" + }, + "primary": { + "description": "If this is user's primary website or not.", + "type": "boolean" + }, + "type": { + "description": "Each entry can have a type which indicates standard types of that entry. For example website could be of home, work, blog etc. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value.", + "type": "string" + }, + "value": { + "description": "Website.", + "type": "string" + } + }, + "type": "object" + }, + "Users": { + "description": "JSON response template for List Users operation in Apps Directory API.", + "id": "Users", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#users", + "description": "Kind of resource this is.", + "type": "string" + }, + "nextPageToken": { + "description": "Token used to access next page of this result.", + "type": "string" + }, + "trigger_event": { + "description": "Event that triggered this response (only used in case of Push Response)", + "type": "string" + }, + "users": { + "description": "List of user objects.", + "items": { + "$ref": "User" + }, + "type": "array" + } + }, + "type": "object" + }, + "VerificationCode": { + "description": "JSON template for verification codes in Directory API.", + "id": "VerificationCode", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "kind": { + "default": "admin#directory#verificationCode", + "description": "The type of the resource. This is always admin#directory#verificationCode.", + "type": "string" + }, + "userId": { + "description": "The obfuscated unique ID of the user.", + "type": "string" + }, + "verificationCode": { + "description": "A current verification code for the user. Invalidated or used verification codes are not returned as part of the result.", + "type": "string" + } + }, + "type": "object" + }, + "VerificationCodes": { + "description": "JSON response template for List verification codes operation in Directory API.", + "id": "VerificationCodes", + "properties": { + "etag": { + "description": "ETag of the resource.", + "type": "string" + }, + "items": { + "description": "A list of verification code resources.", + "items": { + "$ref": "VerificationCode" + }, + "type": "array" + }, + "kind": { + "default": "admin#directory#verificationCodesList", + "description": "The type of the resource. This is always admin#directory#verificationCodesList.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "admin/directory/v1/", + "title": "Admin Directory API", + "version": "directory_v1" +} \ No newline at end of file diff --git a/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go b/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go new file mode 100644 index 000000000..487002f95 --- /dev/null +++ b/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go @@ -0,0 +1,21336 @@ +// Copyright 2020 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package admin provides access to the Admin Directory API. +// +// For product documentation, see: https://developers.google.com/admin-sdk/directory/ +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/admin/directory/v1" +// ... +// ctx := context.Background() +// adminService, err := admin.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// adminService, err := admin.NewService(ctx, option.WithScopes(admin.CloudPlatformScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// adminService, err := admin.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// adminService, err := admin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package admin // import "google.golang.org/api/admin/directory/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "admin:directory_v1" +const apiName = "admin" +const apiVersion = "directory_v1" +const basePath = "https://www.googleapis.com/admin/directory/v1/" + +// OAuth2 scopes used by this API. +const ( + // View and manage customer related information + AdminDirectoryCustomerScope = "https://www.googleapis.com/auth/admin.directory.customer" + + // View customer related information + AdminDirectoryCustomerReadonlyScope = "https://www.googleapis.com/auth/admin.directory.customer.readonly" + + // View and manage your Chrome OS devices' metadata + AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos" + + // View your Chrome OS devices' metadata + AdminDirectoryDeviceChromeosReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly" + + // View and manage your mobile devices' metadata + AdminDirectoryDeviceMobileScope = "https://www.googleapis.com/auth/admin.directory.device.mobile" + + // Manage your mobile devices by performing administrative tasks + AdminDirectoryDeviceMobileActionScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.action" + + // View your mobile devices' metadata + AdminDirectoryDeviceMobileReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly" + + // View and manage the provisioning of domains for your customers + AdminDirectoryDomainScope = "https://www.googleapis.com/auth/admin.directory.domain" + + // View domains related to your customers + AdminDirectoryDomainReadonlyScope = "https://www.googleapis.com/auth/admin.directory.domain.readonly" + + // View and manage the provisioning of groups on your domain + AdminDirectoryGroupScope = "https://www.googleapis.com/auth/admin.directory.group" + + // View and manage group subscriptions on your domain + AdminDirectoryGroupMemberScope = "https://www.googleapis.com/auth/admin.directory.group.member" + + // View group subscriptions on your domain + AdminDirectoryGroupMemberReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.member.readonly" + + // View groups on your domain + AdminDirectoryGroupReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.readonly" + + // View and manage notifications received on your domain + AdminDirectoryNotificationsScope = "https://www.googleapis.com/auth/admin.directory.notifications" + + // View and manage organization units on your domain + AdminDirectoryOrgunitScope = "https://www.googleapis.com/auth/admin.directory.orgunit" + + // View organization units on your domain + AdminDirectoryOrgunitReadonlyScope = "https://www.googleapis.com/auth/admin.directory.orgunit.readonly" + + // View and manage the provisioning of calendar resources on your domain + AdminDirectoryResourceCalendarScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar" + + // View calendar resources on your domain + AdminDirectoryResourceCalendarReadonlyScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + + // Manage delegated admin roles for your domain + AdminDirectoryRolemanagementScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement" + + // View delegated admin roles for your domain + AdminDirectoryRolemanagementReadonlyScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + + // View and manage the provisioning of users on your domain + AdminDirectoryUserScope = "https://www.googleapis.com/auth/admin.directory.user" + + // View and manage user aliases on your domain + AdminDirectoryUserAliasScope = "https://www.googleapis.com/auth/admin.directory.user.alias" + + // View user aliases on your domain + AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.alias.readonly" + + // View users on your domain + AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.readonly" + + // Manage data access permissions for users on your domain + AdminDirectoryUserSecurityScope = "https://www.googleapis.com/auth/admin.directory.user.security" + + // View and manage the provisioning of user schemas on your domain + AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/admin.directory.userschema" + + // View user schemas on your domain + AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.com/auth/admin.directory.userschema.readonly" + + // View and manage your data across Google Cloud Platform services + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/admin.directory.customer", + "https://www.googleapis.com/auth/admin.directory.customer.readonly", + "https://www.googleapis.com/auth/admin.directory.device.chromeos", + "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly", + "https://www.googleapis.com/auth/admin.directory.device.mobile", + "https://www.googleapis.com/auth/admin.directory.device.mobile.action", + "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly", + "https://www.googleapis.com/auth/admin.directory.domain", + "https://www.googleapis.com/auth/admin.directory.domain.readonly", + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.group.member", + "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + "https://www.googleapis.com/auth/admin.directory.group.readonly", + "https://www.googleapis.com/auth/admin.directory.notifications", + "https://www.googleapis.com/auth/admin.directory.orgunit", + "https://www.googleapis.com/auth/admin.directory.orgunit.readonly", + "https://www.googleapis.com/auth/admin.directory.resource.calendar", + "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly", + "https://www.googleapis.com/auth/admin.directory.rolemanagement", + "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly", + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/admin.directory.user.alias", + "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + "https://www.googleapis.com/auth/admin.directory.user.readonly", + "https://www.googleapis.com/auth/admin.directory.user.security", + "https://www.googleapis.com/auth/admin.directory.userschema", + "https://www.googleapis.com/auth/admin.directory.userschema.readonly", + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Asps = NewAspsService(s) + s.Channels = NewChannelsService(s) + s.Chromeosdevices = NewChromeosdevicesService(s) + s.Customers = NewCustomersService(s) + s.DomainAliases = NewDomainAliasesService(s) + s.Domains = NewDomainsService(s) + s.Groups = NewGroupsService(s) + s.Members = NewMembersService(s) + s.Mobiledevices = NewMobiledevicesService(s) + s.Notifications = NewNotificationsService(s) + s.Orgunits = NewOrgunitsService(s) + s.Privileges = NewPrivilegesService(s) + s.Resources = NewResourcesService(s) + s.RoleAssignments = NewRoleAssignmentsService(s) + s.Roles = NewRolesService(s) + s.Schemas = NewSchemasService(s) + s.Tokens = NewTokensService(s) + s.Users = NewUsersService(s) + s.VerificationCodes = NewVerificationCodesService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Asps *AspsService + + Channels *ChannelsService + + Chromeosdevices *ChromeosdevicesService + + Customers *CustomersService + + DomainAliases *DomainAliasesService + + Domains *DomainsService + + Groups *GroupsService + + Members *MembersService + + Mobiledevices *MobiledevicesService + + Notifications *NotificationsService + + Orgunits *OrgunitsService + + Privileges *PrivilegesService + + Resources *ResourcesService + + RoleAssignments *RoleAssignmentsService + + Roles *RolesService + + Schemas *SchemasService + + Tokens *TokensService + + Users *UsersService + + VerificationCodes *VerificationCodesService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewAspsService(s *Service) *AspsService { + rs := &AspsService{s: s} + return rs +} + +type AspsService struct { + s *Service +} + +func NewChannelsService(s *Service) *ChannelsService { + rs := &ChannelsService{s: s} + return rs +} + +type ChannelsService struct { + s *Service +} + +func NewChromeosdevicesService(s *Service) *ChromeosdevicesService { + rs := &ChromeosdevicesService{s: s} + return rs +} + +type ChromeosdevicesService struct { + s *Service +} + +func NewCustomersService(s *Service) *CustomersService { + rs := &CustomersService{s: s} + return rs +} + +type CustomersService struct { + s *Service +} + +func NewDomainAliasesService(s *Service) *DomainAliasesService { + rs := &DomainAliasesService{s: s} + return rs +} + +type DomainAliasesService struct { + s *Service +} + +func NewDomainsService(s *Service) *DomainsService { + rs := &DomainsService{s: s} + return rs +} + +type DomainsService struct { + s *Service +} + +func NewGroupsService(s *Service) *GroupsService { + rs := &GroupsService{s: s} + rs.Aliases = NewGroupsAliasesService(s) + return rs +} + +type GroupsService struct { + s *Service + + Aliases *GroupsAliasesService +} + +func NewGroupsAliasesService(s *Service) *GroupsAliasesService { + rs := &GroupsAliasesService{s: s} + return rs +} + +type GroupsAliasesService struct { + s *Service +} + +func NewMembersService(s *Service) *MembersService { + rs := &MembersService{s: s} + return rs +} + +type MembersService struct { + s *Service +} + +func NewMobiledevicesService(s *Service) *MobiledevicesService { + rs := &MobiledevicesService{s: s} + return rs +} + +type MobiledevicesService struct { + s *Service +} + +func NewNotificationsService(s *Service) *NotificationsService { + rs := &NotificationsService{s: s} + return rs +} + +type NotificationsService struct { + s *Service +} + +func NewOrgunitsService(s *Service) *OrgunitsService { + rs := &OrgunitsService{s: s} + return rs +} + +type OrgunitsService struct { + s *Service +} + +func NewPrivilegesService(s *Service) *PrivilegesService { + rs := &PrivilegesService{s: s} + return rs +} + +type PrivilegesService struct { + s *Service +} + +func NewResourcesService(s *Service) *ResourcesService { + rs := &ResourcesService{s: s} + rs.Buildings = NewResourcesBuildingsService(s) + rs.Calendars = NewResourcesCalendarsService(s) + rs.Features = NewResourcesFeaturesService(s) + return rs +} + +type ResourcesService struct { + s *Service + + Buildings *ResourcesBuildingsService + + Calendars *ResourcesCalendarsService + + Features *ResourcesFeaturesService +} + +func NewResourcesBuildingsService(s *Service) *ResourcesBuildingsService { + rs := &ResourcesBuildingsService{s: s} + return rs +} + +type ResourcesBuildingsService struct { + s *Service +} + +func NewResourcesCalendarsService(s *Service) *ResourcesCalendarsService { + rs := &ResourcesCalendarsService{s: s} + return rs +} + +type ResourcesCalendarsService struct { + s *Service +} + +func NewResourcesFeaturesService(s *Service) *ResourcesFeaturesService { + rs := &ResourcesFeaturesService{s: s} + return rs +} + +type ResourcesFeaturesService struct { + s *Service +} + +func NewRoleAssignmentsService(s *Service) *RoleAssignmentsService { + rs := &RoleAssignmentsService{s: s} + return rs +} + +type RoleAssignmentsService struct { + s *Service +} + +func NewRolesService(s *Service) *RolesService { + rs := &RolesService{s: s} + return rs +} + +type RolesService struct { + s *Service +} + +func NewSchemasService(s *Service) *SchemasService { + rs := &SchemasService{s: s} + return rs +} + +type SchemasService struct { + s *Service +} + +func NewTokensService(s *Service) *TokensService { + rs := &TokensService{s: s} + return rs +} + +type TokensService struct { + s *Service +} + +func NewUsersService(s *Service) *UsersService { + rs := &UsersService{s: s} + rs.Aliases = NewUsersAliasesService(s) + rs.Photos = NewUsersPhotosService(s) + return rs +} + +type UsersService struct { + s *Service + + Aliases *UsersAliasesService + + Photos *UsersPhotosService +} + +func NewUsersAliasesService(s *Service) *UsersAliasesService { + rs := &UsersAliasesService{s: s} + return rs +} + +type UsersAliasesService struct { + s *Service +} + +func NewUsersPhotosService(s *Service) *UsersPhotosService { + rs := &UsersPhotosService{s: s} + return rs +} + +type UsersPhotosService struct { + s *Service +} + +func NewVerificationCodesService(s *Service) *VerificationCodesService { + rs := &VerificationCodesService{s: s} + return rs +} + +type VerificationCodesService struct { + s *Service +} + +// Alias: JSON template for Alias object in Directory API. +type Alias struct { + // Alias: A alias email + Alias string `json:"alias,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Id: Unique id of the group (Read-only) Unique id of the user + // (Read-only) + Id string `json:"id,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // PrimaryEmail: Group's primary email (Read-only) User's primary email + // (Read-only) + PrimaryEmail string `json:"primaryEmail,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Alias") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alias") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Alias) MarshalJSON() ([]byte, error) { + type NoMethod Alias + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Aliases: JSON response template to list aliases in Directory API. +type Aliases struct { + // Aliases: List of alias objects. + Aliases []interface{} `json:"aliases,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Aliases") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Aliases") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Aliases) MarshalJSON() ([]byte, error) { + type NoMethod Aliases + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Asp: The template that returns individual ASP (Access Code) data. +type Asp struct { + // CodeId: The unique ID of the ASP. + CodeId int64 `json:"codeId,omitempty"` + + // CreationTime: The time when the ASP was created. Expressed in Unix + // time format. + CreationTime int64 `json:"creationTime,omitempty,string"` + + // Etag: ETag of the ASP. + Etag string `json:"etag,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#asp. + Kind string `json:"kind,omitempty"` + + // LastTimeUsed: The time when the ASP was last used. Expressed in Unix + // time format. + LastTimeUsed int64 `json:"lastTimeUsed,omitempty,string"` + + // Name: The name of the application that the user, represented by their + // userId, entered when the ASP was created. + Name string `json:"name,omitempty"` + + // UserKey: The unique ID of the user who issued the ASP. + UserKey string `json:"userKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CodeId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CodeId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Asp) MarshalJSON() ([]byte, error) { + type NoMethod Asp + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type Asps struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: A list of ASP resources. + Items []*Asp `json:"items,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#aspList. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Asps) MarshalJSON() ([]byte, error) { + type NoMethod Asps + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Building: JSON template for Building object in Directory API. +type Building struct { + // Address: The postal address of the building. See PostalAddress for + // details. Note that only a single address line and region code are + // required. + Address *BuildingAddress `json:"address,omitempty"` + + // BuildingId: Unique identifier for the building. The maximum length is + // 100 characters. + BuildingId string `json:"buildingId,omitempty"` + + // BuildingName: The building name as seen by users in Calendar. Must be + // unique for the customer. For example, "NYC-CHEL". The maximum length + // is 100 characters. + BuildingName string `json:"buildingName,omitempty"` + + // Coordinates: The geographic coordinates of the center of the + // building, expressed as latitude and longitude in decimal degrees. + Coordinates *BuildingCoordinates `json:"coordinates,omitempty"` + + // Description: A brief description of the building. For example, + // "Chelsea Market". + Description string `json:"description,omitempty"` + + // Etags: ETag of the resource. + Etags string `json:"etags,omitempty"` + + // FloorNames: The display names for all floors in this building. The + // floors are expected to be sorted in ascending order, from lowest + // floor to highest floor. For example, ["B2", "B1", "L", "1", "2", + // "2M", "3", "PH"] Must contain at least one entry. + FloorNames []string `json:"floorNames,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Address") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Building) MarshalJSON() ([]byte, error) { + type NoMethod Building + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BuildingAddress: JSON template for the postal address of a building +// in Directory API. +type BuildingAddress struct { + // AddressLines: Unstructured address lines describing the lower levels + // of an address. + AddressLines []string `json:"addressLines,omitempty"` + + // AdministrativeArea: Optional. Highest administrative subdivision + // which is used for postal addresses of a country or region. + AdministrativeArea string `json:"administrativeArea,omitempty"` + + // LanguageCode: Optional. BCP-47 language code of the contents of this + // address (if known). + LanguageCode string `json:"languageCode,omitempty"` + + // Locality: Optional. Generally refers to the city/town portion of the + // address. Examples: US city, IT comune, UK post town. In regions of + // the world where localities are not well defined or do not fit into + // this structure well, leave locality empty and use addressLines. + Locality string `json:"locality,omitempty"` + + // PostalCode: Optional. Postal code of the address. + PostalCode string `json:"postalCode,omitempty"` + + // RegionCode: Required. CLDR region code of the country/region of the + // address. + RegionCode string `json:"regionCode,omitempty"` + + // Sublocality: Optional. Sublocality of the address. + Sublocality string `json:"sublocality,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddressLines") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddressLines") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BuildingAddress) MarshalJSON() ([]byte, error) { + type NoMethod BuildingAddress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BuildingCoordinates: JSON template for coordinates of a building in +// Directory API. +type BuildingCoordinates struct { + // Latitude: Latitude in decimal degrees. + Latitude float64 `json:"latitude,omitempty"` + + // Longitude: Longitude in decimal degrees. + Longitude float64 `json:"longitude,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Latitude") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Latitude") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BuildingCoordinates) MarshalJSON() ([]byte, error) { + type NoMethod BuildingCoordinates + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *BuildingCoordinates) UnmarshalJSON(data []byte) error { + type NoMethod BuildingCoordinates + var s1 struct { + Latitude gensupport.JSONFloat64 `json:"latitude"` + Longitude gensupport.JSONFloat64 `json:"longitude"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Latitude = float64(s1.Latitude) + s.Longitude = float64(s1.Longitude) + return nil +} + +// Buildings: JSON template for Building List Response object in +// Directory API. +type Buildings struct { + // Buildings: The Buildings in this page of results. + Buildings []*Building `json:"buildings,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The continuation token, used to page through large + // result sets. Provide this value in a subsequent request to return the + // next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Buildings") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Buildings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Buildings) MarshalJSON() ([]byte, error) { + type NoMethod Buildings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CalendarResource: JSON template for Calendar Resource object in +// Directory API. +type CalendarResource struct { + // BuildingId: Unique ID for the building a resource is located in. + BuildingId string `json:"buildingId,omitempty"` + + // Capacity: Capacity of a resource, number of seats in a room. + Capacity int64 `json:"capacity,omitempty"` + + // Etags: ETag of the resource. + Etags string `json:"etags,omitempty"` + + FeatureInstances interface{} `json:"featureInstances,omitempty"` + + // FloorName: Name of the floor a resource is located on. + FloorName string `json:"floorName,omitempty"` + + // FloorSection: Name of the section within a floor a resource is + // located in. + FloorSection string `json:"floorSection,omitempty"` + + // GeneratedResourceName: The read-only auto-generated name of the + // calendar resource which includes metadata about the resource such as + // building name, floor, capacity, etc. For example, "NYC-2-Training + // Room 1A (16)". + GeneratedResourceName string `json:"generatedResourceName,omitempty"` + + // Kind: The type of the resource. For calendar resources, the value is + // admin#directory#resources#calendars#CalendarResource. + Kind string `json:"kind,omitempty"` + + // ResourceCategory: The category of the calendar resource. Either + // CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN. + ResourceCategory string `json:"resourceCategory,omitempty"` + + // ResourceDescription: Description of the resource, visible only to + // admins. + ResourceDescription string `json:"resourceDescription,omitempty"` + + // ResourceEmail: The read-only email for the calendar resource. + // Generated as part of creating a new calendar resource. + ResourceEmail string `json:"resourceEmail,omitempty"` + + // ResourceId: The unique ID for the calendar resource. + ResourceId string `json:"resourceId,omitempty"` + + // ResourceName: The name of the calendar resource. For example, + // "Training Room 1A". + ResourceName string `json:"resourceName,omitempty"` + + // ResourceType: The type of the calendar resource, intended for + // non-room resources. + ResourceType string `json:"resourceType,omitempty"` + + // UserVisibleDescription: Description of the resource, visible to users + // and admins. + UserVisibleDescription string `json:"userVisibleDescription,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BuildingId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildingId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CalendarResource) MarshalJSON() ([]byte, error) { + type NoMethod CalendarResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CalendarResources: JSON template for Calendar Resource List Response +// object in Directory API. +type CalendarResources struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: The CalendarResources in this page of results. + Items []*CalendarResource `json:"items,omitempty"` + + // Kind: Identifies this as a collection of CalendarResources. This is + // always admin#directory#resources#calendars#calendarResourcesList. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The continuation token, used to page through large + // result sets. Provide this value in a subsequent request to return the + // next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CalendarResources) MarshalJSON() ([]byte, error) { + type NoMethod CalendarResources + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Channel: An notification channel used to watch for resource changes. +type Channel struct { + // Address: The address where notifications are delivered for this + // channel. + Address string `json:"address,omitempty"` + + // Expiration: Date and time of notification channel expiration, + // expressed as a Unix timestamp, in milliseconds. Optional. + Expiration int64 `json:"expiration,omitempty,string"` + + // Id: A UUID or similar unique string that identifies this channel. + Id string `json:"id,omitempty"` + + // Kind: Identifies this as a notification channel used to watch for + // changes to a resource, which is "api#channel". + Kind string `json:"kind,omitempty"` + + // Params: Additional parameters controlling delivery channel behavior. + // Optional. + Params map[string]string `json:"params,omitempty"` + + // Payload: A Boolean value to indicate whether payload is wanted. + // Optional. + Payload bool `json:"payload,omitempty"` + + // ResourceId: An opaque ID that identifies the resource being watched + // on this channel. Stable across different API versions. + ResourceId string `json:"resourceId,omitempty"` + + // ResourceUri: A version-specific identifier for the watched resource. + ResourceUri string `json:"resourceUri,omitempty"` + + // Token: An arbitrary string delivered to the target address with each + // notification delivered over this channel. Optional. + Token string `json:"token,omitempty"` + + // Type: The type of delivery mechanism used for this channel. + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Address") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Channel) MarshalJSON() ([]byte, error) { + type NoMethod Channel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChromeOsDevice: JSON template for Chrome Os Device resource in +// Directory API. +type ChromeOsDevice struct { + // ActiveTimeRanges: List of active time ranges (Read-only) + ActiveTimeRanges []*ChromeOsDeviceActiveTimeRanges `json:"activeTimeRanges,omitempty"` + + // AnnotatedAssetId: AssetId specified during enrollment or through + // later annotation + AnnotatedAssetId string `json:"annotatedAssetId,omitempty"` + + // AnnotatedLocation: Address or location of the device as noted by the + // administrator + AnnotatedLocation string `json:"annotatedLocation,omitempty"` + + // AnnotatedUser: User of the device + AnnotatedUser string `json:"annotatedUser,omitempty"` + + // AutoUpdateExpiration: (Read-only) The timestamp after which the + // device will stop receiving Chrome updates or support + AutoUpdateExpiration int64 `json:"autoUpdateExpiration,omitempty,string"` + + // BootMode: Chromebook boot mode (Read-only) + BootMode string `json:"bootMode,omitempty"` + + // CpuStatusReports: Reports of CPU utilization and temperature + // (Read-only) + CpuStatusReports []*ChromeOsDeviceCpuStatusReports `json:"cpuStatusReports,omitempty"` + + // DeviceFiles: List of device files to download (Read-only) + DeviceFiles []*ChromeOsDeviceDeviceFiles `json:"deviceFiles,omitempty"` + + // DeviceId: Unique identifier of Chrome OS Device (Read-only) + DeviceId string `json:"deviceId,omitempty"` + + // DiskVolumeReports: Reports of disk space and other info about + // mounted/connected volumes. + DiskVolumeReports []*ChromeOsDeviceDiskVolumeReports `json:"diskVolumeReports,omitempty"` + + // DockMacAddress: (Read-only) Built-in MAC address for the docking + // station that the device connected to. Factory sets Media access + // control address (MAC address) assigned for use by a dock. Currently + // this is only supported on the Dell Arcada / Sarien devices and the + // Dell WD19 / WD19TB Docking Station. It is reserved specifically for + // MAC pass through device policy. The format is twelve (12) hexadecimal + // digits without any delimiter (uppercase letters). This is only + // relevant for Dell devices. + DockMacAddress string `json:"dockMacAddress,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // EthernetMacAddress: Chromebook Mac Address on ethernet network + // interface (Read-only) + EthernetMacAddress string `json:"ethernetMacAddress,omitempty"` + + // EthernetMacAddress0: (Read-only) MAC address used by the + // Chromebook’s internal ethernet port, and for onboard network + // (ethernet) interface. The format is twelve (12) hexadecimal digits + // without any delimiter (uppercase letters). This is only relevant for + // some devices. + EthernetMacAddress0 string `json:"ethernetMacAddress0,omitempty"` + + // FirmwareVersion: Chromebook firmware version (Read-only) + FirmwareVersion string `json:"firmwareVersion,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // LastEnrollmentTime: Date and time the device was last enrolled + // (Read-only) + LastEnrollmentTime string `json:"lastEnrollmentTime,omitempty"` + + // LastKnownNetwork: Contains last used network (Read-only) + LastKnownNetwork []*ChromeOsDeviceLastKnownNetwork `json:"lastKnownNetwork,omitempty"` + + // LastSync: Date and time the device was last synchronized with the + // policy settings in the G Suite administrator control panel + // (Read-only) + LastSync string `json:"lastSync,omitempty"` + + // MacAddress: Chromebook Mac Address on wifi network interface + // (Read-only) + MacAddress string `json:"macAddress,omitempty"` + + // ManufactureDate: (Read-only) The date the device was manufactured in + // yyyy-mm-dd format. + ManufactureDate string `json:"manufactureDate,omitempty"` + + // Meid: Contains either the Mobile Equipment identifier (MEID) or the + // International Mobile Equipment Identity (IMEI) for the 3G mobile card + // in the Chromebook (Read-only) + Meid string `json:"meid,omitempty"` + + // Model: Chromebook Model (Read-only) + Model string `json:"model,omitempty"` + + // Notes: Notes added by the administrator + Notes string `json:"notes,omitempty"` + + // OrderNumber: Chromebook order number (Read-only) + OrderNumber string `json:"orderNumber,omitempty"` + + // OrgUnitPath: OrgUnit of the device + OrgUnitPath string `json:"orgUnitPath,omitempty"` + + // OsVersion: Chromebook Os Version (Read-only) + OsVersion string `json:"osVersion,omitempty"` + + // PlatformVersion: Chromebook platform version (Read-only) + PlatformVersion string `json:"platformVersion,omitempty"` + + // RecentUsers: List of recent device users, in descending order by last + // login time (Read-only) + RecentUsers []*ChromeOsDeviceRecentUsers `json:"recentUsers,omitempty"` + + // SerialNumber: Chromebook serial number (Read-only) + SerialNumber string `json:"serialNumber,omitempty"` + + // Status: status of the device (Read-only) + Status string `json:"status,omitempty"` + + // SupportEndDate: Final date the device will be supported (Read-only) + SupportEndDate string `json:"supportEndDate,omitempty"` + + // SystemRamFreeReports: Reports of amounts of available RAM memory + // (Read-only) + SystemRamFreeReports []*ChromeOsDeviceSystemRamFreeReports `json:"systemRamFreeReports,omitempty"` + + // SystemRamTotal: Total RAM on the device [in bytes] (Read-only) + SystemRamTotal int64 `json:"systemRamTotal,omitempty,string"` + + // TpmVersionInfo: Trusted Platform Module (TPM) (Read-only) + TpmVersionInfo *ChromeOsDeviceTpmVersionInfo `json:"tpmVersionInfo,omitempty"` + + // WillAutoRenew: Will Chromebook auto renew after support end date + // (Read-only) + WillAutoRenew bool `json:"willAutoRenew,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ActiveTimeRanges") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActiveTimeRanges") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDevice) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDevice + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceActiveTimeRanges struct { + // ActiveTime: Duration in milliseconds + ActiveTime int64 `json:"activeTime,omitempty"` + + // Date: Date of usage + Date string `json:"date,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActiveTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActiveTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceActiveTimeRanges) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceActiveTimeRanges + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceCpuStatusReports struct { + // CpuTemperatureInfo: List of CPU temperature samples. + CpuTemperatureInfo []*ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo `json:"cpuTemperatureInfo,omitempty"` + + CpuUtilizationPercentageInfo []int64 `json:"cpuUtilizationPercentageInfo,omitempty"` + + // ReportTime: Date and time the report was received. + ReportTime string `json:"reportTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CpuTemperatureInfo") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CpuTemperatureInfo") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceCpuStatusReports) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceCpuStatusReports + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo struct { + // Label: CPU label + Label string `json:"label,omitempty"` + + // Temperature: Temperature in Celsius degrees. + Temperature int64 `json:"temperature,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Label") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Label") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceDeviceFiles struct { + // CreateTime: Date and time the file was created + CreateTime string `json:"createTime,omitempty"` + + // DownloadUrl: File download URL + DownloadUrl string `json:"downloadUrl,omitempty"` + + // Name: File name + Name string `json:"name,omitempty"` + + // Type: File type + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceDeviceFiles) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceDeviceFiles + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceDiskVolumeReports struct { + // VolumeInfo: Disk volumes + VolumeInfo []*ChromeOsDeviceDiskVolumeReportsVolumeInfo `json:"volumeInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VolumeInfo") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VolumeInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceDiskVolumeReports) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceDiskVolumeReports + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceDiskVolumeReportsVolumeInfo struct { + // StorageFree: Free disk space [in bytes] + StorageFree int64 `json:"storageFree,omitempty,string"` + + // StorageTotal: Total disk space [in bytes] + StorageTotal int64 `json:"storageTotal,omitempty,string"` + + // VolumeId: Volume id + VolumeId string `json:"volumeId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StorageFree") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StorageFree") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceDiskVolumeReportsVolumeInfo) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceDiskVolumeReportsVolumeInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceLastKnownNetwork struct { + // IpAddress: The IP address + IpAddress string `json:"ipAddress,omitempty"` + + // WanIpAddress: The WAN IP address + WanIpAddress string `json:"wanIpAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpAddress") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IpAddress") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceLastKnownNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceLastKnownNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceRecentUsers struct { + // Email: Email address of the user. Present only if the user type is + // managed + Email string `json:"email,omitempty"` + + // Type: The type of the user + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceRecentUsers) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceRecentUsers + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ChromeOsDeviceSystemRamFreeReports struct { + // ReportTime: Date and time the report was received. + ReportTime string `json:"reportTime,omitempty"` + + SystemRamFreeInfo googleapi.Int64s `json:"systemRamFreeInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ReportTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReportTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceSystemRamFreeReports) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceSystemRamFreeReports + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChromeOsDeviceTpmVersionInfo: Trusted Platform Module (TPM) +// (Read-only) +type ChromeOsDeviceTpmVersionInfo struct { + // Family: TPM family. + Family string `json:"family,omitempty"` + + // FirmwareVersion: TPM firmware version. + FirmwareVersion string `json:"firmwareVersion,omitempty"` + + // Manufacturer: TPM manufacturer code. + Manufacturer string `json:"manufacturer,omitempty"` + + // SpecLevel: TPM specification level. + SpecLevel string `json:"specLevel,omitempty"` + + // TpmModel: TPM model number. + TpmModel string `json:"tpmModel,omitempty"` + + // VendorSpecific: Vendor-specific information such as Vendor ID. + VendorSpecific string `json:"vendorSpecific,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Family") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Family") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceTpmVersionInfo) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceTpmVersionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChromeOsDeviceAction: JSON request template for firing actions on +// ChromeOs Device in Directory Devices API. +type ChromeOsDeviceAction struct { + // Action: Action to be taken on the ChromeOs Device + Action string `json:"action,omitempty"` + + DeprovisionReason string `json:"deprovisionReason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDeviceAction) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDeviceAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChromeOsDevices: JSON response template for List Chrome OS Devices +// operation in Directory API. +type ChromeOsDevices struct { + // Chromeosdevices: List of Chrome OS Device objects. + Chromeosdevices []*ChromeOsDevice `json:"chromeosdevices,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // NextPageToken: Token used to access next page of this result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Chromeosdevices") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Chromeosdevices") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsDevices) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsDevices + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChromeOsMoveDevicesToOu: JSON request template for moving ChromeOs +// Device to given OU in Directory Devices API. +type ChromeOsMoveDevicesToOu struct { + // DeviceIds: ChromeOs Devices to be moved to OU + DeviceIds []string `json:"deviceIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceIds") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChromeOsMoveDevicesToOu) MarshalJSON() ([]byte, error) { + type NoMethod ChromeOsMoveDevicesToOu + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Customer: JSON template for Customer Resource object in Directory +// API. +type Customer struct { + // AlternateEmail: The customer's secondary contact email address. This + // email address cannot be on the same domain as the customerDomain + AlternateEmail string `json:"alternateEmail,omitempty"` + + // CustomerCreationTime: The customer's creation time (Readonly) + CustomerCreationTime string `json:"customerCreationTime,omitempty"` + + // CustomerDomain: The customer's primary domain name string. Do not + // include the www prefix when creating a new customer. + CustomerDomain string `json:"customerDomain,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Id: The unique ID for the customer's G Suite account. (Readonly) + Id string `json:"id,omitempty"` + + // Kind: Identifies the resource as a customer. Value: + // admin#directory#customer + Kind string `json:"kind,omitempty"` + + // Language: The customer's ISO 639-2 language code. The default value + // is en-US + Language string `json:"language,omitempty"` + + // PhoneNumber: The customer's contact phone number in E.164 format. + PhoneNumber string `json:"phoneNumber,omitempty"` + + // PostalAddress: The customer's postal address information. + PostalAddress *CustomerPostalAddress `json:"postalAddress,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AlternateEmail") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AlternateEmail") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Customer) MarshalJSON() ([]byte, error) { + type NoMethod Customer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomerPostalAddress: JSON template for postal address of a +// customer. +type CustomerPostalAddress struct { + // AddressLine1: A customer's physical address. The address can be + // composed of one to three lines. + AddressLine1 string `json:"addressLine1,omitempty"` + + // AddressLine2: Address line 2 of the address. + AddressLine2 string `json:"addressLine2,omitempty"` + + // AddressLine3: Address line 3 of the address. + AddressLine3 string `json:"addressLine3,omitempty"` + + // ContactName: The customer contact's name. + ContactName string `json:"contactName,omitempty"` + + // CountryCode: This is a required property. For countryCode information + // see the ISO 3166 country code elements. + CountryCode string `json:"countryCode,omitempty"` + + // Locality: Name of the locality. An example of a locality value is the + // city of San Francisco. + Locality string `json:"locality,omitempty"` + + // OrganizationName: The company or company division name. + OrganizationName string `json:"organizationName,omitempty"` + + // PostalCode: The postal code. A postalCode example is a postal zip + // code such as 10009. This is in accordance with - + // http://portablecontacts.net/draft-spec.html#address_element. + PostalCode string `json:"postalCode,omitempty"` + + // Region: Name of the region. An example of a region value is NY for + // the state of New York. + Region string `json:"region,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddressLine1") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddressLine1") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomerPostalAddress) MarshalJSON() ([]byte, error) { + type NoMethod CustomerPostalAddress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DomainAlias: JSON template for Domain Alias object in Directory API. +type DomainAlias struct { + // CreationTime: The creation time of the domain alias. (Read-only). + CreationTime int64 `json:"creationTime,omitempty,string"` + + // DomainAliasName: The domain alias name. + DomainAliasName string `json:"domainAliasName,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // ParentDomainName: The parent domain name that the domain alias is + // associated with. This can either be a primary or secondary domain + // name within a customer. + ParentDomainName string `json:"parentDomainName,omitempty"` + + // Verified: Indicates the verification state of a domain alias. + // (Read-only) + Verified bool `json:"verified,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DomainAlias) MarshalJSON() ([]byte, error) { + type NoMethod DomainAlias + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DomainAliases: JSON response template to list domain aliases in +// Directory API. +type DomainAliases struct { + // DomainAliases: List of domain alias objects. + DomainAliases []*DomainAlias `json:"domainAliases,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DomainAliases") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DomainAliases") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DomainAliases) MarshalJSON() ([]byte, error) { + type NoMethod DomainAliases + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Domains: JSON template for Domain object in Directory API. +type Domains struct { + // CreationTime: Creation time of the domain. (Read-only). + CreationTime int64 `json:"creationTime,omitempty,string"` + + // DomainAliases: List of domain alias objects. (Read-only) + DomainAliases []*DomainAlias `json:"domainAliases,omitempty"` + + // DomainName: The domain name of the customer. + DomainName string `json:"domainName,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // IsPrimary: Indicates if the domain is a primary domain (Read-only). + IsPrimary bool `json:"isPrimary,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Verified: Indicates the verification state of a domain. (Read-only). + Verified bool `json:"verified,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Domains) MarshalJSON() ([]byte, error) { + type NoMethod Domains + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Domains2: JSON response template to list Domains in Directory API. +type Domains2 struct { + // Domains: List of domain objects. + Domains []*Domains `json:"domains,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Domains") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Domains") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Domains2) MarshalJSON() ([]byte, error) { + type NoMethod Domains2 + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Feature: JSON template for Feature object in Directory API. +type Feature struct { + // Etags: ETag of the resource. + Etags string `json:"etags,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Name: The name of the feature. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etags") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etags") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Feature) MarshalJSON() ([]byte, error) { + type NoMethod Feature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FeatureInstance: JSON template for a "feature instance". +type FeatureInstance struct { + // Feature: The feature that this is an instance of. A calendar resource + // may have multiple instances of a feature. + Feature *Feature `json:"feature,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Feature") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Feature") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FeatureInstance) MarshalJSON() ([]byte, error) { + type NoMethod FeatureInstance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FeatureRename: JSON request template for renaming a feature. +type FeatureRename struct { + // NewName: New name of the feature. + NewName string `json:"newName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NewName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FeatureRename) MarshalJSON() ([]byte, error) { + type NoMethod FeatureRename + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Features: JSON template for Feature List Response object in Directory +// API. +type Features struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Features: The Features in this page of results. + Features []*Feature `json:"features,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The continuation token, used to page through large + // result sets. Provide this value in a subsequent request to return the + // next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Features) MarshalJSON() ([]byte, error) { + type NoMethod Features + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Group: JSON template for Group resource in Directory API. +type Group struct { + // AdminCreated: Is the group created by admin (Read-only) * + AdminCreated bool `json:"adminCreated,omitempty"` + + // Aliases: List of aliases (Read-only) + Aliases []string `json:"aliases,omitempty"` + + // Description: Description of the group + Description string `json:"description,omitempty"` + + // DirectMembersCount: Group direct members count + DirectMembersCount int64 `json:"directMembersCount,omitempty,string"` + + // Email: Email of Group + Email string `json:"email,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Id: Unique identifier of Group (Read-only) + Id string `json:"id,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Name: Group name + Name string `json:"name,omitempty"` + + // NonEditableAliases: List of non editable aliases (Read-only) + NonEditableAliases []string `json:"nonEditableAliases,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdminCreated") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdminCreated") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Group) MarshalJSON() ([]byte, error) { + type NoMethod Group + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Groups: JSON response template for List Groups operation in Directory +// API. +type Groups struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Groups: List of group objects. + Groups []*Group `json:"groups,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // NextPageToken: Token used to access next page of this result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Groups) MarshalJSON() ([]byte, error) { + type NoMethod Groups + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Member: JSON template for Member resource in Directory API. +type Member struct { + // DeliverySettings: Delivery settings of member + DeliverySettings string `json:"delivery_settings,omitempty"` + + // Email: Email of member (Read-only) + Email string `json:"email,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Id: The unique ID of the group member. A member id can be used as a + // member request URI's memberKey. Unique identifier of group + // (Read-only) Unique identifier of member (Read-only) + Id string `json:"id,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Role: Role of member + Role string `json:"role,omitempty"` + + // Status: Status of member (Immutable) + Status string `json:"status,omitempty"` + + // Type: Type of member (Immutable) + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeliverySettings") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeliverySettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Member) MarshalJSON() ([]byte, error) { + type NoMethod Member + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Members: JSON response template for List Members operation in +// Directory API. +type Members struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Members: List of member objects. + Members []*Member `json:"members,omitempty"` + + // NextPageToken: Token used to access next page of this result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Members) MarshalJSON() ([]byte, error) { + type NoMethod Members + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MembersHasMember: JSON template for Has Member response in Directory +// API. +type MembersHasMember struct { + // IsMember: Identifies whether the given user is a member of the group. + // Membership can be direct or nested. + IsMember bool `json:"isMember,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "IsMember") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IsMember") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MembersHasMember) MarshalJSON() ([]byte, error) { + type NoMethod MembersHasMember + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MobileDevice: JSON template for Mobile Device resource in Directory +// API. +type MobileDevice struct { + // AdbStatus: Adb (USB debugging) enabled or disabled on device + // (Read-only) + AdbStatus bool `json:"adbStatus,omitempty"` + + // Applications: List of applications installed on Mobile Device + Applications []*MobileDeviceApplications `json:"applications,omitempty"` + + // BasebandVersion: Mobile Device Baseband version (Read-only) + BasebandVersion string `json:"basebandVersion,omitempty"` + + // BootloaderVersion: Mobile Device Bootloader version (Read-only) + BootloaderVersion string `json:"bootloaderVersion,omitempty"` + + // Brand: Mobile Device Brand (Read-only) + Brand string `json:"brand,omitempty"` + + // BuildNumber: Mobile Device Build number (Read-only) + BuildNumber string `json:"buildNumber,omitempty"` + + // DefaultLanguage: The default locale used on the Mobile Device + // (Read-only) + DefaultLanguage string `json:"defaultLanguage,omitempty"` + + // DeveloperOptionsStatus: Developer options enabled or disabled on + // device (Read-only) + DeveloperOptionsStatus bool `json:"developerOptionsStatus,omitempty"` + + // DeviceCompromisedStatus: Mobile Device compromised status (Read-only) + DeviceCompromisedStatus string `json:"deviceCompromisedStatus,omitempty"` + + // DeviceId: Mobile Device serial number (Read-only) + DeviceId string `json:"deviceId,omitempty"` + + // DevicePasswordStatus: DevicePasswordStatus (Read-only) + DevicePasswordStatus string `json:"devicePasswordStatus,omitempty"` + + // Email: List of owner user's email addresses (Read-only) + Email []string `json:"email,omitempty"` + + // EncryptionStatus: Mobile Device Encryption Status (Read-only) + EncryptionStatus string `json:"encryptionStatus,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // FirstSync: Date and time the device was first synchronized with the + // policy settings in the G Suite administrator control panel + // (Read-only) + FirstSync string `json:"firstSync,omitempty"` + + // Hardware: Mobile Device Hardware (Read-only) + Hardware string `json:"hardware,omitempty"` + + // HardwareId: Mobile Device Hardware Id (Read-only) + HardwareId string `json:"hardwareId,omitempty"` + + // Imei: Mobile Device IMEI number (Read-only) + Imei string `json:"imei,omitempty"` + + // KernelVersion: Mobile Device Kernel version (Read-only) + KernelVersion string `json:"kernelVersion,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // LastSync: Date and time the device was last synchronized with the + // policy settings in the G Suite administrator control panel + // (Read-only) + LastSync string `json:"lastSync,omitempty"` + + // ManagedAccountIsOnOwnerProfile: Boolean indicating if this account is + // on owner/primary profile or not (Read-only) + ManagedAccountIsOnOwnerProfile bool `json:"managedAccountIsOnOwnerProfile,omitempty"` + + // Manufacturer: Mobile Device manufacturer (Read-only) + Manufacturer string `json:"manufacturer,omitempty"` + + // Meid: Mobile Device MEID number (Read-only) + Meid string `json:"meid,omitempty"` + + // Model: Name of the model of the device + Model string `json:"model,omitempty"` + + // Name: List of owner user's names (Read-only) + Name []string `json:"name,omitempty"` + + // NetworkOperator: Mobile Device mobile or network operator (if + // available) (Read-only) + NetworkOperator string `json:"networkOperator,omitempty"` + + // Os: Name of the mobile operating system + Os string `json:"os,omitempty"` + + // OtherAccountsInfo: List of accounts added on device (Read-only) + OtherAccountsInfo []string `json:"otherAccountsInfo,omitempty"` + + // Privilege: DMAgentPermission (Read-only) + Privilege string `json:"privilege,omitempty"` + + // ReleaseVersion: Mobile Device release version version (Read-only) + ReleaseVersion string `json:"releaseVersion,omitempty"` + + // ResourceId: Unique identifier of Mobile Device (Read-only) + ResourceId string `json:"resourceId,omitempty"` + + // SecurityPatchLevel: Mobile Device Security patch level (Read-only) + SecurityPatchLevel int64 `json:"securityPatchLevel,omitempty,string"` + + // SerialNumber: Mobile Device SSN or Serial Number (Read-only) + SerialNumber string `json:"serialNumber,omitempty"` + + // Status: Status of the device (Read-only) + Status string `json:"status,omitempty"` + + // SupportsWorkProfile: Work profile supported on device (Read-only) + SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"` + + // Type: The type of device (Read-only) + Type string `json:"type,omitempty"` + + // UnknownSourcesStatus: Unknown sources enabled or disabled on device + // (Read-only) + UnknownSourcesStatus bool `json:"unknownSourcesStatus,omitempty"` + + // UserAgent: Mobile Device user agent + UserAgent string `json:"userAgent,omitempty"` + + // WifiMacAddress: Mobile Device WiFi MAC address (Read-only) + WifiMacAddress string `json:"wifiMacAddress,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdbStatus") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdbStatus") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MobileDevice) MarshalJSON() ([]byte, error) { + type NoMethod MobileDevice + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type MobileDeviceApplications struct { + // DisplayName: Display name of application + DisplayName string `json:"displayName,omitempty"` + + // PackageName: Package name of application + PackageName string `json:"packageName,omitempty"` + + // Permission: List of Permissions for application + Permission []string `json:"permission,omitempty"` + + // VersionCode: Version code of application + VersionCode int64 `json:"versionCode,omitempty"` + + // VersionName: Version name of application + VersionName string `json:"versionName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MobileDeviceApplications) MarshalJSON() ([]byte, error) { + type NoMethod MobileDeviceApplications + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MobileDeviceAction: JSON request template for firing commands on +// Mobile Device in Directory Devices API. +type MobileDeviceAction struct { + // Action: Action to be taken on the Mobile Device + Action string `json:"action,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MobileDeviceAction) MarshalJSON() ([]byte, error) { + type NoMethod MobileDeviceAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MobileDevices: JSON response template for List Mobile Devices +// operation in Directory API. +type MobileDevices struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Mobiledevices: List of Mobile Device objects. + Mobiledevices []*MobileDevice `json:"mobiledevices,omitempty"` + + // NextPageToken: Token used to access next page of this result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MobileDevices) MarshalJSON() ([]byte, error) { + type NoMethod MobileDevices + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Notification: Template for a notification resource. +type Notification struct { + // Body: Body of the notification (Read-only) + Body string `json:"body,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // FromAddress: Address from which the notification is received + // (Read-only) + FromAddress string `json:"fromAddress,omitempty"` + + // IsUnread: Boolean indicating whether the notification is unread or + // not. + IsUnread bool `json:"isUnread,omitempty"` + + // Kind: The type of the resource. + Kind string `json:"kind,omitempty"` + + NotificationId string `json:"notificationId,omitempty"` + + // SendTime: Time at which notification was sent (Read-only) + SendTime string `json:"sendTime,omitempty"` + + // Subject: Subject of the notification (Read-only) + Subject string `json:"subject,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Body") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Body") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Notification) MarshalJSON() ([]byte, error) { + type NoMethod Notification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Notifications: Template for notifications list response. +type Notifications struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: List of notifications in this page. + Items []*Notification `json:"items,omitempty"` + + // Kind: The type of the resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: Token for fetching the next page of notifications. + NextPageToken string `json:"nextPageToken,omitempty"` + + // UnreadNotificationsCount: Number of unread notification for the + // domain. + UnreadNotificationsCount int64 `json:"unreadNotificationsCount,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Notifications) MarshalJSON() ([]byte, error) { + type NoMethod Notifications + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OrgUnit: JSON template for Org Unit resource in Directory API. +type OrgUnit struct { + // BlockInheritance: Should block inheritance + BlockInheritance bool `json:"blockInheritance,omitempty"` + + // Description: Description of OrgUnit + Description string `json:"description,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Name: Name of OrgUnit + Name string `json:"name,omitempty"` + + // OrgUnitId: Id of OrgUnit + OrgUnitId string `json:"orgUnitId,omitempty"` + + // OrgUnitPath: Path of OrgUnit + OrgUnitPath string `json:"orgUnitPath,omitempty"` + + // ParentOrgUnitId: Id of parent OrgUnit + ParentOrgUnitId string `json:"parentOrgUnitId,omitempty"` + + // ParentOrgUnitPath: Path of parent OrgUnit + ParentOrgUnitPath string `json:"parentOrgUnitPath,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BlockInheritance") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlockInheritance") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *OrgUnit) MarshalJSON() ([]byte, error) { + type NoMethod OrgUnit + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OrgUnits: JSON response template for List Organization Units +// operation in Directory API. +type OrgUnits struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // OrganizationUnits: List of user objects. + OrganizationUnits []*OrgUnit `json:"organizationUnits,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrgUnits) MarshalJSON() ([]byte, error) { + type NoMethod OrgUnits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Privilege: JSON template for privilege resource in Directory API. +type Privilege struct { + // ChildPrivileges: A list of child privileges. Privileges for a service + // form a tree. Each privilege can have a list of child privileges; this + // list is empty for a leaf privilege. + ChildPrivileges []*Privilege `json:"childPrivileges,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // IsOuScopable: If the privilege can be restricted to an organization + // unit. + IsOuScopable bool `json:"isOuScopable,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#privilege. + Kind string `json:"kind,omitempty"` + + // PrivilegeName: The name of the privilege. + PrivilegeName string `json:"privilegeName,omitempty"` + + // ServiceId: The obfuscated ID of the service this privilege is for. + // This value is returned with Privileges.list(). + ServiceId string `json:"serviceId,omitempty"` + + // ServiceName: The name of the service this privilege is for. + ServiceName string `json:"serviceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChildPrivileges") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChildPrivileges") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Privilege) MarshalJSON() ([]byte, error) { + type NoMethod Privilege + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Privileges: JSON response template for List privileges operation in +// Directory API. +type Privileges struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: A list of Privilege resources. + Items []*Privilege `json:"items,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#privileges. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Privileges) MarshalJSON() ([]byte, error) { + type NoMethod Privileges + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Role: JSON template for role resource in Directory API. +type Role struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // IsSuperAdminRole: Returns true if the role is a super admin role. + IsSuperAdminRole bool `json:"isSuperAdminRole,omitempty"` + + // IsSystemRole: Returns true if this is a pre-defined system role. + IsSystemRole bool `json:"isSystemRole,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#role. + Kind string `json:"kind,omitempty"` + + // RoleDescription: A short description of the role. + RoleDescription string `json:"roleDescription,omitempty"` + + // RoleId: ID of the role. + RoleId int64 `json:"roleId,omitempty,string"` + + // RoleName: Name of the role. + RoleName string `json:"roleName,omitempty"` + + // RolePrivileges: The set of privileges that are granted to this role. + RolePrivileges []*RoleRolePrivileges `json:"rolePrivileges,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Role) MarshalJSON() ([]byte, error) { + type NoMethod Role + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RoleRolePrivileges struct { + // PrivilegeName: The name of the privilege. + PrivilegeName string `json:"privilegeName,omitempty"` + + // ServiceId: The obfuscated ID of the service this privilege is for. + // This value is returned with Privileges.list(). + ServiceId string `json:"serviceId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrivilegeName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrivilegeName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RoleRolePrivileges) MarshalJSON() ([]byte, error) { + type NoMethod RoleRolePrivileges + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RoleAssignment: JSON template for roleAssignment resource in +// Directory API. +type RoleAssignment struct { + // AssignedTo: The unique ID of the user this role is assigned to. + AssignedTo string `json:"assignedTo,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#roleAssignment. + Kind string `json:"kind,omitempty"` + + // OrgUnitId: If the role is restricted to an organization unit, this + // contains the ID for the organization unit the exercise of this role + // is restricted to. + OrgUnitId string `json:"orgUnitId,omitempty"` + + // RoleAssignmentId: ID of this roleAssignment. + RoleAssignmentId int64 `json:"roleAssignmentId,omitempty,string"` + + // RoleId: The ID of the role that is assigned. + RoleId int64 `json:"roleId,omitempty,string"` + + // ScopeType: The scope in which this role is assigned. Possible values + // are: + // - CUSTOMER + // - ORG_UNIT + ScopeType string `json:"scopeType,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AssignedTo") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssignedTo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RoleAssignment) MarshalJSON() ([]byte, error) { + type NoMethod RoleAssignment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RoleAssignments: JSON response template for List roleAssignments +// operation in Directory API. +type RoleAssignments struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: A list of RoleAssignment resources. + Items []*RoleAssignment `json:"items,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#roleAssignments. + Kind string `json:"kind,omitempty"` + + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RoleAssignments) MarshalJSON() ([]byte, error) { + type NoMethod RoleAssignments + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Roles: JSON response template for List roles operation in Directory +// API. +type Roles struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: A list of Role resources. + Items []*Role `json:"items,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#roles. + Kind string `json:"kind,omitempty"` + + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Roles) MarshalJSON() ([]byte, error) { + type NoMethod Roles + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Schema: JSON template for Schema resource in Directory API. +type Schema struct { + // DisplayName: Display name for the schema. + DisplayName string `json:"displayName,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Fields: Fields of Schema + Fields []*SchemaFieldSpec `json:"fields,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // SchemaId: Unique identifier of Schema (Read-only) + SchemaId string `json:"schemaId,omitempty"` + + // SchemaName: Schema name + SchemaName string `json:"schemaName,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Schema) MarshalJSON() ([]byte, error) { + type NoMethod Schema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SchemaFieldSpec: JSON template for FieldSpec resource for Schemas in +// Directory API. +type SchemaFieldSpec struct { + // DisplayName: Display Name of the field. + DisplayName string `json:"displayName,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // FieldId: Unique identifier of Field (Read-only) + FieldId string `json:"fieldId,omitempty"` + + // FieldName: Name of the field. + FieldName string `json:"fieldName,omitempty"` + + // FieldType: Type of the field. + FieldType string `json:"fieldType,omitempty"` + + // Indexed: Boolean specifying whether the field is indexed or not. + // + // Default: true + Indexed *bool `json:"indexed,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // MultiValued: Boolean specifying whether this is a multi-valued field + // or not. + MultiValued bool `json:"multiValued,omitempty"` + + // NumericIndexingSpec: Indexing spec for a numeric field. By default, + // only exact match queries will be supported for numeric fields. + // Setting the numericIndexingSpec allows range queries to be supported. + NumericIndexingSpec *SchemaFieldSpecNumericIndexingSpec `json:"numericIndexingSpec,omitempty"` + + // ReadAccessType: Read ACLs on the field specifying who can view values + // of this field. Valid values are "ALL_DOMAIN_USERS" and + // "ADMINS_AND_SELF". + ReadAccessType string `json:"readAccessType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SchemaFieldSpec) MarshalJSON() ([]byte, error) { + type NoMethod SchemaFieldSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SchemaFieldSpecNumericIndexingSpec: Indexing spec for a numeric +// field. By default, only exact match queries will be supported for +// numeric fields. Setting the numericIndexingSpec allows range queries +// to be supported. +type SchemaFieldSpecNumericIndexingSpec struct { + // MaxValue: Maximum value of this field. This is meant to be indicative + // rather than enforced. Values outside this range will still be + // indexed, but search may not be as performant. + MaxValue float64 `json:"maxValue,omitempty"` + + // MinValue: Minimum value of this field. This is meant to be indicative + // rather than enforced. Values outside this range will still be + // indexed, but search may not be as performant. + MinValue float64 `json:"minValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxValue") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SchemaFieldSpecNumericIndexingSpec) MarshalJSON() ([]byte, error) { + type NoMethod SchemaFieldSpecNumericIndexingSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *SchemaFieldSpecNumericIndexingSpec) UnmarshalJSON(data []byte) error { + type NoMethod SchemaFieldSpecNumericIndexingSpec + var s1 struct { + MaxValue gensupport.JSONFloat64 `json:"maxValue"` + MinValue gensupport.JSONFloat64 `json:"minValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxValue = float64(s1.MaxValue) + s.MinValue = float64(s1.MinValue) + return nil +} + +// Schemas: JSON response template for List Schema operation in +// Directory API. +type Schemas struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // Schemas: List of UserSchema objects. + Schemas []*Schema `json:"schemas,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Schemas) MarshalJSON() ([]byte, error) { + type NoMethod Schemas + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Token: JSON template for token resource in Directory API. +type Token struct { + // Anonymous: Whether the application is registered with Google. The + // value is true if the application has an anonymous Client ID. + Anonymous bool `json:"anonymous,omitempty"` + + // ClientId: The Client ID of the application the token is issued to. + ClientId string `json:"clientId,omitempty"` + + // DisplayText: The displayable name of the application the token is + // issued to. + DisplayText string `json:"displayText,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#token. + Kind string `json:"kind,omitempty"` + + // NativeApp: Whether the token is issued to an installed application. + // The value is true if the application is installed to a desktop or + // mobile device. + NativeApp bool `json:"nativeApp,omitempty"` + + // Scopes: A list of authorization scopes the application is granted. + Scopes []string `json:"scopes,omitempty"` + + // UserKey: The unique ID of the user that issued the token. + UserKey string `json:"userKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Anonymous") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Anonymous") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Token) MarshalJSON() ([]byte, error) { + type NoMethod Token + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Tokens: JSON response template for List tokens operation in Directory +// API. +type Tokens struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: A list of Token resources. + Items []*Token `json:"items,omitempty"` + + // Kind: The type of the API resource. This is always + // admin#directory#tokenList. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Tokens) MarshalJSON() ([]byte, error) { + type NoMethod Tokens + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// User: JSON template for User object in Directory API. +type User struct { + Addresses interface{} `json:"addresses,omitempty"` + + // AgreedToTerms: Indicates if user has agreed to terms (Read-only) + AgreedToTerms bool `json:"agreedToTerms,omitempty"` + + // Aliases: List of aliases (Read-only) + Aliases []string `json:"aliases,omitempty"` + + // Archived: Indicates if user is archived. + Archived bool `json:"archived,omitempty"` + + // ChangePasswordAtNextLogin: Boolean indicating if the user should + // change password in next login + ChangePasswordAtNextLogin bool `json:"changePasswordAtNextLogin,omitempty"` + + // CreationTime: User's G Suite account creation time. (Read-only) + CreationTime string `json:"creationTime,omitempty"` + + // CustomSchemas: Custom fields of the user. + CustomSchemas map[string]googleapi.RawMessage `json:"customSchemas,omitempty"` + + // CustomerId: CustomerId of User (Read-only) + CustomerId string `json:"customerId,omitempty"` + + DeletionTime string `json:"deletionTime,omitempty"` + + Emails interface{} `json:"emails,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + ExternalIds interface{} `json:"externalIds,omitempty"` + + Gender interface{} `json:"gender,omitempty"` + + // HashFunction: Hash function name for password. Supported are MD5, + // SHA-1 and crypt + HashFunction string `json:"hashFunction,omitempty"` + + // Id: Unique identifier of User (Read-only) + Id string `json:"id,omitempty"` + + Ims interface{} `json:"ims,omitempty"` + + // IncludeInGlobalAddressList: Boolean indicating if user is included in + // Global Address List + IncludeInGlobalAddressList bool `json:"includeInGlobalAddressList,omitempty"` + + // IpWhitelisted: Boolean indicating if ip is whitelisted + IpWhitelisted bool `json:"ipWhitelisted,omitempty"` + + // IsAdmin: Boolean indicating if the user is admin (Read-only) + IsAdmin bool `json:"isAdmin,omitempty"` + + // IsDelegatedAdmin: Boolean indicating if the user is delegated admin + // (Read-only) + IsDelegatedAdmin bool `json:"isDelegatedAdmin,omitempty"` + + // IsEnforcedIn2Sv: Is 2-step verification enforced (Read-only) + IsEnforcedIn2Sv bool `json:"isEnforcedIn2Sv,omitempty"` + + // IsEnrolledIn2Sv: Is enrolled in 2-step verification (Read-only) + IsEnrolledIn2Sv bool `json:"isEnrolledIn2Sv,omitempty"` + + // IsMailboxSetup: Is mailbox setup (Read-only) + IsMailboxSetup bool `json:"isMailboxSetup,omitempty"` + + Keywords interface{} `json:"keywords,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + Languages interface{} `json:"languages,omitempty"` + + // LastLoginTime: User's last login time. (Read-only) + LastLoginTime string `json:"lastLoginTime,omitempty"` + + Locations interface{} `json:"locations,omitempty"` + + // Name: User's name + Name *UserName `json:"name,omitempty"` + + // NonEditableAliases: List of non editable aliases (Read-only) + NonEditableAliases []string `json:"nonEditableAliases,omitempty"` + + Notes interface{} `json:"notes,omitempty"` + + // OrgUnitPath: OrgUnit of User + OrgUnitPath string `json:"orgUnitPath,omitempty"` + + Organizations interface{} `json:"organizations,omitempty"` + + // Password: User's password + Password string `json:"password,omitempty"` + + Phones interface{} `json:"phones,omitempty"` + + PosixAccounts interface{} `json:"posixAccounts,omitempty"` + + // PrimaryEmail: username of User + PrimaryEmail string `json:"primaryEmail,omitempty"` + + // RecoveryEmail: Recovery email of the user. + RecoveryEmail string `json:"recoveryEmail,omitempty"` + + // RecoveryPhone: Recovery phone of the user. The phone number must be + // in the E.164 format, starting with the plus sign (+). Example: + // +16506661212. + RecoveryPhone string `json:"recoveryPhone,omitempty"` + + Relations interface{} `json:"relations,omitempty"` + + SshPublicKeys interface{} `json:"sshPublicKeys,omitempty"` + + // Suspended: Indicates if user is suspended. + Suspended bool `json:"suspended,omitempty"` + + // SuspensionReason: Suspension reason if user is suspended (Read-only) + SuspensionReason string `json:"suspensionReason,omitempty"` + + // ThumbnailPhotoEtag: ETag of the user's photo (Read-only) + ThumbnailPhotoEtag string `json:"thumbnailPhotoEtag,omitempty"` + + // ThumbnailPhotoUrl: Photo Url of the user (Read-only) + ThumbnailPhotoUrl string `json:"thumbnailPhotoUrl,omitempty"` + + Websites interface{} `json:"websites,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Addresses") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Addresses") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *User) MarshalJSON() ([]byte, error) { + type NoMethod User + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserAbout: JSON template for About (notes) of a user in Directory +// API. +type UserAbout struct { + // ContentType: About entry can have a type which indicates the content + // type. It can either be plain or html. By default, notes contents are + // assumed to contain plain text. + ContentType string `json:"contentType,omitempty"` + + // Value: Actual value of notes. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserAbout) MarshalJSON() ([]byte, error) { + type NoMethod UserAbout + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserAddress: JSON template for address. +type UserAddress struct { + // Country: Country. + Country string `json:"country,omitempty"` + + // CountryCode: Country code. + CountryCode string `json:"countryCode,omitempty"` + + // CustomType: Custom type. + CustomType string `json:"customType,omitempty"` + + // ExtendedAddress: Extended Address. + ExtendedAddress string `json:"extendedAddress,omitempty"` + + // Formatted: Formatted address. + Formatted string `json:"formatted,omitempty"` + + // Locality: Locality. + Locality string `json:"locality,omitempty"` + + // PoBox: Other parts of address. + PoBox string `json:"poBox,omitempty"` + + // PostalCode: Postal code. + PostalCode string `json:"postalCode,omitempty"` + + // Primary: If this is user's primary address. Only one entry could be + // marked as primary. + Primary bool `json:"primary,omitempty"` + + // Region: Region. + Region string `json:"region,omitempty"` + + // SourceIsStructured: User supplied address was structured. Structured + // addresses are NOT supported at this time. You might be able to write + // structured addresses, but any values will eventually be clobbered. + SourceIsStructured bool `json:"sourceIsStructured,omitempty"` + + // StreetAddress: Street. + StreetAddress string `json:"streetAddress,omitempty"` + + // Type: Each entry can have a type which indicates standard values of + // that entry. For example address could be of home, work etc. In + // addition to the standard type, an entry can have a custom type and + // can take any value. Such type should have the CUSTOM value as type + // and also have a customType value. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Country") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Country") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserAddress) MarshalJSON() ([]byte, error) { + type NoMethod UserAddress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserEmail: JSON template for an email. +type UserEmail struct { + // Address: Email id of the user. + Address string `json:"address,omitempty"` + + // CustomType: Custom Type. + CustomType string `json:"customType,omitempty"` + + // Primary: If this is user's primary email. Only one entry could be + // marked as primary. + Primary bool `json:"primary,omitempty"` + + // Type: Each entry can have a type which indicates standard types of + // that entry. For example email could be of home, work etc. In addition + // to the standard type, an entry can have a custom type and can take + // any value Such types should have the CUSTOM value as type and also + // have a customType value. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Address") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserEmail) MarshalJSON() ([]byte, error) { + type NoMethod UserEmail + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserExternalId: JSON template for an externalId entry. +type UserExternalId struct { + // CustomType: Custom type. + CustomType string `json:"customType,omitempty"` + + // Type: The type of the Id. + Type string `json:"type,omitempty"` + + // Value: The value of the id. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserExternalId) MarshalJSON() ([]byte, error) { + type NoMethod UserExternalId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UserGender struct { + // AddressMeAs: AddressMeAs. A human-readable string containing the + // proper way to refer to the profile owner by humans, for example + // "he/him/his" or "they/them/their". + AddressMeAs string `json:"addressMeAs,omitempty"` + + // CustomGender: Custom gender. + CustomGender string `json:"customGender,omitempty"` + + // Type: Gender. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddressMeAs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddressMeAs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserGender) MarshalJSON() ([]byte, error) { + type NoMethod UserGender + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserIm: JSON template for instant messenger of an user. +type UserIm struct { + // CustomProtocol: Custom protocol. + CustomProtocol string `json:"customProtocol,omitempty"` + + // CustomType: Custom type. + CustomType string `json:"customType,omitempty"` + + // Im: Instant messenger id. + Im string `json:"im,omitempty"` + + // Primary: If this is user's primary im. Only one entry could be marked + // as primary. + Primary bool `json:"primary,omitempty"` + + // Protocol: Protocol used in the instant messenger. It should be one of + // the values from ImProtocolTypes map. Similar to type, it can take a + // CUSTOM value and specify the custom name in customProtocol field. + Protocol string `json:"protocol,omitempty"` + + // Type: Each entry can have a type which indicates standard types of + // that entry. For example instant messengers could be of home, work + // etc. In addition to the standard type, an entry can have a custom + // type and can take any value. Such types should have the CUSTOM value + // as type and also have a customType value. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomProtocol") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomProtocol") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UserIm) MarshalJSON() ([]byte, error) { + type NoMethod UserIm + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserKeyword: JSON template for a keyword entry. +type UserKeyword struct { + // CustomType: Custom Type. + CustomType string `json:"customType,omitempty"` + + // Type: Each entry can have a type which indicates standard type of + // that entry. For example, keyword could be of type occupation or + // outlook. In addition to the standard type, an entry can have a custom + // type and can give it any name. Such types should have the CUSTOM + // value as type and also have a customType value. + Type string `json:"type,omitempty"` + + // Value: Keyword. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserKeyword) MarshalJSON() ([]byte, error) { + type NoMethod UserKeyword + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserLanguage: JSON template for a language entry. +type UserLanguage struct { + // CustomLanguage: Other language. User can provide own language name if + // there is no corresponding Google III language code. If this is set + // LanguageCode can't be set + CustomLanguage string `json:"customLanguage,omitempty"` + + // LanguageCode: Language Code. Should be used for storing Google III + // LanguageCode string representation for language. Illegal values cause + // SchemaException. + LanguageCode string `json:"languageCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomLanguage") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomLanguage") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UserLanguage) MarshalJSON() ([]byte, error) { + type NoMethod UserLanguage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserLocation: JSON template for a location entry. +type UserLocation struct { + // Area: Textual location. This is most useful for display purposes to + // concisely describe the location. For example, "Mountain View, CA", + // "Near Seattle", "US-NYC-9TH 9A209A". + Area string `json:"area,omitempty"` + + // BuildingId: Building Identifier. + BuildingId string `json:"buildingId,omitempty"` + + // CustomType: Custom Type. + CustomType string `json:"customType,omitempty"` + + // DeskCode: Most specific textual code of individual desk location. + DeskCode string `json:"deskCode,omitempty"` + + // FloorName: Floor name/number. + FloorName string `json:"floorName,omitempty"` + + // FloorSection: Floor section. More specific location within the floor. + // For example, if a floor is divided into sections "A", "B", and "C", + // this field would identify one of those values. + FloorSection string `json:"floorSection,omitempty"` + + // Type: Each entry can have a type which indicates standard types of + // that entry. For example location could be of types default and desk. + // In addition to standard type, an entry can have a custom type and can + // give it any name. Such types should have "custom" as type and also + // have a customType value. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Area") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Area") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserLocation) MarshalJSON() ([]byte, error) { + type NoMethod UserLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserMakeAdmin: JSON request template for setting/revoking admin +// status of a user in Directory API. +type UserMakeAdmin struct { + // Status: Boolean indicating new admin status of the user + Status bool `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Status") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Status") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserMakeAdmin) MarshalJSON() ([]byte, error) { + type NoMethod UserMakeAdmin + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserName: JSON template for name of a user in Directory API. +type UserName struct { + // FamilyName: Last Name + FamilyName string `json:"familyName,omitempty"` + + // FullName: Full Name + FullName string `json:"fullName,omitempty"` + + // GivenName: First Name + GivenName string `json:"givenName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FamilyName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FamilyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserName) MarshalJSON() ([]byte, error) { + type NoMethod UserName + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserOrganization: JSON template for an organization entry. +type UserOrganization struct { + // CostCenter: The cost center of the users department. + CostCenter string `json:"costCenter,omitempty"` + + // CustomType: Custom type. + CustomType string `json:"customType,omitempty"` + + // Department: Department within the organization. + Department string `json:"department,omitempty"` + + // Description: Description of the organization. + Description string `json:"description,omitempty"` + + // Domain: The domain to which the organization belongs to. + Domain string `json:"domain,omitempty"` + + // FullTimeEquivalent: The full-time equivalent millipercent within the + // organization (100000 = 100%). + FullTimeEquivalent int64 `json:"fullTimeEquivalent,omitempty"` + + // Location: Location of the organization. This need not be fully + // qualified address. + Location string `json:"location,omitempty"` + + // Name: Name of the organization + Name string `json:"name,omitempty"` + + // Primary: If it user's primary organization. + Primary bool `json:"primary,omitempty"` + + // Symbol: Symbol of the organization. + Symbol string `json:"symbol,omitempty"` + + // Title: Title (designation) of the user in the organization. + Title string `json:"title,omitempty"` + + // Type: Each entry can have a type which indicates standard types of + // that entry. For example organization could be of school, work etc. In + // addition to the standard type, an entry can have a custom type and + // can give it any name. Such types should have the CUSTOM value as type + // and also have a CustomType value. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CostCenter") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CostCenter") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserOrganization) MarshalJSON() ([]byte, error) { + type NoMethod UserOrganization + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPhone: JSON template for a phone entry. +type UserPhone struct { + // CustomType: Custom Type. + CustomType string `json:"customType,omitempty"` + + // Primary: If this is user's primary phone or not. + Primary bool `json:"primary,omitempty"` + + // Type: Each entry can have a type which indicates standard types of + // that entry. For example phone could be of home_fax, work, mobile etc. + // In addition to the standard type, an entry can have a custom type and + // can give it any name. Such types should have the CUSTOM value as type + // and also have a customType value. + Type string `json:"type,omitempty"` + + // Value: Phone number. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserPhone) MarshalJSON() ([]byte, error) { + type NoMethod UserPhone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPhoto: JSON template for Photo object in Directory API. +type UserPhoto struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Height: Height in pixels of the photo + Height int64 `json:"height,omitempty"` + + // Id: Unique identifier of User (Read-only) + Id string `json:"id,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // MimeType: Mime Type of the photo + MimeType string `json:"mimeType,omitempty"` + + // PhotoData: Base64 encoded photo data + PhotoData string `json:"photoData,omitempty"` + + // PrimaryEmail: Primary email of User (Read-only) + PrimaryEmail string `json:"primaryEmail,omitempty"` + + // Width: Width in pixels of the photo + Width int64 `json:"width,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserPhoto) MarshalJSON() ([]byte, error) { + type NoMethod UserPhoto + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPosixAccount: JSON template for a POSIX account entry. +// Description of the field family: go/fbs-posix. +type UserPosixAccount struct { + // AccountId: A POSIX account field identifier. + AccountId string `json:"accountId,omitempty"` + + // Gecos: The GECOS (user information) for this account. + Gecos string `json:"gecos,omitempty"` + + // Gid: The default group ID. + Gid uint64 `json:"gid,omitempty,string"` + + // HomeDirectory: The path to the home directory for this account. + HomeDirectory string `json:"homeDirectory,omitempty"` + + // OperatingSystemType: The operating system type for this account. + OperatingSystemType string `json:"operatingSystemType,omitempty"` + + // Primary: If this is user's primary account within the SystemId. + Primary bool `json:"primary,omitempty"` + + // Shell: The path to the login shell for this account. + Shell string `json:"shell,omitempty"` + + // SystemId: System identifier for which account Username or Uid apply + // to. + SystemId string `json:"systemId,omitempty"` + + // Uid: The POSIX compliant user ID. + Uid uint64 `json:"uid,omitempty,string"` + + // Username: The username of the account. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccountId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccountId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserPosixAccount) MarshalJSON() ([]byte, error) { + type NoMethod UserPosixAccount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserRelation: JSON template for a relation entry. +type UserRelation struct { + // CustomType: Custom Type. + CustomType string `json:"customType,omitempty"` + + // Type: The relation of the user. Some of the possible values are + // mother, father, sister, brother, manager, assistant, partner. + Type string `json:"type,omitempty"` + + // Value: The name of the relation. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserRelation) MarshalJSON() ([]byte, error) { + type NoMethod UserRelation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserSshPublicKey: JSON template for a POSIX account entry. +type UserSshPublicKey struct { + // ExpirationTimeUsec: An expiration time in microseconds since epoch. + ExpirationTimeUsec int64 `json:"expirationTimeUsec,omitempty,string"` + + // Fingerprint: A SHA-256 fingerprint of the SSH public key. (Read-only) + Fingerprint string `json:"fingerprint,omitempty"` + + // Key: An SSH public key. + Key string `json:"key,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpirationTimeUsec") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpirationTimeUsec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UserSshPublicKey) MarshalJSON() ([]byte, error) { + type NoMethod UserSshPublicKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserUndelete: JSON request template to undelete a user in Directory +// API. +type UserUndelete struct { + // OrgUnitPath: OrgUnit of User + OrgUnitPath string `json:"orgUnitPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OrgUnitPath") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OrgUnitPath") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserUndelete) MarshalJSON() ([]byte, error) { + type NoMethod UserUndelete + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserWebsite: JSON template for a website entry. +type UserWebsite struct { + // CustomType: Custom Type. + CustomType string `json:"customType,omitempty"` + + // Primary: If this is user's primary website or not. + Primary bool `json:"primary,omitempty"` + + // Type: Each entry can have a type which indicates standard types of + // that entry. For example website could be of home, work, blog etc. In + // addition to the standard type, an entry can have a custom type and + // can give it any name. Such types should have the CUSTOM value as type + // and also have a customType value. + Type string `json:"type,omitempty"` + + // Value: Website. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserWebsite) MarshalJSON() ([]byte, error) { + type NoMethod UserWebsite + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Users: JSON response template for List Users operation in Apps +// Directory API. +type Users struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: Kind of resource this is. + Kind string `json:"kind,omitempty"` + + // NextPageToken: Token used to access next page of this result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TriggerEvent: Event that triggered this response (only used in case + // of Push Response) + TriggerEvent string `json:"trigger_event,omitempty"` + + // Users: List of user objects. + Users []*User `json:"users,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Users) MarshalJSON() ([]byte, error) { + type NoMethod Users + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VerificationCode: JSON template for verification codes in Directory +// API. +type VerificationCode struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Kind: The type of the resource. This is always + // admin#directory#verificationCode. + Kind string `json:"kind,omitempty"` + + // UserId: The obfuscated unique ID of the user. + UserId string `json:"userId,omitempty"` + + // VerificationCode: A current verification code for the user. + // Invalidated or used verification codes are not returned as part of + // the result. + VerificationCode string `json:"verificationCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VerificationCode) MarshalJSON() ([]byte, error) { + type NoMethod VerificationCode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VerificationCodes: JSON response template for List verification codes +// operation in Directory API. +type VerificationCodes struct { + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // Items: A list of verification code resources. + Items []*VerificationCode `json:"items,omitempty"` + + // Kind: The type of the resource. This is always + // admin#directory#verificationCodesList. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VerificationCodes) MarshalJSON() ([]byte, error) { + type NoMethod VerificationCodes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "directory.asps.delete": + +type AspsDeleteCall struct { + s *Service + userKey string + codeId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete an ASP issued by a user. +func (r *AspsService) Delete(userKey string, codeId int64) *AspsDeleteCall { + c := &AspsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.codeId = codeId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AspsDeleteCall) Fields(s ...googleapi.Field) *AspsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AspsDeleteCall) Context(ctx context.Context) *AspsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AspsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AspsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/asps/{codeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + "codeId": strconv.FormatInt(c.codeId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.asps.delete" call. +func (c *AspsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Delete an ASP issued by a user.", + // "httpMethod": "DELETE", + // "id": "directory.asps.delete", + // "parameterOrder": [ + // "userKey", + // "codeId" + // ], + // "parameters": { + // "codeId": { + // "description": "The unique ID of the ASP to be deleted.", + // "format": "int32", + // "location": "path", + // "required": true, + // "type": "integer" + // }, + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/asps/{codeId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.asps.get": + +type AspsGetCall struct { + s *Service + userKey string + codeId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get information about an ASP issued by a user. +func (r *AspsService) Get(userKey string, codeId int64) *AspsGetCall { + c := &AspsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.codeId = codeId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AspsGetCall) Fields(s ...googleapi.Field) *AspsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AspsGetCall) IfNoneMatch(entityTag string) *AspsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AspsGetCall) Context(ctx context.Context) *AspsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AspsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AspsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/asps/{codeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + "codeId": strconv.FormatInt(c.codeId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.asps.get" call. +// Exactly one of *Asp or error will be non-nil. Any non-2xx status code +// is an error. Response headers are in either +// *Asp.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AspsGetCall) Do(opts ...googleapi.CallOption) (*Asp, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Asp{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get information about an ASP issued by a user.", + // "httpMethod": "GET", + // "id": "directory.asps.get", + // "parameterOrder": [ + // "userKey", + // "codeId" + // ], + // "parameters": { + // "codeId": { + // "description": "The unique ID of the ASP.", + // "format": "int32", + // "location": "path", + // "required": true, + // "type": "integer" + // }, + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/asps/{codeId}", + // "response": { + // "$ref": "Asp" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.asps.list": + +type AspsListCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the ASPs issued by a user. +func (r *AspsService) List(userKey string) *AspsListCall { + c := &AspsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AspsListCall) Fields(s ...googleapi.Field) *AspsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AspsListCall) IfNoneMatch(entityTag string) *AspsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AspsListCall) Context(ctx context.Context) *AspsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AspsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AspsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/asps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.asps.list" call. +// Exactly one of *Asps or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Asps.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AspsListCall) Do(opts ...googleapi.CallOption) (*Asps, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Asps{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List the ASPs issued by a user.", + // "httpMethod": "GET", + // "id": "directory.asps.list", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/asps", + // "response": { + // "$ref": "Asps" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "admin.channels.stop": + +type ChannelsStopCall struct { + s *Service + channel *Channel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stop watching resources through this channel +func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall { + c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.channel = channel + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChannelsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "/admin/directory_v1/channels/stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admin.channels.stop" call. +func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Stop watching resources through this channel", + // "httpMethod": "POST", + // "id": "admin.channels.stop", + // "path": "/admin/directory_v1/channels/stop", + // "request": { + // "$ref": "Channel", + // "parameterName": "resource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.alias", + // "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + // "https://www.googleapis.com/auth/admin.directory.user.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "directory.chromeosdevices.action": + +type ChromeosdevicesActionCall struct { + s *Service + customerId string + resourceId string + chromeosdeviceaction *ChromeOsDeviceAction + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Action: Take action on Chrome OS Device +func (r *ChromeosdevicesService) Action(customerId string, resourceId string, chromeosdeviceaction *ChromeOsDeviceAction) *ChromeosdevicesActionCall { + c := &ChromeosdevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.resourceId = resourceId + c.chromeosdeviceaction = chromeosdeviceaction + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChromeosdevicesActionCall) Fields(s ...googleapi.Field) *ChromeosdevicesActionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChromeosdevicesActionCall) Context(ctx context.Context) *ChromeosdevicesActionCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChromeosdevicesActionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChromeosdevicesActionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdeviceaction) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{resourceId}/action") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.chromeosdevices.action" call. +func (c *ChromeosdevicesActionCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Take action on Chrome OS Device", + // "httpMethod": "POST", + // "id": "directory.chromeosdevices.action", + // "parameterOrder": [ + // "customerId", + // "resourceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "resourceId": { + // "description": "Immutable ID of Chrome OS Device", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/chromeos/{resourceId}/action", + // "request": { + // "$ref": "ChromeOsDeviceAction" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.chromeos" + // ] + // } + +} + +// method id "directory.chromeosdevices.get": + +type ChromeosdevicesGetCall struct { + s *Service + customerId string + deviceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve Chrome OS Device +func (r *ChromeosdevicesService) Get(customerId string, deviceId string) *ChromeosdevicesGetCall { + c := &ChromeosdevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.deviceId = deviceId + return c +} + +// Projection sets the optional parameter "projection": Restrict +// information returned to a set of selected fields. +// +// Possible values: +// "BASIC" - Includes only the basic metadata fields (e.g., deviceId, +// serialNumber, status, and user) +// "FULL" - Includes all metadata fields +func (c *ChromeosdevicesGetCall) Projection(projection string) *ChromeosdevicesGetCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChromeosdevicesGetCall) Fields(s ...googleapi.Field) *ChromeosdevicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ChromeosdevicesGetCall) IfNoneMatch(entityTag string) *ChromeosdevicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChromeosdevicesGetCall) Context(ctx context.Context) *ChromeosdevicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChromeosdevicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChromeosdevicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{deviceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "deviceId": c.deviceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.chromeosdevices.get" call. +// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ChromeOsDevice.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ChromeosdevicesGetCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ChromeOsDevice{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve Chrome OS Device", + // "httpMethod": "GET", + // "id": "directory.chromeosdevices.get", + // "parameterOrder": [ + // "customerId", + // "deviceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "deviceId": { + // "description": "Immutable ID of Chrome OS Device", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projection": { + // "description": "Restrict information returned to a set of selected fields.", + // "enum": [ + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + // "Includes all metadata fields" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/chromeos/{deviceId}", + // "response": { + // "$ref": "ChromeOsDevice" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.chromeos", + // "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly" + // ] + // } + +} + +// method id "directory.chromeosdevices.list": + +type ChromeosdevicesListCall struct { + s *Service + customerId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve all Chrome OS Devices of a customer (paginated) +func (r *ChromeosdevicesService) List(customerId string) *ChromeosdevicesListCall { + c := &ChromeosdevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. Max allowed value is 200. +func (c *ChromeosdevicesListCall) MaxResults(maxResults int64) *ChromeosdevicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Column to use for +// sorting results +// +// Possible values: +// "annotatedLocation" - Chromebook location as annotated by the +// administrator. +// "annotatedUser" - Chromebook user as annotated by administrator. +// "lastSync" - Chromebook last sync. +// "notes" - Chromebook notes as annotated by the administrator. +// "serialNumber" - Chromebook Serial Number. +// "status" - Chromebook status. +// "supportEndDate" - Chromebook support end date. +func (c *ChromeosdevicesListCall) OrderBy(orderBy string) *ChromeosdevicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// OrgUnitPath sets the optional parameter "orgUnitPath": Full path of +// the organizational unit or its ID +func (c *ChromeosdevicesListCall) OrgUnitPath(orgUnitPath string) *ChromeosdevicesListCall { + c.urlParams_.Set("orgUnitPath", orgUnitPath) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list +func (c *ChromeosdevicesListCall) PageToken(pageToken string) *ChromeosdevicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Projection sets the optional parameter "projection": Restrict +// information returned to a set of selected fields. +// +// Possible values: +// "BASIC" - Includes only the basic metadata fields (e.g., deviceId, +// serialNumber, status, and user) +// "FULL" - Includes all metadata fields +func (c *ChromeosdevicesListCall) Projection(projection string) *ChromeosdevicesListCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Query sets the optional parameter "query": Search string in the +// format provided by this Help Center article. +func (c *ChromeosdevicesListCall) Query(query string) *ChromeosdevicesListCall { + c.urlParams_.Set("query", query) + return c +} + +// SortOrder sets the optional parameter "sortOrder": Whether to return +// results in ascending or descending order. Only of use when orderBy is +// also used +// +// Possible values: +// "ASCENDING" - Ascending order. +// "DESCENDING" - Descending order. +func (c *ChromeosdevicesListCall) SortOrder(sortOrder string) *ChromeosdevicesListCall { + c.urlParams_.Set("sortOrder", sortOrder) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChromeosdevicesListCall) Fields(s ...googleapi.Field) *ChromeosdevicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ChromeosdevicesListCall) IfNoneMatch(entityTag string) *ChromeosdevicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChromeosdevicesListCall) Context(ctx context.Context) *ChromeosdevicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChromeosdevicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChromeosdevicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.chromeosdevices.list" call. +// Exactly one of *ChromeOsDevices or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ChromeOsDevices.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ChromeosdevicesListCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevices, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ChromeOsDevices{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all Chrome OS Devices of a customer (paginated)", + // "httpMethod": "GET", + // "id": "directory.chromeosdevices.list", + // "parameterOrder": [ + // "customerId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "100", + // "description": "Maximum number of results to return. Max allowed value is 200.", + // "format": "int32", + // "location": "query", + // "minimum": "1", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Column to use for sorting results", + // "enum": [ + // "annotatedLocation", + // "annotatedUser", + // "lastSync", + // "notes", + // "serialNumber", + // "status", + // "supportEndDate" + // ], + // "enumDescriptions": [ + // "Chromebook location as annotated by the administrator.", + // "Chromebook user as annotated by administrator.", + // "Chromebook last sync.", + // "Chromebook notes as annotated by the administrator.", + // "Chromebook Serial Number.", + // "Chromebook status.", + // "Chromebook support end date." + // ], + // "location": "query", + // "type": "string" + // }, + // "orgUnitPath": { + // "description": "Full path of the organizational unit or its ID", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list", + // "location": "query", + // "type": "string" + // }, + // "projection": { + // "description": "Restrict information returned to a set of selected fields.", + // "enum": [ + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + // "Includes all metadata fields" + // ], + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Search string in the format provided by this Help Center article.", + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", + // "enum": [ + // "ASCENDING", + // "DESCENDING" + // ], + // "enumDescriptions": [ + // "Ascending order.", + // "Descending order." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/chromeos", + // "response": { + // "$ref": "ChromeOsDevices" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.chromeos", + // "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ChromeosdevicesListCall) Pages(ctx context.Context, f func(*ChromeOsDevices) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.chromeosdevices.moveDevicesToOu": + +type ChromeosdevicesMoveDevicesToOuCall struct { + s *Service + customerId string + chromeosmovedevicestoou *ChromeOsMoveDevicesToOu + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveDevicesToOu: Move or insert multiple Chrome OS Devices to +// organizational unit +func (r *ChromeosdevicesService) MoveDevicesToOu(customerId string, orgUnitPath string, chromeosmovedevicestoou *ChromeOsMoveDevicesToOu) *ChromeosdevicesMoveDevicesToOuCall { + c := &ChromeosdevicesMoveDevicesToOuCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.urlParams_.Set("orgUnitPath", orgUnitPath) + c.chromeosmovedevicestoou = chromeosmovedevicestoou + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChromeosdevicesMoveDevicesToOuCall) Fields(s ...googleapi.Field) *ChromeosdevicesMoveDevicesToOuCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChromeosdevicesMoveDevicesToOuCall) Context(ctx context.Context) *ChromeosdevicesMoveDevicesToOuCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChromeosdevicesMoveDevicesToOuCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChromeosdevicesMoveDevicesToOuCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosmovedevicestoou) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/moveDevicesToOu") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.chromeosdevices.moveDevicesToOu" call. +func (c *ChromeosdevicesMoveDevicesToOuCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Move or insert multiple Chrome OS Devices to organizational unit", + // "httpMethod": "POST", + // "id": "directory.chromeosdevices.moveDevicesToOu", + // "parameterOrder": [ + // "customerId", + // "orgUnitPath" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orgUnitPath": { + // "description": "Full path of the target organizational unit or its ID", + // "location": "query", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/chromeos/moveDevicesToOu", + // "request": { + // "$ref": "ChromeOsMoveDevicesToOu" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.chromeos" + // ] + // } + +} + +// method id "directory.chromeosdevices.patch": + +type ChromeosdevicesPatchCall struct { + s *Service + customerId string + deviceId string + chromeosdevice *ChromeOsDevice + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update Chrome OS Device. This method supports patch semantics. +func (r *ChromeosdevicesService) Patch(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesPatchCall { + c := &ChromeosdevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.deviceId = deviceId + c.chromeosdevice = chromeosdevice + return c +} + +// Projection sets the optional parameter "projection": Restrict +// information returned to a set of selected fields. +// +// Possible values: +// "BASIC" - Includes only the basic metadata fields (e.g., deviceId, +// serialNumber, status, and user) +// "FULL" - Includes all metadata fields +func (c *ChromeosdevicesPatchCall) Projection(projection string) *ChromeosdevicesPatchCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChromeosdevicesPatchCall) Fields(s ...googleapi.Field) *ChromeosdevicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChromeosdevicesPatchCall) Context(ctx context.Context) *ChromeosdevicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChromeosdevicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChromeosdevicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{deviceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "deviceId": c.deviceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.chromeosdevices.patch" call. +// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ChromeOsDevice.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ChromeosdevicesPatchCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ChromeOsDevice{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update Chrome OS Device. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.chromeosdevices.patch", + // "parameterOrder": [ + // "customerId", + // "deviceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "deviceId": { + // "description": "Immutable ID of Chrome OS Device", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projection": { + // "description": "Restrict information returned to a set of selected fields.", + // "enum": [ + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + // "Includes all metadata fields" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/chromeos/{deviceId}", + // "request": { + // "$ref": "ChromeOsDevice" + // }, + // "response": { + // "$ref": "ChromeOsDevice" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.chromeos" + // ] + // } + +} + +// method id "directory.chromeosdevices.update": + +type ChromeosdevicesUpdateCall struct { + s *Service + customerId string + deviceId string + chromeosdevice *ChromeOsDevice + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Update Chrome OS Device +func (r *ChromeosdevicesService) Update(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesUpdateCall { + c := &ChromeosdevicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.deviceId = deviceId + c.chromeosdevice = chromeosdevice + return c +} + +// Projection sets the optional parameter "projection": Restrict +// information returned to a set of selected fields. +// +// Possible values: +// "BASIC" - Includes only the basic metadata fields (e.g., deviceId, +// serialNumber, status, and user) +// "FULL" - Includes all metadata fields +func (c *ChromeosdevicesUpdateCall) Projection(projection string) *ChromeosdevicesUpdateCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ChromeosdevicesUpdateCall) Fields(s ...googleapi.Field) *ChromeosdevicesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ChromeosdevicesUpdateCall) Context(ctx context.Context) *ChromeosdevicesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChromeosdevicesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChromeosdevicesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{deviceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "deviceId": c.deviceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.chromeosdevices.update" call. +// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ChromeOsDevice.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ChromeosdevicesUpdateCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ChromeOsDevice{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update Chrome OS Device", + // "httpMethod": "PUT", + // "id": "directory.chromeosdevices.update", + // "parameterOrder": [ + // "customerId", + // "deviceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "deviceId": { + // "description": "Immutable ID of Chrome OS Device", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projection": { + // "description": "Restrict information returned to a set of selected fields.", + // "enum": [ + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", + // "Includes all metadata fields" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/chromeos/{deviceId}", + // "request": { + // "$ref": "ChromeOsDevice" + // }, + // "response": { + // "$ref": "ChromeOsDevice" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.chromeos" + // ] + // } + +} + +// method id "directory.customers.get": + +type CustomersGetCall struct { + s *Service + customerKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a customer. +func (r *CustomersService) Get(customerKey string) *CustomersGetCall { + c := &CustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerKey = customerKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersGetCall) Fields(s ...googleapi.Field) *CustomersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersGetCall) IfNoneMatch(entityTag string) *CustomersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customers/{customerKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerKey": c.customerKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.customers.get" call. +// Exactly one of *Customer or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Customer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a customer.", + // "httpMethod": "GET", + // "id": "directory.customers.get", + // "parameterOrder": [ + // "customerKey" + // ], + // "parameters": { + // "customerKey": { + // "description": "Id of the customer to be retrieved", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customers/{customerKey}", + // "response": { + // "$ref": "Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.customer", + // "https://www.googleapis.com/auth/admin.directory.customer.readonly" + // ] + // } + +} + +// method id "directory.customers.patch": + +type CustomersPatchCall struct { + s *Service + customerKey string + customer *Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a customer. This method supports patch semantics. +func (r *CustomersService) Patch(customerKey string, customer *Customer) *CustomersPatchCall { + c := &CustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerKey = customerKey + c.customer = customer + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersPatchCall) Fields(s ...googleapi.Field) *CustomersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customers/{customerKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerKey": c.customerKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.customers.patch" call. +// Exactly one of *Customer or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Customer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a customer. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.customers.patch", + // "parameterOrder": [ + // "customerKey" + // ], + // "parameters": { + // "customerKey": { + // "description": "Id of the customer to be updated", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customers/{customerKey}", + // "request": { + // "$ref": "Customer" + // }, + // "response": { + // "$ref": "Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.customer" + // ] + // } + +} + +// method id "directory.customers.update": + +type CustomersUpdateCall struct { + s *Service + customerKey string + customer *Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a customer. +func (r *CustomersService) Update(customerKey string, customer *Customer) *CustomersUpdateCall { + c := &CustomersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerKey = customerKey + c.customer = customer + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersUpdateCall) Fields(s ...googleapi.Field) *CustomersUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersUpdateCall) Context(ctx context.Context) *CustomersUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customers/{customerKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerKey": c.customerKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.customers.update" call. +// Exactly one of *Customer or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Customer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersUpdateCall) Do(opts ...googleapi.CallOption) (*Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a customer.", + // "httpMethod": "PUT", + // "id": "directory.customers.update", + // "parameterOrder": [ + // "customerKey" + // ], + // "parameters": { + // "customerKey": { + // "description": "Id of the customer to be updated", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customers/{customerKey}", + // "request": { + // "$ref": "Customer" + // }, + // "response": { + // "$ref": "Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.customer" + // ] + // } + +} + +// method id "directory.domainAliases.delete": + +type DomainAliasesDeleteCall struct { + s *Service + customer string + domainAliasName string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Domain Alias of the customer. +func (r *DomainAliasesService) Delete(customer string, domainAliasName string) *DomainAliasesDeleteCall { + c := &DomainAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.domainAliasName = domainAliasName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainAliasesDeleteCall) Fields(s ...googleapi.Field) *DomainAliasesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainAliasesDeleteCall) Context(ctx context.Context) *DomainAliasesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainAliasesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainAliasesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases/{domainAliasName}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "domainAliasName": c.domainAliasName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domainAliases.delete" call. +func (c *DomainAliasesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a Domain Alias of the customer.", + // "httpMethod": "DELETE", + // "id": "directory.domainAliases.delete", + // "parameterOrder": [ + // "customer", + // "domainAliasName" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainAliasName": { + // "description": "Name of domain alias to be retrieved.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domainaliases/{domainAliasName}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain" + // ] + // } + +} + +// method id "directory.domainAliases.get": + +type DomainAliasesGetCall struct { + s *Service + customer string + domainAliasName string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a domain alias of the customer. +func (r *DomainAliasesService) Get(customer string, domainAliasName string) *DomainAliasesGetCall { + c := &DomainAliasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.domainAliasName = domainAliasName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainAliasesGetCall) Fields(s ...googleapi.Field) *DomainAliasesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DomainAliasesGetCall) IfNoneMatch(entityTag string) *DomainAliasesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainAliasesGetCall) Context(ctx context.Context) *DomainAliasesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainAliasesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainAliasesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases/{domainAliasName}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "domainAliasName": c.domainAliasName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domainAliases.get" call. +// Exactly one of *DomainAlias or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DomainAlias.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DomainAliasesGetCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DomainAlias{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a domain alias of the customer.", + // "httpMethod": "GET", + // "id": "directory.domainAliases.get", + // "parameterOrder": [ + // "customer", + // "domainAliasName" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainAliasName": { + // "description": "Name of domain alias to be retrieved.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domainaliases/{domainAliasName}", + // "response": { + // "$ref": "DomainAlias" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain", + // "https://www.googleapis.com/auth/admin.directory.domain.readonly" + // ] + // } + +} + +// method id "directory.domainAliases.insert": + +type DomainAliasesInsertCall struct { + s *Service + customer string + domainalias *DomainAlias + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a Domain alias of the customer. +func (r *DomainAliasesService) Insert(customer string, domainalias *DomainAlias) *DomainAliasesInsertCall { + c := &DomainAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.domainalias = domainalias + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainAliasesInsertCall) Fields(s ...googleapi.Field) *DomainAliasesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainAliasesInsertCall) Context(ctx context.Context) *DomainAliasesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainAliasesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainAliasesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainalias) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domainAliases.insert" call. +// Exactly one of *DomainAlias or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DomainAlias.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DomainAliasesInsertCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DomainAlias{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Inserts a Domain alias of the customer.", + // "httpMethod": "POST", + // "id": "directory.domainAliases.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domainaliases", + // "request": { + // "$ref": "DomainAlias" + // }, + // "response": { + // "$ref": "DomainAlias" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain" + // ] + // } + +} + +// method id "directory.domainAliases.list": + +type DomainAliasesListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the domain aliases of the customer. +func (r *DomainAliasesService) List(customer string) *DomainAliasesListCall { + c := &DomainAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// ParentDomainName sets the optional parameter "parentDomainName": Name +// of the parent domain for which domain aliases are to be fetched. +func (c *DomainAliasesListCall) ParentDomainName(parentDomainName string) *DomainAliasesListCall { + c.urlParams_.Set("parentDomainName", parentDomainName) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainAliasesListCall) Fields(s ...googleapi.Field) *DomainAliasesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DomainAliasesListCall) IfNoneMatch(entityTag string) *DomainAliasesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainAliasesListCall) Context(ctx context.Context) *DomainAliasesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainAliasesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainAliasesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domainAliases.list" call. +// Exactly one of *DomainAliases or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DomainAliases.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DomainAliasesListCall) Do(opts ...googleapi.CallOption) (*DomainAliases, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DomainAliases{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the domain aliases of the customer.", + // "httpMethod": "GET", + // "id": "directory.domainAliases.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "parentDomainName": { + // "description": "Name of the parent domain for which domain aliases are to be fetched.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domainaliases", + // "response": { + // "$ref": "DomainAliases" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain", + // "https://www.googleapis.com/auth/admin.directory.domain.readonly" + // ] + // } + +} + +// method id "directory.domains.delete": + +type DomainsDeleteCall struct { + s *Service + customer string + domainName string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a domain of the customer. +func (r *DomainsService) Delete(customer string, domainName string) *DomainsDeleteCall { + c := &DomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.domainName = domainName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainsDeleteCall) Fields(s ...googleapi.Field) *DomainsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainsDeleteCall) Context(ctx context.Context) *DomainsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains/{domainName}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "domainName": c.domainName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domains.delete" call. +func (c *DomainsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a domain of the customer.", + // "httpMethod": "DELETE", + // "id": "directory.domains.delete", + // "parameterOrder": [ + // "customer", + // "domainName" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainName": { + // "description": "Name of domain to be deleted", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domains/{domainName}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain" + // ] + // } + +} + +// method id "directory.domains.get": + +type DomainsGetCall struct { + s *Service + customer string + domainName string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a domain of the customer. +func (r *DomainsService) Get(customer string, domainName string) *DomainsGetCall { + c := &DomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.domainName = domainName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainsGetCall) Fields(s ...googleapi.Field) *DomainsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DomainsGetCall) IfNoneMatch(entityTag string) *DomainsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainsGetCall) Context(ctx context.Context) *DomainsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains/{domainName}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "domainName": c.domainName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domains.get" call. +// Exactly one of *Domains or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Domains.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *DomainsGetCall) Do(opts ...googleapi.CallOption) (*Domains, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Domains{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a domain of the customer.", + // "httpMethod": "GET", + // "id": "directory.domains.get", + // "parameterOrder": [ + // "customer", + // "domainName" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainName": { + // "description": "Name of domain to be retrieved", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domains/{domainName}", + // "response": { + // "$ref": "Domains" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain", + // "https://www.googleapis.com/auth/admin.directory.domain.readonly" + // ] + // } + +} + +// method id "directory.domains.insert": + +type DomainsInsertCall struct { + s *Service + customer string + domains *Domains + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a domain of the customer. +func (r *DomainsService) Insert(customer string, domains *Domains) *DomainsInsertCall { + c := &DomainsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.domains = domains + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainsInsertCall) Fields(s ...googleapi.Field) *DomainsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainsInsertCall) Context(ctx context.Context) *DomainsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.domains) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domains.insert" call. +// Exactly one of *Domains or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Domains.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *DomainsInsertCall) Do(opts ...googleapi.CallOption) (*Domains, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Domains{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Inserts a domain of the customer.", + // "httpMethod": "POST", + // "id": "directory.domains.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domains", + // "request": { + // "$ref": "Domains" + // }, + // "response": { + // "$ref": "Domains" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain" + // ] + // } + +} + +// method id "directory.domains.list": + +type DomainsListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the domains of the customer. +func (r *DomainsService) List(customer string) *DomainsListCall { + c := &DomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DomainsListCall) Fields(s ...googleapi.Field) *DomainsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DomainsListCall) IfNoneMatch(entityTag string) *DomainsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DomainsListCall) Context(ctx context.Context) *DomainsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DomainsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DomainsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.domains.list" call. +// Exactly one of *Domains2 or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Domains2.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DomainsListCall) Do(opts ...googleapi.CallOption) (*Domains2, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Domains2{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the domains of the customer.", + // "httpMethod": "GET", + // "id": "directory.domains.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/domains", + // "response": { + // "$ref": "Domains2" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.domain", + // "https://www.googleapis.com/auth/admin.directory.domain.readonly" + // ] + // } + +} + +// method id "directory.groups.delete": + +type GroupsDeleteCall struct { + s *Service + groupKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete Group +func (r *GroupsService) Delete(groupKey string) *GroupsDeleteCall { + c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.delete" call. +func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Delete Group", + // "httpMethod": "DELETE", + // "id": "directory.groups.delete", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group" + // ] + // } + +} + +// method id "directory.groups.get": + +type GroupsGetCall struct { + s *Service + groupKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve Group +func (r *GroupsService) Get(groupKey string) *GroupsGetCall { + c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.get" call. +// Exactly one of *Group or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Group.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Group{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve Group", + // "httpMethod": "GET", + // "id": "directory.groups.get", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}", + // "response": { + // "$ref": "Group" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.readonly" + // ] + // } + +} + +// method id "directory.groups.insert": + +type GroupsInsertCall struct { + s *Service + group *Group + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Create Group +func (r *GroupsService) Insert(group *Group) *GroupsInsertCall { + c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.group = group + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.group) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.insert" call. +// Exactly one of *Group or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Group.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Group, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Group{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create Group", + // "httpMethod": "POST", + // "id": "directory.groups.insert", + // "path": "groups", + // "request": { + // "$ref": "Group" + // }, + // "response": { + // "$ref": "Group" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group" + // ] + // } + +} + +// method id "directory.groups.list": + +type GroupsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve all groups of a domain or of a user given a userKey +// (paginated) +func (r *GroupsService) List() *GroupsListCall { + c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Customer sets the optional parameter "customer": Immutable ID of the +// G Suite account. In case of multi-domain, to fetch all groups for a +// customer, fill this field instead of domain. +func (c *GroupsListCall) Customer(customer string) *GroupsListCall { + c.urlParams_.Set("customer", customer) + return c +} + +// Domain sets the optional parameter "domain": Name of the domain. Fill +// this field to get groups from only this domain. To return all groups +// in a multi-domain fill customer field instead. +func (c *GroupsListCall) Domain(domain string) *GroupsListCall { + c.urlParams_.Set("domain", domain) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. Max allowed value is 200. +func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Column to use for +// sorting results +// +// Possible values: +// "email" - Email of the group. +func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list +func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Query string search. +// Should be of the form "". Complete documentation is at +// https://developers.google.com/admin-sdk/directory/v1/guides/search-groups +func (c *GroupsListCall) Query(query string) *GroupsListCall { + c.urlParams_.Set("query", query) + return c +} + +// SortOrder sets the optional parameter "sortOrder": Whether to return +// results in ascending or descending order. Only of use when orderBy is +// also used +// +// Possible values: +// "ASCENDING" - Ascending order. +// "DESCENDING" - Descending order. +func (c *GroupsListCall) SortOrder(sortOrder string) *GroupsListCall { + c.urlParams_.Set("sortOrder", sortOrder) + return c +} + +// UserKey sets the optional parameter "userKey": Email or immutable ID +// of the user if only those groups are to be listed, the given user is +// a member of. If it's an ID, it should match with the ID of the user +// object. +func (c *GroupsListCall) UserKey(userKey string) *GroupsListCall { + c.urlParams_.Set("userKey", userKey) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsListCall) Context(ctx context.Context) *GroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.list" call. +// Exactly one of *Groups or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Groups.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*Groups, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Groups{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all groups of a domain or of a user given a userKey (paginated)", + // "httpMethod": "GET", + // "id": "directory.groups.list", + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.", + // "location": "query", + // "type": "string" + // }, + // "domain": { + // "description": "Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "200", + // "description": "Maximum number of results to return. Max allowed value is 200.", + // "format": "int32", + // "location": "query", + // "minimum": "1", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Column to use for sorting results", + // "enum": [ + // "email" + // ], + // "enumDescriptions": [ + // "Email of the group." + // ], + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list", + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups", + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", + // "enum": [ + // "ASCENDING", + // "DESCENDING" + // ], + // "enumDescriptions": [ + // "Ascending order.", + // "Descending order." + // ], + // "location": "query", + // "type": "string" + // }, + // "userKey": { + // "description": "Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "groups", + // "response": { + // "$ref": "Groups" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *GroupsListCall) Pages(ctx context.Context, f func(*Groups) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.groups.patch": + +type GroupsPatchCall struct { + s *Service + groupKey string + group *Group + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update Group. This method supports patch semantics. +func (r *GroupsService) Patch(groupKey string, group *Group) *GroupsPatchCall { + c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.group = group + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.group) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.patch" call. +// Exactly one of *Group or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Group.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Group, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Group{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update Group. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.groups.patch", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}", + // "request": { + // "$ref": "Group" + // }, + // "response": { + // "$ref": "Group" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group" + // ] + // } + +} + +// method id "directory.groups.update": + +type GroupsUpdateCall struct { + s *Service + groupKey string + group *Group + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Update Group +func (r *GroupsService) Update(groupKey string, group *Group) *GroupsUpdateCall { + c := &GroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.group = group + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsUpdateCall) Fields(s ...googleapi.Field) *GroupsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.group) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.update" call. +// Exactly one of *Group or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Group.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Group{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update Group", + // "httpMethod": "PUT", + // "id": "directory.groups.update", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}", + // "request": { + // "$ref": "Group" + // }, + // "response": { + // "$ref": "Group" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group" + // ] + // } + +} + +// method id "directory.groups.aliases.delete": + +type GroupsAliasesDeleteCall struct { + s *Service + groupKey string + alias string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Remove a alias for the group +func (r *GroupsAliasesService) Delete(groupKey string, alias string) *GroupsAliasesDeleteCall { + c := &GroupsAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.alias = alias + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsAliasesDeleteCall) Fields(s ...googleapi.Field) *GroupsAliasesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsAliasesDeleteCall) Context(ctx context.Context) *GroupsAliasesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsAliasesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsAliasesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/aliases/{alias}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + "alias": c.alias, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.aliases.delete" call. +func (c *GroupsAliasesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Remove a alias for the group", + // "httpMethod": "DELETE", + // "id": "directory.groups.aliases.delete", + // "parameterOrder": [ + // "groupKey", + // "alias" + // ], + // "parameters": { + // "alias": { + // "description": "The alias to be removed", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/aliases/{alias}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group" + // ] + // } + +} + +// method id "directory.groups.aliases.insert": + +type GroupsAliasesInsertCall struct { + s *Service + groupKey string + alias *Alias + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Add a alias for the group +func (r *GroupsAliasesService) Insert(groupKey string, alias *Alias) *GroupsAliasesInsertCall { + c := &GroupsAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.alias = alias + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsAliasesInsertCall) Fields(s ...googleapi.Field) *GroupsAliasesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsAliasesInsertCall) Context(ctx context.Context) *GroupsAliasesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsAliasesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsAliasesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/aliases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.aliases.insert" call. +// Exactly one of *Alias or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Alias.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Alias{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Add a alias for the group", + // "httpMethod": "POST", + // "id": "directory.groups.aliases.insert", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/aliases", + // "request": { + // "$ref": "Alias" + // }, + // "response": { + // "$ref": "Alias" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group" + // ] + // } + +} + +// method id "directory.groups.aliases.list": + +type GroupsAliasesListCall struct { + s *Service + groupKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all aliases for a group +func (r *GroupsAliasesService) List(groupKey string) *GroupsAliasesListCall { + c := &GroupsAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GroupsAliasesListCall) Fields(s ...googleapi.Field) *GroupsAliasesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GroupsAliasesListCall) IfNoneMatch(entityTag string) *GroupsAliasesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GroupsAliasesListCall) Context(ctx context.Context) *GroupsAliasesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GroupsAliasesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GroupsAliasesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/aliases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.groups.aliases.list" call. +// Exactly one of *Aliases or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Aliases.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GroupsAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Aliases{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all aliases for a group", + // "httpMethod": "GET", + // "id": "directory.groups.aliases.list", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/aliases", + // "response": { + // "$ref": "Aliases" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.readonly" + // ], + // "supportsSubscription": true + // } + +} + +// method id "directory.members.delete": + +type MembersDeleteCall struct { + s *Service + groupKey string + memberKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Remove membership. +func (r *MembersService) Delete(groupKey string, memberKey string) *MembersDeleteCall { + c := &MembersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.memberKey = memberKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersDeleteCall) Fields(s ...googleapi.Field) *MembersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersDeleteCall) Context(ctx context.Context) *MembersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + "memberKey": c.memberKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.delete" call. +func (c *MembersDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Remove membership.", + // "httpMethod": "DELETE", + // "id": "directory.members.delete", + // "parameterOrder": [ + // "groupKey", + // "memberKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "memberKey": { + // "description": "Email or immutable ID of the member", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/members/{memberKey}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member" + // ] + // } + +} + +// method id "directory.members.get": + +type MembersGetCall struct { + s *Service + groupKey string + memberKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve Group Member +func (r *MembersService) Get(groupKey string, memberKey string) *MembersGetCall { + c := &MembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.memberKey = memberKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersGetCall) Fields(s ...googleapi.Field) *MembersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MembersGetCall) IfNoneMatch(entityTag string) *MembersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersGetCall) Context(ctx context.Context) *MembersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + "memberKey": c.memberKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.get" call. +// Exactly one of *Member or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Member.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MembersGetCall) Do(opts ...googleapi.CallOption) (*Member, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Member{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve Group Member", + // "httpMethod": "GET", + // "id": "directory.members.get", + // "parameterOrder": [ + // "groupKey", + // "memberKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "memberKey": { + // "description": "Email or immutable ID of the member", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/members/{memberKey}", + // "response": { + // "$ref": "Member" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member", + // "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + // "https://www.googleapis.com/auth/admin.directory.group.readonly" + // ] + // } + +} + +// method id "directory.members.hasMember": + +type MembersHasMemberCall struct { + s *Service + groupKey string + memberKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// HasMember: Checks whether the given user is a member of the group. +// Membership can be direct or nested. +func (r *MembersService) HasMember(groupKey string, memberKey string) *MembersHasMemberCall { + c := &MembersHasMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.memberKey = memberKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersHasMemberCall) Fields(s ...googleapi.Field) *MembersHasMemberCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MembersHasMemberCall) IfNoneMatch(entityTag string) *MembersHasMemberCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersHasMemberCall) Context(ctx context.Context) *MembersHasMemberCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersHasMemberCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersHasMemberCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/hasMember/{memberKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + "memberKey": c.memberKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.hasMember" call. +// Exactly one of *MembersHasMember or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *MembersHasMember.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MembersHasMemberCall) Do(opts ...googleapi.CallOption) (*MembersHasMember, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &MembersHasMember{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Checks whether the given user is a member of the group. Membership can be direct or nested.", + // "httpMethod": "GET", + // "id": "directory.members.hasMember", + // "parameterOrder": [ + // "groupKey", + // "memberKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "memberKey": { + // "description": "Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/hasMember/{memberKey}", + // "response": { + // "$ref": "MembersHasMember" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member", + // "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + // "https://www.googleapis.com/auth/admin.directory.group.readonly" + // ] + // } + +} + +// method id "directory.members.insert": + +type MembersInsertCall struct { + s *Service + groupKey string + member *Member + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Add user to the specified group. +func (r *MembersService) Insert(groupKey string, member *Member) *MembersInsertCall { + c := &MembersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.member = member + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersInsertCall) Fields(s ...googleapi.Field) *MembersInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersInsertCall) Context(ctx context.Context) *MembersInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.member) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.insert" call. +// Exactly one of *Member or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Member.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MembersInsertCall) Do(opts ...googleapi.CallOption) (*Member, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Member{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Add user to the specified group.", + // "httpMethod": "POST", + // "id": "directory.members.insert", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/members", + // "request": { + // "$ref": "Member" + // }, + // "response": { + // "$ref": "Member" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member" + // ] + // } + +} + +// method id "directory.members.list": + +type MembersListCall struct { + s *Service + groupKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve all members in a group (paginated) +func (r *MembersService) List(groupKey string) *MembersListCall { + c := &MembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + return c +} + +// IncludeDerivedMembership sets the optional parameter +// "includeDerivedMembership": Whether to list indirect memberships. +// Default: false. +func (c *MembersListCall) IncludeDerivedMembership(includeDerivedMembership bool) *MembersListCall { + c.urlParams_.Set("includeDerivedMembership", fmt.Sprint(includeDerivedMembership)) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. Max allowed value is 200. +func (c *MembersListCall) MaxResults(maxResults int64) *MembersListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list +func (c *MembersListCall) PageToken(pageToken string) *MembersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Roles sets the optional parameter "roles": Comma separated role +// values to filter list results on. +func (c *MembersListCall) Roles(roles string) *MembersListCall { + c.urlParams_.Set("roles", roles) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersListCall) Fields(s ...googleapi.Field) *MembersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MembersListCall) IfNoneMatch(entityTag string) *MembersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersListCall) Context(ctx context.Context) *MembersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.list" call. +// Exactly one of *Members or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Members.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MembersListCall) Do(opts ...googleapi.CallOption) (*Members, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Members{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all members in a group (paginated)", + // "httpMethod": "GET", + // "id": "directory.members.list", + // "parameterOrder": [ + // "groupKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "includeDerivedMembership": { + // "description": "Whether to list indirect memberships. Default: false.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "200", + // "description": "Maximum number of results to return. Max allowed value is 200.", + // "format": "int32", + // "location": "query", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list", + // "location": "query", + // "type": "string" + // }, + // "roles": { + // "description": "Comma separated role values to filter list results on.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/members", + // "response": { + // "$ref": "Members" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member", + // "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + // "https://www.googleapis.com/auth/admin.directory.group.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *MembersListCall) Pages(ctx context.Context, f func(*Members) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.members.patch": + +type MembersPatchCall struct { + s *Service + groupKey string + memberKey string + member *Member + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update membership of a user in the specified group. This +// method supports patch semantics. +func (r *MembersService) Patch(groupKey string, memberKey string, member *Member) *MembersPatchCall { + c := &MembersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.memberKey = memberKey + c.member = member + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersPatchCall) Fields(s ...googleapi.Field) *MembersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersPatchCall) Context(ctx context.Context) *MembersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.member) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + "memberKey": c.memberKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.patch" call. +// Exactly one of *Member or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Member.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MembersPatchCall) Do(opts ...googleapi.CallOption) (*Member, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Member{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update membership of a user in the specified group. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.members.patch", + // "parameterOrder": [ + // "groupKey", + // "memberKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "memberKey": { + // "description": "Email or immutable ID of the user. If ID, it should match with id of member object", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/members/{memberKey}", + // "request": { + // "$ref": "Member" + // }, + // "response": { + // "$ref": "Member" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member" + // ] + // } + +} + +// method id "directory.members.update": + +type MembersUpdateCall struct { + s *Service + groupKey string + memberKey string + member *Member + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Update membership of a user in the specified group. +func (r *MembersService) Update(groupKey string, memberKey string, member *Member) *MembersUpdateCall { + c := &MembersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groupKey = groupKey + c.memberKey = memberKey + c.member = member + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MembersUpdateCall) Fields(s ...googleapi.Field) *MembersUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MembersUpdateCall) Context(ctx context.Context) *MembersUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MembersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MembersUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.member) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "groupKey": c.groupKey, + "memberKey": c.memberKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.members.update" call. +// Exactly one of *Member or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Member.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MembersUpdateCall) Do(opts ...googleapi.CallOption) (*Member, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Member{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update membership of a user in the specified group.", + // "httpMethod": "PUT", + // "id": "directory.members.update", + // "parameterOrder": [ + // "groupKey", + // "memberKey" + // ], + // "parameters": { + // "groupKey": { + // "description": "Email or immutable ID of the group. If ID, it should match with id of group object", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "memberKey": { + // "description": "Email or immutable ID of the user. If ID, it should match with id of member object", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "groups/{groupKey}/members/{memberKey}", + // "request": { + // "$ref": "Member" + // }, + // "response": { + // "$ref": "Member" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.group", + // "https://www.googleapis.com/auth/admin.directory.group.member" + // ] + // } + +} + +// method id "directory.mobiledevices.action": + +type MobiledevicesActionCall struct { + s *Service + customerId string + resourceId string + mobiledeviceaction *MobileDeviceAction + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Action: Take action on Mobile Device +func (r *MobiledevicesService) Action(customerId string, resourceId string, mobiledeviceaction *MobileDeviceAction) *MobiledevicesActionCall { + c := &MobiledevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.resourceId = resourceId + c.mobiledeviceaction = mobiledeviceaction + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MobiledevicesActionCall) Fields(s ...googleapi.Field) *MobiledevicesActionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MobiledevicesActionCall) Context(ctx context.Context) *MobiledevicesActionCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MobiledevicesActionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MobiledevicesActionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mobiledeviceaction) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile/{resourceId}/action") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.mobiledevices.action" call. +func (c *MobiledevicesActionCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Take action on Mobile Device", + // "httpMethod": "POST", + // "id": "directory.mobiledevices.action", + // "parameterOrder": [ + // "customerId", + // "resourceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "resourceId": { + // "description": "Immutable ID of Mobile Device", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/mobile/{resourceId}/action", + // "request": { + // "$ref": "MobileDeviceAction" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.mobile", + // "https://www.googleapis.com/auth/admin.directory.device.mobile.action" + // ] + // } + +} + +// method id "directory.mobiledevices.delete": + +type MobiledevicesDeleteCall struct { + s *Service + customerId string + resourceId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete Mobile Device +func (r *MobiledevicesService) Delete(customerId string, resourceId string) *MobiledevicesDeleteCall { + c := &MobiledevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.resourceId = resourceId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MobiledevicesDeleteCall) Fields(s ...googleapi.Field) *MobiledevicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MobiledevicesDeleteCall) Context(ctx context.Context) *MobiledevicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MobiledevicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MobiledevicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile/{resourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.mobiledevices.delete" call. +func (c *MobiledevicesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Delete Mobile Device", + // "httpMethod": "DELETE", + // "id": "directory.mobiledevices.delete", + // "parameterOrder": [ + // "customerId", + // "resourceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "resourceId": { + // "description": "Immutable ID of Mobile Device", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/mobile/{resourceId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.mobile" + // ] + // } + +} + +// method id "directory.mobiledevices.get": + +type MobiledevicesGetCall struct { + s *Service + customerId string + resourceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve Mobile Device +func (r *MobiledevicesService) Get(customerId string, resourceId string) *MobiledevicesGetCall { + c := &MobiledevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.resourceId = resourceId + return c +} + +// Projection sets the optional parameter "projection": Restrict +// information returned to a set of selected fields. +// +// Possible values: +// "BASIC" - Includes only the basic metadata fields (e.g., deviceId, +// model, status, type, and status) +// "FULL" - Includes all metadata fields +func (c *MobiledevicesGetCall) Projection(projection string) *MobiledevicesGetCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MobiledevicesGetCall) Fields(s ...googleapi.Field) *MobiledevicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MobiledevicesGetCall) IfNoneMatch(entityTag string) *MobiledevicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MobiledevicesGetCall) Context(ctx context.Context) *MobiledevicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MobiledevicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MobiledevicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile/{resourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.mobiledevices.get" call. +// Exactly one of *MobileDevice or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MobileDevice.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MobiledevicesGetCall) Do(opts ...googleapi.CallOption) (*MobileDevice, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &MobileDevice{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve Mobile Device", + // "httpMethod": "GET", + // "id": "directory.mobiledevices.get", + // "parameterOrder": [ + // "customerId", + // "resourceId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projection": { + // "description": "Restrict information returned to a set of selected fields.", + // "enum": [ + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)", + // "Includes all metadata fields" + // ], + // "location": "query", + // "type": "string" + // }, + // "resourceId": { + // "description": "Immutable ID of Mobile Device", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/mobile/{resourceId}", + // "response": { + // "$ref": "MobileDevice" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.mobile", + // "https://www.googleapis.com/auth/admin.directory.device.mobile.action", + // "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly" + // ] + // } + +} + +// method id "directory.mobiledevices.list": + +type MobiledevicesListCall struct { + s *Service + customerId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve all Mobile Devices of a customer (paginated) +func (r *MobiledevicesService) List(customerId string) *MobiledevicesListCall { + c := &MobiledevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *MobiledevicesListCall) MaxResults(maxResults int64) *MobiledevicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Column to use for +// sorting results +// +// Possible values: +// "deviceId" - Mobile Device serial number. +// "email" - Owner user email. +// "lastSync" - Last policy settings sync date time of the device. +// "model" - Mobile Device model. +// "name" - Owner user name. +// "os" - Mobile operating system. +// "status" - Status of the device. +// "type" - Type of the device. +func (c *MobiledevicesListCall) OrderBy(orderBy string) *MobiledevicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list +func (c *MobiledevicesListCall) PageToken(pageToken string) *MobiledevicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Projection sets the optional parameter "projection": Restrict +// information returned to a set of selected fields. +// +// Possible values: +// "BASIC" - Includes only the basic metadata fields (e.g., deviceId, +// model, status, type, and status) +// "FULL" - Includes all metadata fields +func (c *MobiledevicesListCall) Projection(projection string) *MobiledevicesListCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Query sets the optional parameter "query": Search string in the +// format provided by this Help Center article. +func (c *MobiledevicesListCall) Query(query string) *MobiledevicesListCall { + c.urlParams_.Set("query", query) + return c +} + +// SortOrder sets the optional parameter "sortOrder": Whether to return +// results in ascending or descending order. Only of use when orderBy is +// also used +// +// Possible values: +// "ASCENDING" - Ascending order. +// "DESCENDING" - Descending order. +func (c *MobiledevicesListCall) SortOrder(sortOrder string) *MobiledevicesListCall { + c.urlParams_.Set("sortOrder", sortOrder) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MobiledevicesListCall) Fields(s ...googleapi.Field) *MobiledevicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MobiledevicesListCall) IfNoneMatch(entityTag string) *MobiledevicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MobiledevicesListCall) Context(ctx context.Context) *MobiledevicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MobiledevicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MobiledevicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.mobiledevices.list" call. +// Exactly one of *MobileDevices or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MobileDevices.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MobiledevicesListCall) Do(opts ...googleapi.CallOption) (*MobileDevices, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &MobileDevices{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all Mobile Devices of a customer (paginated)", + // "httpMethod": "GET", + // "id": "directory.mobiledevices.list", + // "parameterOrder": [ + // "customerId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "100", + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "100", + // "minimum": "1", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Column to use for sorting results", + // "enum": [ + // "deviceId", + // "email", + // "lastSync", + // "model", + // "name", + // "os", + // "status", + // "type" + // ], + // "enumDescriptions": [ + // "Mobile Device serial number.", + // "Owner user email.", + // "Last policy settings sync date time of the device.", + // "Mobile Device model.", + // "Owner user name.", + // "Mobile operating system.", + // "Status of the device.", + // "Type of the device." + // ], + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list", + // "location": "query", + // "type": "string" + // }, + // "projection": { + // "description": "Restrict information returned to a set of selected fields.", + // "enum": [ + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)", + // "Includes all metadata fields" + // ], + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Search string in the format provided by this Help Center article.", + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", + // "enum": [ + // "ASCENDING", + // "DESCENDING" + // ], + // "enumDescriptions": [ + // "Ascending order.", + // "Descending order." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/devices/mobile", + // "response": { + // "$ref": "MobileDevices" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.device.mobile", + // "https://www.googleapis.com/auth/admin.directory.device.mobile.action", + // "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *MobiledevicesListCall) Pages(ctx context.Context, f func(*MobileDevices) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.notifications.delete": + +type NotificationsDeleteCall struct { + s *Service + customer string + notificationId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a notification +func (r *NotificationsService) Delete(customer string, notificationId string) *NotificationsDeleteCall { + c := &NotificationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.notificationId = notificationId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NotificationsDeleteCall) Fields(s ...googleapi.Field) *NotificationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NotificationsDeleteCall) Context(ctx context.Context) *NotificationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NotificationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "notificationId": c.notificationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.notifications.delete" call. +func (c *NotificationsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a notification", + // "httpMethod": "DELETE", + // "id": "directory.notifications.delete", + // "parameterOrder": [ + // "customer", + // "notificationId" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "notificationId": { + // "description": "The unique ID of the notification.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/notifications/{notificationId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.notifications" + // ] + // } + +} + +// method id "directory.notifications.get": + +type NotificationsGetCall struct { + s *Service + customer string + notificationId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a notification. +func (r *NotificationsService) Get(customer string, notificationId string) *NotificationsGetCall { + c := &NotificationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.notificationId = notificationId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NotificationsGetCall) Fields(s ...googleapi.Field) *NotificationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *NotificationsGetCall) IfNoneMatch(entityTag string) *NotificationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NotificationsGetCall) Context(ctx context.Context) *NotificationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NotificationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "notificationId": c.notificationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.notifications.get" call. +// Exactly one of *Notification or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Notification.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NotificationsGetCall) Do(opts ...googleapi.CallOption) (*Notification, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Notification{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a notification.", + // "httpMethod": "GET", + // "id": "directory.notifications.get", + // "parameterOrder": [ + // "customer", + // "notificationId" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "notificationId": { + // "description": "The unique ID of the notification.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/notifications/{notificationId}", + // "response": { + // "$ref": "Notification" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.notifications" + // ] + // } + +} + +// method id "directory.notifications.list": + +type NotificationsListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of notifications. +func (r *NotificationsService) List(customer string) *NotificationsListCall { + c := &NotificationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// Language sets the optional parameter "language": The ISO 639-1 code +// of the language notifications are returned in. The default is English +// (en). +func (c *NotificationsListCall) Language(language string) *NotificationsListCall { + c.urlParams_.Set("language", language) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of notifications to return per page. The default is 100. +func (c *NotificationsListCall) MaxResults(maxResults int64) *NotificationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token to +// specify the page of results to retrieve. +func (c *NotificationsListCall) PageToken(pageToken string) *NotificationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NotificationsListCall) Fields(s ...googleapi.Field) *NotificationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *NotificationsListCall) IfNoneMatch(entityTag string) *NotificationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NotificationsListCall) Context(ctx context.Context) *NotificationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NotificationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.notifications.list" call. +// Exactly one of *Notifications or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Notifications.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Notifications{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of notifications.", + // "httpMethod": "GET", + // "id": "directory.notifications.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "language": { + // "description": "The ISO 639-1 code of the language notifications are returned in. The default is English (en).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "description": "Maximum number of notifications to return per page. The default is 100.", + // "format": "uint32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token to specify the page of results to retrieve.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/notifications", + // "response": { + // "$ref": "Notifications" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.notifications" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *NotificationsListCall) Pages(ctx context.Context, f func(*Notifications) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.notifications.patch": + +type NotificationsPatchCall struct { + s *Service + customer string + notificationId string + notification *Notification + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a notification. This method supports patch semantics. +func (r *NotificationsService) Patch(customer string, notificationId string, notification *Notification) *NotificationsPatchCall { + c := &NotificationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.notificationId = notificationId + c.notification = notification + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NotificationsPatchCall) Fields(s ...googleapi.Field) *NotificationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NotificationsPatchCall) Context(ctx context.Context) *NotificationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NotificationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NotificationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "notificationId": c.notificationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.notifications.patch" call. +// Exactly one of *Notification or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Notification.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NotificationsPatchCall) Do(opts ...googleapi.CallOption) (*Notification, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Notification{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a notification. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.notifications.patch", + // "parameterOrder": [ + // "customer", + // "notificationId" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "notificationId": { + // "description": "The unique ID of the notification.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/notifications/{notificationId}", + // "request": { + // "$ref": "Notification" + // }, + // "response": { + // "$ref": "Notification" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.notifications" + // ] + // } + +} + +// method id "directory.notifications.update": + +type NotificationsUpdateCall struct { + s *Service + customer string + notificationId string + notification *Notification + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a notification. +func (r *NotificationsService) Update(customer string, notificationId string, notification *Notification) *NotificationsUpdateCall { + c := &NotificationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.notificationId = notificationId + c.notification = notification + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NotificationsUpdateCall) Fields(s ...googleapi.Field) *NotificationsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NotificationsUpdateCall) Context(ctx context.Context) *NotificationsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NotificationsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NotificationsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "notificationId": c.notificationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.notifications.update" call. +// Exactly one of *Notification or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Notification.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NotificationsUpdateCall) Do(opts ...googleapi.CallOption) (*Notification, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Notification{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a notification.", + // "httpMethod": "PUT", + // "id": "directory.notifications.update", + // "parameterOrder": [ + // "customer", + // "notificationId" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "notificationId": { + // "description": "The unique ID of the notification.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/notifications/{notificationId}", + // "request": { + // "$ref": "Notification" + // }, + // "response": { + // "$ref": "Notification" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.notifications" + // ] + // } + +} + +// method id "directory.orgunits.delete": + +type OrgunitsDeleteCall struct { + s *Service + customerId string + orgUnitPath []string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Remove organizational unit +func (r *OrgunitsService) Delete(customerId string, orgUnitPath []string) *OrgunitsDeleteCall { + c := &OrgunitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.orgUnitPath = append([]string{}, orgUnitPath...) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrgunitsDeleteCall) Fields(s ...googleapi.Field) *OrgunitsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrgunitsDeleteCall) Context(ctx context.Context) *OrgunitsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrgunitsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrgunitsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "orgUnitPath": c.orgUnitPath[0], + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.orgunits.delete" call. +func (c *OrgunitsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Remove organizational unit", + // "httpMethod": "DELETE", + // "id": "directory.orgunits.delete", + // "parameterOrder": [ + // "customerId", + // "orgUnitPath" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orgUnitPath": { + // "description": "Full path of the organizational unit or its ID", + // "location": "path", + // "repeated": true, + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.orgunit" + // ] + // } + +} + +// method id "directory.orgunits.get": + +type OrgunitsGetCall struct { + s *Service + customerId string + orgUnitPath []string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve organizational unit +func (r *OrgunitsService) Get(customerId string, orgUnitPath []string) *OrgunitsGetCall { + c := &OrgunitsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.orgUnitPath = append([]string{}, orgUnitPath...) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrgunitsGetCall) Fields(s ...googleapi.Field) *OrgunitsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrgunitsGetCall) IfNoneMatch(entityTag string) *OrgunitsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrgunitsGetCall) Context(ctx context.Context) *OrgunitsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrgunitsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrgunitsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "orgUnitPath": c.orgUnitPath[0], + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.orgunits.get" call. +// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *OrgUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrgunitsGetCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &OrgUnit{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve organizational unit", + // "httpMethod": "GET", + // "id": "directory.orgunits.get", + // "parameterOrder": [ + // "customerId", + // "orgUnitPath" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orgUnitPath": { + // "description": "Full path of the organizational unit or its ID", + // "location": "path", + // "repeated": true, + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + // "response": { + // "$ref": "OrgUnit" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.orgunit", + // "https://www.googleapis.com/auth/admin.directory.orgunit.readonly" + // ] + // } + +} + +// method id "directory.orgunits.insert": + +type OrgunitsInsertCall struct { + s *Service + customerId string + orgunit *OrgUnit + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Add organizational unit +func (r *OrgunitsService) Insert(customerId string, orgunit *OrgUnit) *OrgunitsInsertCall { + c := &OrgunitsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.orgunit = orgunit + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrgunitsInsertCall) Fields(s ...googleapi.Field) *OrgunitsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrgunitsInsertCall) Context(ctx context.Context) *OrgunitsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrgunitsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrgunitsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.orgunits.insert" call. +// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *OrgUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrgunitsInsertCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &OrgUnit{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Add organizational unit", + // "httpMethod": "POST", + // "id": "directory.orgunits.insert", + // "parameterOrder": [ + // "customerId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/orgunits", + // "request": { + // "$ref": "OrgUnit" + // }, + // "response": { + // "$ref": "OrgUnit" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.orgunit" + // ] + // } + +} + +// method id "directory.orgunits.list": + +type OrgunitsListCall struct { + s *Service + customerId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve all organizational units +func (r *OrgunitsService) List(customerId string) *OrgunitsListCall { + c := &OrgunitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + return c +} + +// OrgUnitPath sets the optional parameter "orgUnitPath": the +// URL-encoded organizational unit's path or its ID +func (c *OrgunitsListCall) OrgUnitPath(orgUnitPath string) *OrgunitsListCall { + c.urlParams_.Set("orgUnitPath", orgUnitPath) + return c +} + +// Type sets the optional parameter "type": Whether to return all +// sub-organizations or just immediate children +// +// Possible values: +// "all" - All sub-organizational units. +// "children" - Immediate children only (default). +func (c *OrgunitsListCall) Type(type_ string) *OrgunitsListCall { + c.urlParams_.Set("type", type_) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrgunitsListCall) Fields(s ...googleapi.Field) *OrgunitsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrgunitsListCall) IfNoneMatch(entityTag string) *OrgunitsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrgunitsListCall) Context(ctx context.Context) *OrgunitsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrgunitsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrgunitsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.orgunits.list" call. +// Exactly one of *OrgUnits or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *OrgUnits.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrgunitsListCall) Do(opts ...googleapi.CallOption) (*OrgUnits, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &OrgUnits{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all organizational units", + // "httpMethod": "GET", + // "id": "directory.orgunits.list", + // "parameterOrder": [ + // "customerId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orgUnitPath": { + // "default": "", + // "description": "the URL-encoded organizational unit's path or its ID", + // "location": "query", + // "type": "string" + // }, + // "type": { + // "description": "Whether to return all sub-organizations or just immediate children", + // "enum": [ + // "all", + // "children" + // ], + // "enumDescriptions": [ + // "All sub-organizational units.", + // "Immediate children only (default)." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/orgunits", + // "response": { + // "$ref": "OrgUnits" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.orgunit", + // "https://www.googleapis.com/auth/admin.directory.orgunit.readonly" + // ] + // } + +} + +// method id "directory.orgunits.patch": + +type OrgunitsPatchCall struct { + s *Service + customerId string + orgUnitPath []string + orgunit *OrgUnit + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update organizational unit. This method supports patch +// semantics. +func (r *OrgunitsService) Patch(customerId string, orgUnitPath []string, orgunit *OrgUnit) *OrgunitsPatchCall { + c := &OrgunitsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.orgUnitPath = append([]string{}, orgUnitPath...) + c.orgunit = orgunit + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrgunitsPatchCall) Fields(s ...googleapi.Field) *OrgunitsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrgunitsPatchCall) Context(ctx context.Context) *OrgunitsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrgunitsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrgunitsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "orgUnitPath": c.orgUnitPath[0], + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.orgunits.patch" call. +// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *OrgUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrgunitsPatchCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &OrgUnit{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update organizational unit. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.orgunits.patch", + // "parameterOrder": [ + // "customerId", + // "orgUnitPath" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orgUnitPath": { + // "description": "Full path of the organizational unit or its ID", + // "location": "path", + // "repeated": true, + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + // "request": { + // "$ref": "OrgUnit" + // }, + // "response": { + // "$ref": "OrgUnit" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.orgunit" + // ] + // } + +} + +// method id "directory.orgunits.update": + +type OrgunitsUpdateCall struct { + s *Service + customerId string + orgUnitPath []string + orgunit *OrgUnit + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Update organizational unit +func (r *OrgunitsService) Update(customerId string, orgUnitPath []string, orgunit *OrgUnit) *OrgunitsUpdateCall { + c := &OrgunitsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.orgUnitPath = append([]string{}, orgUnitPath...) + c.orgunit = orgunit + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrgunitsUpdateCall) Fields(s ...googleapi.Field) *OrgunitsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrgunitsUpdateCall) Context(ctx context.Context) *OrgunitsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrgunitsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrgunitsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "orgUnitPath": c.orgUnitPath[0], + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.orgunits.update" call. +// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *OrgUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrgunitsUpdateCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &OrgUnit{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update organizational unit", + // "httpMethod": "PUT", + // "id": "directory.orgunits.update", + // "parameterOrder": [ + // "customerId", + // "orgUnitPath" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orgUnitPath": { + // "description": "Full path of the organizational unit or its ID", + // "location": "path", + // "repeated": true, + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/orgunits{/orgUnitPath*}", + // "request": { + // "$ref": "OrgUnit" + // }, + // "response": { + // "$ref": "OrgUnit" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.orgunit" + // ] + // } + +} + +// method id "directory.privileges.list": + +type PrivilegesListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a paginated list of all privileges for a customer. +func (r *PrivilegesService) List(customer string) *PrivilegesListCall { + c := &PrivilegesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PrivilegesListCall) Fields(s ...googleapi.Field) *PrivilegesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PrivilegesListCall) IfNoneMatch(entityTag string) *PrivilegesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PrivilegesListCall) Context(ctx context.Context) *PrivilegesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PrivilegesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PrivilegesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/ALL/privileges") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.privileges.list" call. +// Exactly one of *Privileges or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Privileges.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PrivilegesListCall) Do(opts ...googleapi.CallOption) (*Privileges, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Privileges{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a paginated list of all privileges for a customer.", + // "httpMethod": "GET", + // "id": "directory.privileges.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles/ALL/privileges", + // "response": { + // "$ref": "Privileges" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement", + // "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + // ] + // } + +} + +// method id "directory.resources.buildings.delete": + +type ResourcesBuildingsDeleteCall struct { + s *Service + customer string + buildingId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a building. +func (r *ResourcesBuildingsService) Delete(customer string, buildingId string) *ResourcesBuildingsDeleteCall { + c := &ResourcesBuildingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.buildingId = buildingId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesBuildingsDeleteCall) Fields(s ...googleapi.Field) *ResourcesBuildingsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesBuildingsDeleteCall) Context(ctx context.Context) *ResourcesBuildingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesBuildingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesBuildingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "buildingId": c.buildingId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.buildings.delete" call. +func (c *ResourcesBuildingsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a building.", + // "httpMethod": "DELETE", + // "id": "directory.resources.buildings.delete", + // "parameterOrder": [ + // "customer", + // "buildingId" + // ], + // "parameters": { + // "buildingId": { + // "description": "The ID of the building to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/buildings/{buildingId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.buildings.get": + +type ResourcesBuildingsGetCall struct { + s *Service + customer string + buildingId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a building. +func (r *ResourcesBuildingsService) Get(customer string, buildingId string) *ResourcesBuildingsGetCall { + c := &ResourcesBuildingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.buildingId = buildingId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesBuildingsGetCall) Fields(s ...googleapi.Field) *ResourcesBuildingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcesBuildingsGetCall) IfNoneMatch(entityTag string) *ResourcesBuildingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesBuildingsGetCall) Context(ctx context.Context) *ResourcesBuildingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesBuildingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesBuildingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "buildingId": c.buildingId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.buildings.get" call. +// Exactly one of *Building or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Building.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcesBuildingsGetCall) Do(opts ...googleapi.CallOption) (*Building, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Building{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a building.", + // "httpMethod": "GET", + // "id": "directory.resources.buildings.get", + // "parameterOrder": [ + // "customer", + // "buildingId" + // ], + // "parameters": { + // "buildingId": { + // "description": "The unique ID of the building to retrieve.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/buildings/{buildingId}", + // "response": { + // "$ref": "Building" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar", + // "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + // ] + // } + +} + +// method id "directory.resources.buildings.insert": + +type ResourcesBuildingsInsertCall struct { + s *Service + customer string + building *Building + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a building. +func (r *ResourcesBuildingsService) Insert(customer string, building *Building) *ResourcesBuildingsInsertCall { + c := &ResourcesBuildingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.building = building + return c +} + +// CoordinatesSource sets the optional parameter "coordinatesSource": +// Source from which Building.coordinates are derived. +// +// Possible values: +// "CLIENT_SPECIFIED" - Building.coordinates are set to the +// coordinates included in the request. +// "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically +// populated based on the postal address. +// "SOURCE_UNSPECIFIED" (default) - Defaults to RESOLVED_FROM_ADDRESS +// if postal address is provided. Otherwise, defaults to +// CLIENT_SPECIFIED if coordinates are provided. +func (c *ResourcesBuildingsInsertCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsInsertCall { + c.urlParams_.Set("coordinatesSource", coordinatesSource) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesBuildingsInsertCall) Fields(s ...googleapi.Field) *ResourcesBuildingsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesBuildingsInsertCall) Context(ctx context.Context) *ResourcesBuildingsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesBuildingsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesBuildingsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.building) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.buildings.insert" call. +// Exactly one of *Building or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Building.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcesBuildingsInsertCall) Do(opts ...googleapi.CallOption) (*Building, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Building{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Inserts a building.", + // "httpMethod": "POST", + // "id": "directory.resources.buildings.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "coordinatesSource": { + // "default": "SOURCE_UNSPECIFIED", + // "description": "Source from which Building.coordinates are derived.", + // "enum": [ + // "CLIENT_SPECIFIED", + // "RESOLVED_FROM_ADDRESS", + // "SOURCE_UNSPECIFIED" + // ], + // "enumDescriptions": [ + // "Building.coordinates are set to the coordinates included in the request.", + // "Building.coordinates are automatically populated based on the postal address.", + // "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided." + // ], + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/buildings", + // "request": { + // "$ref": "Building" + // }, + // "response": { + // "$ref": "Building" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.buildings.list": + +type ResourcesBuildingsListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of buildings for an account. +func (r *ResourcesBuildingsService) List(customer string) *ResourcesBuildingsListCall { + c := &ResourcesBuildingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *ResourcesBuildingsListCall) MaxResults(maxResults int64) *ResourcesBuildingsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// the next page in the list. +func (c *ResourcesBuildingsListCall) PageToken(pageToken string) *ResourcesBuildingsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesBuildingsListCall) Fields(s ...googleapi.Field) *ResourcesBuildingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcesBuildingsListCall) IfNoneMatch(entityTag string) *ResourcesBuildingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesBuildingsListCall) Context(ctx context.Context) *ResourcesBuildingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesBuildingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesBuildingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.buildings.list" call. +// Exactly one of *Buildings or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Buildings.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcesBuildingsListCall) Do(opts ...googleapi.CallOption) (*Buildings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Buildings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of buildings for an account.", + // "httpMethod": "GET", + // "id": "directory.resources.buildings.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "500", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify the next page in the list.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/buildings", + // "response": { + // "$ref": "Buildings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar", + // "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ResourcesBuildingsListCall) Pages(ctx context.Context, f func(*Buildings) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.resources.buildings.patch": + +type ResourcesBuildingsPatchCall struct { + s *Service + customer string + buildingId string + building *Building + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a building. This method supports patch semantics. +func (r *ResourcesBuildingsService) Patch(customer string, buildingId string, building *Building) *ResourcesBuildingsPatchCall { + c := &ResourcesBuildingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.buildingId = buildingId + c.building = building + return c +} + +// CoordinatesSource sets the optional parameter "coordinatesSource": +// Source from which Building.coordinates are derived. +// +// Possible values: +// "CLIENT_SPECIFIED" - Building.coordinates are set to the +// coordinates included in the request. +// "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically +// populated based on the postal address. +// "SOURCE_UNSPECIFIED" (default) - Defaults to RESOLVED_FROM_ADDRESS +// if postal address is provided. Otherwise, defaults to +// CLIENT_SPECIFIED if coordinates are provided. +func (c *ResourcesBuildingsPatchCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsPatchCall { + c.urlParams_.Set("coordinatesSource", coordinatesSource) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesBuildingsPatchCall) Fields(s ...googleapi.Field) *ResourcesBuildingsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesBuildingsPatchCall) Context(ctx context.Context) *ResourcesBuildingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesBuildingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesBuildingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.building) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "buildingId": c.buildingId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.buildings.patch" call. +// Exactly one of *Building or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Building.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcesBuildingsPatchCall) Do(opts ...googleapi.CallOption) (*Building, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Building{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a building. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.resources.buildings.patch", + // "parameterOrder": [ + // "customer", + // "buildingId" + // ], + // "parameters": { + // "buildingId": { + // "description": "The ID of the building to update.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "coordinatesSource": { + // "default": "SOURCE_UNSPECIFIED", + // "description": "Source from which Building.coordinates are derived.", + // "enum": [ + // "CLIENT_SPECIFIED", + // "RESOLVED_FROM_ADDRESS", + // "SOURCE_UNSPECIFIED" + // ], + // "enumDescriptions": [ + // "Building.coordinates are set to the coordinates included in the request.", + // "Building.coordinates are automatically populated based on the postal address.", + // "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided." + // ], + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/buildings/{buildingId}", + // "request": { + // "$ref": "Building" + // }, + // "response": { + // "$ref": "Building" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.buildings.update": + +type ResourcesBuildingsUpdateCall struct { + s *Service + customer string + buildingId string + building *Building + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a building. +func (r *ResourcesBuildingsService) Update(customer string, buildingId string, building *Building) *ResourcesBuildingsUpdateCall { + c := &ResourcesBuildingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.buildingId = buildingId + c.building = building + return c +} + +// CoordinatesSource sets the optional parameter "coordinatesSource": +// Source from which Building.coordinates are derived. +// +// Possible values: +// "CLIENT_SPECIFIED" - Building.coordinates are set to the +// coordinates included in the request. +// "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically +// populated based on the postal address. +// "SOURCE_UNSPECIFIED" (default) - Defaults to RESOLVED_FROM_ADDRESS +// if postal address is provided. Otherwise, defaults to +// CLIENT_SPECIFIED if coordinates are provided. +func (c *ResourcesBuildingsUpdateCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsUpdateCall { + c.urlParams_.Set("coordinatesSource", coordinatesSource) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesBuildingsUpdateCall) Fields(s ...googleapi.Field) *ResourcesBuildingsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesBuildingsUpdateCall) Context(ctx context.Context) *ResourcesBuildingsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesBuildingsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesBuildingsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.building) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "buildingId": c.buildingId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.buildings.update" call. +// Exactly one of *Building or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Building.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcesBuildingsUpdateCall) Do(opts ...googleapi.CallOption) (*Building, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Building{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a building.", + // "httpMethod": "PUT", + // "id": "directory.resources.buildings.update", + // "parameterOrder": [ + // "customer", + // "buildingId" + // ], + // "parameters": { + // "buildingId": { + // "description": "The ID of the building to update.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "coordinatesSource": { + // "default": "SOURCE_UNSPECIFIED", + // "description": "Source from which Building.coordinates are derived.", + // "enum": [ + // "CLIENT_SPECIFIED", + // "RESOLVED_FROM_ADDRESS", + // "SOURCE_UNSPECIFIED" + // ], + // "enumDescriptions": [ + // "Building.coordinates are set to the coordinates included in the request.", + // "Building.coordinates are automatically populated based on the postal address.", + // "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided." + // ], + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/buildings/{buildingId}", + // "request": { + // "$ref": "Building" + // }, + // "response": { + // "$ref": "Building" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.calendars.delete": + +type ResourcesCalendarsDeleteCall struct { + s *Service + customer string + calendarResourceId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a calendar resource. +func (r *ResourcesCalendarsService) Delete(customer string, calendarResourceId string) *ResourcesCalendarsDeleteCall { + c := &ResourcesCalendarsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.calendarResourceId = calendarResourceId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesCalendarsDeleteCall) Fields(s ...googleapi.Field) *ResourcesCalendarsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesCalendarsDeleteCall) Context(ctx context.Context) *ResourcesCalendarsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesCalendarsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesCalendarsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "calendarResourceId": c.calendarResourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.calendars.delete" call. +func (c *ResourcesCalendarsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a calendar resource.", + // "httpMethod": "DELETE", + // "id": "directory.resources.calendars.delete", + // "parameterOrder": [ + // "customer", + // "calendarResourceId" + // ], + // "parameters": { + // "calendarResourceId": { + // "description": "The unique ID of the calendar resource to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.calendars.get": + +type ResourcesCalendarsGetCall struct { + s *Service + customer string + calendarResourceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a calendar resource. +func (r *ResourcesCalendarsService) Get(customer string, calendarResourceId string) *ResourcesCalendarsGetCall { + c := &ResourcesCalendarsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.calendarResourceId = calendarResourceId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesCalendarsGetCall) Fields(s ...googleapi.Field) *ResourcesCalendarsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcesCalendarsGetCall) IfNoneMatch(entityTag string) *ResourcesCalendarsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesCalendarsGetCall) Context(ctx context.Context) *ResourcesCalendarsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesCalendarsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesCalendarsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "calendarResourceId": c.calendarResourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.calendars.get" call. +// Exactly one of *CalendarResource or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *CalendarResource.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcesCalendarsGetCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CalendarResource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a calendar resource.", + // "httpMethod": "GET", + // "id": "directory.resources.calendars.get", + // "parameterOrder": [ + // "customer", + // "calendarResourceId" + // ], + // "parameters": { + // "calendarResourceId": { + // "description": "The unique ID of the calendar resource to retrieve.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + // "response": { + // "$ref": "CalendarResource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar", + // "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + // ] + // } + +} + +// method id "directory.resources.calendars.insert": + +type ResourcesCalendarsInsertCall struct { + s *Service + customer string + calendarresource *CalendarResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a calendar resource. +func (r *ResourcesCalendarsService) Insert(customer string, calendarresource *CalendarResource) *ResourcesCalendarsInsertCall { + c := &ResourcesCalendarsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.calendarresource = calendarresource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesCalendarsInsertCall) Fields(s ...googleapi.Field) *ResourcesCalendarsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesCalendarsInsertCall) Context(ctx context.Context) *ResourcesCalendarsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesCalendarsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesCalendarsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.calendars.insert" call. +// Exactly one of *CalendarResource or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *CalendarResource.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcesCalendarsInsertCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CalendarResource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Inserts a calendar resource.", + // "httpMethod": "POST", + // "id": "directory.resources.calendars.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/calendars", + // "request": { + // "$ref": "CalendarResource" + // }, + // "response": { + // "$ref": "CalendarResource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.calendars.list": + +type ResourcesCalendarsListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of calendar resources for an account. +func (r *ResourcesCalendarsService) List(customer string) *ResourcesCalendarsListCall { + c := &ResourcesCalendarsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *ResourcesCalendarsListCall) MaxResults(maxResults int64) *ResourcesCalendarsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field(s) to sort +// results by in either ascending or descending order. Supported fields +// include resourceId, resourceName, capacity, buildingId, and +// floorName. If no order is specified, defaults to ascending. Should be +// of the form "field [asc|desc], field [asc|desc], ...". For example +// buildingId, capacity desc would return results sorted first by +// buildingId in ascending order then by capacity in descending order. +func (c *ResourcesCalendarsListCall) OrderBy(orderBy string) *ResourcesCalendarsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// the next page in the list. +func (c *ResourcesCalendarsListCall) PageToken(pageToken string) *ResourcesCalendarsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": String query used to +// filter results. Should be of the form "field operator value" where +// field can be any of supported fields and operators can be any of +// supported operations. Operators include '=' for exact match and ':' +// for prefix match or HAS match where applicable. For prefix match, the +// value should always be followed by a *. Supported fields include +// generatedResourceName, name, buildingId, +// featureInstances.feature.name. For example buildingId=US-NYC-9TH AND +// featureInstances.feature.name:Phone. +func (c *ResourcesCalendarsListCall) Query(query string) *ResourcesCalendarsListCall { + c.urlParams_.Set("query", query) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesCalendarsListCall) Fields(s ...googleapi.Field) *ResourcesCalendarsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcesCalendarsListCall) IfNoneMatch(entityTag string) *ResourcesCalendarsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesCalendarsListCall) Context(ctx context.Context) *ResourcesCalendarsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesCalendarsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesCalendarsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.calendars.list" call. +// Exactly one of *CalendarResources or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *CalendarResources.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcesCalendarsListCall) Do(opts ...googleapi.CallOption) (*CalendarResources, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CalendarResources{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of calendar resources for an account.", + // "httpMethod": "GET", + // "id": "directory.resources.calendars.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "500", + // "minimum": "1", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Field(s) to sort results by in either ascending or descending order. Supported fields include resourceId, resourceName, capacity, buildingId, and floorName. If no order is specified, defaults to ascending. Should be of the form \"field [asc|desc], field [asc|desc], ...\". For example buildingId, capacity desc would return results sorted first by buildingId in ascending order then by capacity in descending order.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Token to specify the next page in the list.", + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "String query used to filter results. Should be of the form \"field operator value\" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Supported fields include generatedResourceName, name, buildingId, featureInstances.feature.name. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/calendars", + // "response": { + // "$ref": "CalendarResources" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar", + // "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ResourcesCalendarsListCall) Pages(ctx context.Context, f func(*CalendarResources) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.resources.calendars.patch": + +type ResourcesCalendarsPatchCall struct { + s *Service + customer string + calendarResourceId string + calendarresource *CalendarResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a calendar resource. +// +// This method supports patch semantics, meaning you only need to +// include the fields you wish to update. Fields that are not present in +// the request will be preserved. This method supports patch semantics. +func (r *ResourcesCalendarsService) Patch(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsPatchCall { + c := &ResourcesCalendarsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.calendarResourceId = calendarResourceId + c.calendarresource = calendarresource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesCalendarsPatchCall) Fields(s ...googleapi.Field) *ResourcesCalendarsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesCalendarsPatchCall) Context(ctx context.Context) *ResourcesCalendarsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesCalendarsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesCalendarsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "calendarResourceId": c.calendarResourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.calendars.patch" call. +// Exactly one of *CalendarResource or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *CalendarResource.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcesCalendarsPatchCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CalendarResource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a calendar resource.\n\nThis method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.resources.calendars.patch", + // "parameterOrder": [ + // "customer", + // "calendarResourceId" + // ], + // "parameters": { + // "calendarResourceId": { + // "description": "The unique ID of the calendar resource to update.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + // "request": { + // "$ref": "CalendarResource" + // }, + // "response": { + // "$ref": "CalendarResource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.calendars.update": + +type ResourcesCalendarsUpdateCall struct { + s *Service + customer string + calendarResourceId string + calendarresource *CalendarResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a calendar resource. +// +// This method supports patch semantics, meaning you only need to +// include the fields you wish to update. Fields that are not present in +// the request will be preserved. +func (r *ResourcesCalendarsService) Update(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsUpdateCall { + c := &ResourcesCalendarsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.calendarResourceId = calendarResourceId + c.calendarresource = calendarresource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesCalendarsUpdateCall) Fields(s ...googleapi.Field) *ResourcesCalendarsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesCalendarsUpdateCall) Context(ctx context.Context) *ResourcesCalendarsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesCalendarsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesCalendarsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "calendarResourceId": c.calendarResourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.calendars.update" call. +// Exactly one of *CalendarResource or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *CalendarResource.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcesCalendarsUpdateCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CalendarResource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a calendar resource.\n\nThis method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.", + // "httpMethod": "PUT", + // "id": "directory.resources.calendars.update", + // "parameterOrder": [ + // "customer", + // "calendarResourceId" + // ], + // "parameters": { + // "calendarResourceId": { + // "description": "The unique ID of the calendar resource to update.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/calendars/{calendarResourceId}", + // "request": { + // "$ref": "CalendarResource" + // }, + // "response": { + // "$ref": "CalendarResource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.features.delete": + +type ResourcesFeaturesDeleteCall struct { + s *Service + customer string + featureKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a feature. +func (r *ResourcesFeaturesService) Delete(customer string, featureKey string) *ResourcesFeaturesDeleteCall { + c := &ResourcesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.featureKey = featureKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ResourcesFeaturesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesDeleteCall) Context(ctx context.Context) *ResourcesFeaturesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "featureKey": c.featureKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.delete" call. +func (c *ResourcesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a feature.", + // "httpMethod": "DELETE", + // "id": "directory.resources.features.delete", + // "parameterOrder": [ + // "customer", + // "featureKey" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "featureKey": { + // "description": "The unique ID of the feature to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features/{featureKey}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.features.get": + +type ResourcesFeaturesGetCall struct { + s *Service + customer string + featureKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a feature. +func (r *ResourcesFeaturesService) Get(customer string, featureKey string) *ResourcesFeaturesGetCall { + c := &ResourcesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.featureKey = featureKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesGetCall) Fields(s ...googleapi.Field) *ResourcesFeaturesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcesFeaturesGetCall) IfNoneMatch(entityTag string) *ResourcesFeaturesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesGetCall) Context(ctx context.Context) *ResourcesFeaturesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "featureKey": c.featureKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.get" call. +// Exactly one of *Feature or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Feature.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Feature{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a feature.", + // "httpMethod": "GET", + // "id": "directory.resources.features.get", + // "parameterOrder": [ + // "customer", + // "featureKey" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "featureKey": { + // "description": "The unique ID of the feature to retrieve.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features/{featureKey}", + // "response": { + // "$ref": "Feature" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar", + // "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + // ] + // } + +} + +// method id "directory.resources.features.insert": + +type ResourcesFeaturesInsertCall struct { + s *Service + customer string + feature *Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Inserts a feature. +func (r *ResourcesFeaturesService) Insert(customer string, feature *Feature) *ResourcesFeaturesInsertCall { + c := &ResourcesFeaturesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.feature = feature + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesInsertCall) Fields(s ...googleapi.Field) *ResourcesFeaturesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesInsertCall) Context(ctx context.Context) *ResourcesFeaturesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.insert" call. +// Exactly one of *Feature or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Feature.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcesFeaturesInsertCall) Do(opts ...googleapi.CallOption) (*Feature, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Feature{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Inserts a feature.", + // "httpMethod": "POST", + // "id": "directory.resources.features.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features", + // "request": { + // "$ref": "Feature" + // }, + // "response": { + // "$ref": "Feature" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.features.list": + +type ResourcesFeaturesListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of features for an account. +func (r *ResourcesFeaturesService) List(customer string) *ResourcesFeaturesListCall { + c := &ResourcesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *ResourcesFeaturesListCall) MaxResults(maxResults int64) *ResourcesFeaturesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// the next page in the list. +func (c *ResourcesFeaturesListCall) PageToken(pageToken string) *ResourcesFeaturesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesListCall) Fields(s ...googleapi.Field) *ResourcesFeaturesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcesFeaturesListCall) IfNoneMatch(entityTag string) *ResourcesFeaturesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesListCall) Context(ctx context.Context) *ResourcesFeaturesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.list" call. +// Exactly one of *Features or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Features.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcesFeaturesListCall) Do(opts ...googleapi.CallOption) (*Features, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Features{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of features for an account.", + // "httpMethod": "GET", + // "id": "directory.resources.features.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "500", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify the next page in the list.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features", + // "response": { + // "$ref": "Features" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar", + // "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ResourcesFeaturesListCall) Pages(ctx context.Context, f func(*Features) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.resources.features.patch": + +type ResourcesFeaturesPatchCall struct { + s *Service + customer string + featureKey string + feature *Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a feature. This method supports patch semantics. +func (r *ResourcesFeaturesService) Patch(customer string, featureKey string, feature *Feature) *ResourcesFeaturesPatchCall { + c := &ResourcesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.featureKey = featureKey + c.feature = feature + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesPatchCall) Fields(s ...googleapi.Field) *ResourcesFeaturesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesPatchCall) Context(ctx context.Context) *ResourcesFeaturesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "featureKey": c.featureKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.patch" call. +// Exactly one of *Feature or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Feature.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Feature, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Feature{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a feature. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.resources.features.patch", + // "parameterOrder": [ + // "customer", + // "featureKey" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "featureKey": { + // "description": "The unique ID of the feature to update.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features/{featureKey}", + // "request": { + // "$ref": "Feature" + // }, + // "response": { + // "$ref": "Feature" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.features.rename": + +type ResourcesFeaturesRenameCall struct { + s *Service + customer string + oldName string + featurerename *FeatureRename + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Rename: Renames a feature. +func (r *ResourcesFeaturesService) Rename(customer string, oldName string, featurerename *FeatureRename) *ResourcesFeaturesRenameCall { + c := &ResourcesFeaturesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.oldName = oldName + c.featurerename = featurerename + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesRenameCall) Fields(s ...googleapi.Field) *ResourcesFeaturesRenameCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesRenameCall) Context(ctx context.Context) *ResourcesFeaturesRenameCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesRenameCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesRenameCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.featurerename) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{oldName}/rename") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "oldName": c.oldName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.rename" call. +func (c *ResourcesFeaturesRenameCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Renames a feature.", + // "httpMethod": "POST", + // "id": "directory.resources.features.rename", + // "parameterOrder": [ + // "customer", + // "oldName" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "oldName": { + // "description": "The unique ID of the feature to rename.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features/{oldName}/rename", + // "request": { + // "$ref": "FeatureRename" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.resources.features.update": + +type ResourcesFeaturesUpdateCall struct { + s *Service + customer string + featureKey string + feature *Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a feature. +func (r *ResourcesFeaturesService) Update(customer string, featureKey string, feature *Feature) *ResourcesFeaturesUpdateCall { + c := &ResourcesFeaturesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.featureKey = featureKey + c.feature = feature + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcesFeaturesUpdateCall) Fields(s ...googleapi.Field) *ResourcesFeaturesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcesFeaturesUpdateCall) Context(ctx context.Context) *ResourcesFeaturesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcesFeaturesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcesFeaturesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "featureKey": c.featureKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.resources.features.update" call. +// Exactly one of *Feature or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Feature.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcesFeaturesUpdateCall) Do(opts ...googleapi.CallOption) (*Feature, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Feature{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a feature.", + // "httpMethod": "PUT", + // "id": "directory.resources.features.update", + // "parameterOrder": [ + // "customer", + // "featureKey" + // ], + // "parameters": { + // "customer": { + // "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "featureKey": { + // "description": "The unique ID of the feature to update.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/resources/features/{featureKey}", + // "request": { + // "$ref": "Feature" + // }, + // "response": { + // "$ref": "Feature" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.resource.calendar" + // ] + // } + +} + +// method id "directory.roleAssignments.delete": + +type RoleAssignmentsDeleteCall struct { + s *Service + customer string + roleAssignmentId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a role assignment. +func (r *RoleAssignmentsService) Delete(customer string, roleAssignmentId string) *RoleAssignmentsDeleteCall { + c := &RoleAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleAssignmentId = roleAssignmentId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoleAssignmentsDeleteCall) Fields(s ...googleapi.Field) *RoleAssignmentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoleAssignmentsDeleteCall) Context(ctx context.Context) *RoleAssignmentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoleAssignmentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoleAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments/{roleAssignmentId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "roleAssignmentId": c.roleAssignmentId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roleAssignments.delete" call. +func (c *RoleAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a role assignment.", + // "httpMethod": "DELETE", + // "id": "directory.roleAssignments.delete", + // "parameterOrder": [ + // "customer", + // "roleAssignmentId" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "roleAssignmentId": { + // "description": "Immutable ID of the role assignment.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roleassignments/{roleAssignmentId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement" + // ] + // } + +} + +// method id "directory.roleAssignments.get": + +type RoleAssignmentsGetCall struct { + s *Service + customer string + roleAssignmentId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve a role assignment. +func (r *RoleAssignmentsService) Get(customer string, roleAssignmentId string) *RoleAssignmentsGetCall { + c := &RoleAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleAssignmentId = roleAssignmentId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoleAssignmentsGetCall) Fields(s ...googleapi.Field) *RoleAssignmentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RoleAssignmentsGetCall) IfNoneMatch(entityTag string) *RoleAssignmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoleAssignmentsGetCall) Context(ctx context.Context) *RoleAssignmentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoleAssignmentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoleAssignmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments/{roleAssignmentId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "roleAssignmentId": c.roleAssignmentId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roleAssignments.get" call. +// Exactly one of *RoleAssignment or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RoleAssignment.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RoleAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RoleAssignment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve a role assignment.", + // "httpMethod": "GET", + // "id": "directory.roleAssignments.get", + // "parameterOrder": [ + // "customer", + // "roleAssignmentId" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "roleAssignmentId": { + // "description": "Immutable ID of the role assignment.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roleassignments/{roleAssignmentId}", + // "response": { + // "$ref": "RoleAssignment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement", + // "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + // ] + // } + +} + +// method id "directory.roleAssignments.insert": + +type RoleAssignmentsInsertCall struct { + s *Service + customer string + roleassignment *RoleAssignment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a role assignment. +func (r *RoleAssignmentsService) Insert(customer string, roleassignment *RoleAssignment) *RoleAssignmentsInsertCall { + c := &RoleAssignmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleassignment = roleassignment + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoleAssignmentsInsertCall) Fields(s ...googleapi.Field) *RoleAssignmentsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoleAssignmentsInsertCall) Context(ctx context.Context) *RoleAssignmentsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoleAssignmentsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoleAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.roleassignment) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roleAssignments.insert" call. +// Exactly one of *RoleAssignment or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RoleAssignment.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RoleAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RoleAssignment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a role assignment.", + // "httpMethod": "POST", + // "id": "directory.roleAssignments.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roleassignments", + // "request": { + // "$ref": "RoleAssignment" + // }, + // "response": { + // "$ref": "RoleAssignment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement" + // ] + // } + +} + +// method id "directory.roleAssignments.list": + +type RoleAssignmentsListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a paginated list of all roleAssignments. +func (r *RoleAssignmentsService) List(customer string) *RoleAssignmentsListCall { + c := &RoleAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *RoleAssignmentsListCall) MaxResults(maxResults int64) *RoleAssignmentsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// the next page in the list. +func (c *RoleAssignmentsListCall) PageToken(pageToken string) *RoleAssignmentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// RoleId sets the optional parameter "roleId": Immutable ID of a role. +// If included in the request, returns only role assignments containing +// this role ID. +func (c *RoleAssignmentsListCall) RoleId(roleId string) *RoleAssignmentsListCall { + c.urlParams_.Set("roleId", roleId) + return c +} + +// UserKey sets the optional parameter "userKey": The user's primary +// email address, alias email address, or unique user ID. If included in +// the request, returns role assignments only for this user. +func (c *RoleAssignmentsListCall) UserKey(userKey string) *RoleAssignmentsListCall { + c.urlParams_.Set("userKey", userKey) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoleAssignmentsListCall) Fields(s ...googleapi.Field) *RoleAssignmentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RoleAssignmentsListCall) IfNoneMatch(entityTag string) *RoleAssignmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoleAssignmentsListCall) Context(ctx context.Context) *RoleAssignmentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoleAssignmentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoleAssignmentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roleAssignments.list" call. +// Exactly one of *RoleAssignments or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RoleAssignments.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RoleAssignmentsListCall) Do(opts ...googleapi.CallOption) (*RoleAssignments, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RoleAssignments{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a paginated list of all roleAssignments.", + // "httpMethod": "GET", + // "id": "directory.roleAssignments.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "200", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify the next page in the list.", + // "location": "query", + // "type": "string" + // }, + // "roleId": { + // "description": "Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.", + // "location": "query", + // "type": "string" + // }, + // "userKey": { + // "description": "The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roleassignments", + // "response": { + // "$ref": "RoleAssignments" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement", + // "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RoleAssignmentsListCall) Pages(ctx context.Context, f func(*RoleAssignments) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.roles.delete": + +type RolesDeleteCall struct { + s *Service + customer string + roleId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a role. +func (r *RolesService) Delete(customer string, roleId string) *RolesDeleteCall { + c := &RolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleId = roleId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RolesDeleteCall) Fields(s ...googleapi.Field) *RolesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesDeleteCall) Context(ctx context.Context) *RolesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "roleId": c.roleId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roles.delete" call. +func (c *RolesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a role.", + // "httpMethod": "DELETE", + // "id": "directory.roles.delete", + // "parameterOrder": [ + // "customer", + // "roleId" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "roleId": { + // "description": "Immutable ID of the role.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles/{roleId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement" + // ] + // } + +} + +// method id "directory.roles.get": + +type RolesGetCall struct { + s *Service + customer string + roleId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a role. +func (r *RolesService) Get(customer string, roleId string) *RolesGetCall { + c := &RolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleId = roleId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RolesGetCall) Fields(s ...googleapi.Field) *RolesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RolesGetCall) IfNoneMatch(entityTag string) *RolesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesGetCall) Context(ctx context.Context) *RolesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "roleId": c.roleId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roles.get" call. +// Exactly one of *Role or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Role.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Role{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a role.", + // "httpMethod": "GET", + // "id": "directory.roles.get", + // "parameterOrder": [ + // "customer", + // "roleId" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "roleId": { + // "description": "Immutable ID of the role.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles/{roleId}", + // "response": { + // "$ref": "Role" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement", + // "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + // ] + // } + +} + +// method id "directory.roles.insert": + +type RolesInsertCall struct { + s *Service + customer string + role *Role + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a role. +func (r *RolesService) Insert(customer string, role *Role) *RolesInsertCall { + c := &RolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.role = role + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RolesInsertCall) Fields(s ...googleapi.Field) *RolesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesInsertCall) Context(ctx context.Context) *RolesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.role) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roles.insert" call. +// Exactly one of *Role or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Role.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RolesInsertCall) Do(opts ...googleapi.CallOption) (*Role, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Role{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a role.", + // "httpMethod": "POST", + // "id": "directory.roles.insert", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles", + // "request": { + // "$ref": "Role" + // }, + // "response": { + // "$ref": "Role" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement" + // ] + // } + +} + +// method id "directory.roles.list": + +type RolesListCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a paginated list of all the roles in a domain. +func (r *RolesService) List(customer string) *RolesListCall { + c := &RolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *RolesListCall) MaxResults(maxResults int64) *RolesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// the next page in the list. +func (c *RolesListCall) PageToken(pageToken string) *RolesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RolesListCall) Fields(s ...googleapi.Field) *RolesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RolesListCall) IfNoneMatch(entityTag string) *RolesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesListCall) Context(ctx context.Context) *RolesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roles.list" call. +// Exactly one of *Roles or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Roles.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*Roles, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Roles{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a paginated list of all the roles in a domain.", + // "httpMethod": "GET", + // "id": "directory.roles.list", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "100", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify the next page in the list.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles", + // "response": { + // "$ref": "Roles" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement", + // "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RolesListCall) Pages(ctx context.Context, f func(*Roles) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.roles.patch": + +type RolesPatchCall struct { + s *Service + customer string + roleId string + role *Role + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a role. This method supports patch semantics. +func (r *RolesService) Patch(customer string, roleId string, role *Role) *RolesPatchCall { + c := &RolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleId = roleId + c.role = role + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RolesPatchCall) Fields(s ...googleapi.Field) *RolesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesPatchCall) Context(ctx context.Context) *RolesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.role) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "roleId": c.roleId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roles.patch" call. +// Exactly one of *Role or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Role.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Role{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a role. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.roles.patch", + // "parameterOrder": [ + // "customer", + // "roleId" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "roleId": { + // "description": "Immutable ID of the role.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles/{roleId}", + // "request": { + // "$ref": "Role" + // }, + // "response": { + // "$ref": "Role" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement" + // ] + // } + +} + +// method id "directory.roles.update": + +type RolesUpdateCall struct { + s *Service + customer string + roleId string + role *Role + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a role. +func (r *RolesService) Update(customer string, roleId string, role *Role) *RolesUpdateCall { + c := &RolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.roleId = roleId + c.role = role + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RolesUpdateCall) Fields(s ...googleapi.Field) *RolesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesUpdateCall) Context(ctx context.Context) *RolesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.role) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + "roleId": c.roleId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.roles.update" call. +// Exactly one of *Role or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Role.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RolesUpdateCall) Do(opts ...googleapi.CallOption) (*Role, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Role{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a role.", + // "httpMethod": "PUT", + // "id": "directory.roles.update", + // "parameterOrder": [ + // "customer", + // "roleId" + // ], + // "parameters": { + // "customer": { + // "description": "Immutable ID of the G Suite account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "roleId": { + // "description": "Immutable ID of the role.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customer}/roles/{roleId}", + // "request": { + // "$ref": "Role" + // }, + // "response": { + // "$ref": "Role" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.rolemanagement" + // ] + // } + +} + +// method id "directory.schemas.delete": + +type SchemasDeleteCall struct { + s *Service + customerId string + schemaKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete schema +func (r *SchemasService) Delete(customerId string, schemaKey string) *SchemasDeleteCall { + c := &SchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.schemaKey = schemaKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SchemasDeleteCall) Fields(s ...googleapi.Field) *SchemasDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SchemasDeleteCall) Context(ctx context.Context) *SchemasDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SchemasDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SchemasDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "schemaKey": c.schemaKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.schemas.delete" call. +func (c *SchemasDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Delete schema", + // "httpMethod": "DELETE", + // "id": "directory.schemas.delete", + // "parameterOrder": [ + // "customerId", + // "schemaKey" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "schemaKey": { + // "description": "Name or immutable ID of the schema", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/schemas/{schemaKey}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.userschema" + // ] + // } + +} + +// method id "directory.schemas.get": + +type SchemasGetCall struct { + s *Service + customerId string + schemaKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve schema +func (r *SchemasService) Get(customerId string, schemaKey string) *SchemasGetCall { + c := &SchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.schemaKey = schemaKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SchemasGetCall) Fields(s ...googleapi.Field) *SchemasGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SchemasGetCall) IfNoneMatch(entityTag string) *SchemasGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SchemasGetCall) Context(ctx context.Context) *SchemasGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SchemasGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SchemasGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "schemaKey": c.schemaKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.schemas.get" call. +// Exactly one of *Schema or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Schema.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SchemasGetCall) Do(opts ...googleapi.CallOption) (*Schema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Schema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve schema", + // "httpMethod": "GET", + // "id": "directory.schemas.get", + // "parameterOrder": [ + // "customerId", + // "schemaKey" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "schemaKey": { + // "description": "Name or immutable ID of the schema", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/schemas/{schemaKey}", + // "response": { + // "$ref": "Schema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.userschema", + // "https://www.googleapis.com/auth/admin.directory.userschema.readonly" + // ] + // } + +} + +// method id "directory.schemas.insert": + +type SchemasInsertCall struct { + s *Service + customerId string + schema *Schema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Create schema. +func (r *SchemasService) Insert(customerId string, schema *Schema) *SchemasInsertCall { + c := &SchemasInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.schema = schema + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SchemasInsertCall) Fields(s ...googleapi.Field) *SchemasInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SchemasInsertCall) Context(ctx context.Context) *SchemasInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SchemasInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SchemasInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.schemas.insert" call. +// Exactly one of *Schema or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Schema.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SchemasInsertCall) Do(opts ...googleapi.CallOption) (*Schema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Schema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create schema.", + // "httpMethod": "POST", + // "id": "directory.schemas.insert", + // "parameterOrder": [ + // "customerId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/schemas", + // "request": { + // "$ref": "Schema" + // }, + // "response": { + // "$ref": "Schema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.userschema" + // ] + // } + +} + +// method id "directory.schemas.list": + +type SchemasListCall struct { + s *Service + customerId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve all schemas for a customer +func (r *SchemasService) List(customerId string) *SchemasListCall { + c := &SchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SchemasListCall) Fields(s ...googleapi.Field) *SchemasListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SchemasListCall) IfNoneMatch(entityTag string) *SchemasListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SchemasListCall) Context(ctx context.Context) *SchemasListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SchemasListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SchemasListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.schemas.list" call. +// Exactly one of *Schemas or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Schemas.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SchemasListCall) Do(opts ...googleapi.CallOption) (*Schemas, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Schemas{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all schemas for a customer", + // "httpMethod": "GET", + // "id": "directory.schemas.list", + // "parameterOrder": [ + // "customerId" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/schemas", + // "response": { + // "$ref": "Schemas" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.userschema", + // "https://www.googleapis.com/auth/admin.directory.userschema.readonly" + // ] + // } + +} + +// method id "directory.schemas.patch": + +type SchemasPatchCall struct { + s *Service + customerId string + schemaKey string + schema *Schema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update schema. This method supports patch semantics. +func (r *SchemasService) Patch(customerId string, schemaKey string, schema *Schema) *SchemasPatchCall { + c := &SchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.schemaKey = schemaKey + c.schema = schema + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SchemasPatchCall) Fields(s ...googleapi.Field) *SchemasPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SchemasPatchCall) Context(ctx context.Context) *SchemasPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SchemasPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SchemasPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "schemaKey": c.schemaKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.schemas.patch" call. +// Exactly one of *Schema or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Schema.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SchemasPatchCall) Do(opts ...googleapi.CallOption) (*Schema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Schema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update schema. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.schemas.patch", + // "parameterOrder": [ + // "customerId", + // "schemaKey" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "schemaKey": { + // "description": "Name or immutable ID of the schema.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/schemas/{schemaKey}", + // "request": { + // "$ref": "Schema" + // }, + // "response": { + // "$ref": "Schema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.userschema" + // ] + // } + +} + +// method id "directory.schemas.update": + +type SchemasUpdateCall struct { + s *Service + customerId string + schemaKey string + schema *Schema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Update schema +func (r *SchemasService) Update(customerId string, schemaKey string, schema *Schema) *SchemasUpdateCall { + c := &SchemasUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.schemaKey = schemaKey + c.schema = schema + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SchemasUpdateCall) Fields(s ...googleapi.Field) *SchemasUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SchemasUpdateCall) Context(ctx context.Context) *SchemasUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SchemasUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SchemasUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customerId": c.customerId, + "schemaKey": c.schemaKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.schemas.update" call. +// Exactly one of *Schema or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Schema.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SchemasUpdateCall) Do(opts ...googleapi.CallOption) (*Schema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Schema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update schema", + // "httpMethod": "PUT", + // "id": "directory.schemas.update", + // "parameterOrder": [ + // "customerId", + // "schemaKey" + // ], + // "parameters": { + // "customerId": { + // "description": "Immutable ID of the G Suite account", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "schemaKey": { + // "description": "Name or immutable ID of the schema.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "customer/{customerId}/schemas/{schemaKey}", + // "request": { + // "$ref": "Schema" + // }, + // "response": { + // "$ref": "Schema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.userschema" + // ] + // } + +} + +// method id "directory.tokens.delete": + +type TokensDeleteCall struct { + s *Service + userKey string + clientId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete all access tokens issued by a user for an application. +func (r *TokensService) Delete(userKey string, clientId string) *TokensDeleteCall { + c := &TokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.clientId = clientId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TokensDeleteCall) Fields(s ...googleapi.Field) *TokensDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TokensDeleteCall) Context(ctx context.Context) *TokensDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TokensDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TokensDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/tokens/{clientId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + "clientId": c.clientId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.tokens.delete" call. +func (c *TokensDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Delete all access tokens issued by a user for an application.", + // "httpMethod": "DELETE", + // "id": "directory.tokens.delete", + // "parameterOrder": [ + // "userKey", + // "clientId" + // ], + // "parameters": { + // "clientId": { + // "description": "The Client ID of the application the token is issued to.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/tokens/{clientId}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.tokens.get": + +type TokensGetCall struct { + s *Service + userKey string + clientId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get information about an access token issued by a user. +func (r *TokensService) Get(userKey string, clientId string) *TokensGetCall { + c := &TokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.clientId = clientId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TokensGetCall) Fields(s ...googleapi.Field) *TokensGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *TokensGetCall) IfNoneMatch(entityTag string) *TokensGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TokensGetCall) Context(ctx context.Context) *TokensGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TokensGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TokensGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/tokens/{clientId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + "clientId": c.clientId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.tokens.get" call. +// Exactly one of *Token or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Token.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *TokensGetCall) Do(opts ...googleapi.CallOption) (*Token, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Token{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get information about an access token issued by a user.", + // "httpMethod": "GET", + // "id": "directory.tokens.get", + // "parameterOrder": [ + // "userKey", + // "clientId" + // ], + // "parameters": { + // "clientId": { + // "description": "The Client ID of the application the token is issued to.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/tokens/{clientId}", + // "response": { + // "$ref": "Token" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.tokens.list": + +type TokensListCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns the set of tokens specified user has issued to 3rd +// party applications. +func (r *TokensService) List(userKey string) *TokensListCall { + c := &TokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TokensListCall) Fields(s ...googleapi.Field) *TokensListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *TokensListCall) IfNoneMatch(entityTag string) *TokensListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TokensListCall) Context(ctx context.Context) *TokensListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TokensListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TokensListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/tokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.tokens.list" call. +// Exactly one of *Tokens or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Tokens.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *TokensListCall) Do(opts ...googleapi.CallOption) (*Tokens, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Tokens{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the set of tokens specified user has issued to 3rd party applications.", + // "httpMethod": "GET", + // "id": "directory.tokens.list", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/tokens", + // "response": { + // "$ref": "Tokens" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.users.delete": + +type UsersDeleteCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete user +func (r *UsersService) Delete(userKey string) *UsersDeleteCall { + c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.delete" call. +func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Delete user", + // "httpMethod": "DELETE", + // "id": "directory.users.delete", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.get": + +type UsersGetCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: retrieve user +func (r *UsersService) Get(userKey string) *UsersGetCall { + c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// CustomFieldMask sets the optional parameter "customFieldMask": +// Comma-separated list of schema names. All fields from these schemas +// are fetched. This should only be set when projection=custom. +func (c *UsersGetCall) CustomFieldMask(customFieldMask string) *UsersGetCall { + c.urlParams_.Set("customFieldMask", customFieldMask) + return c +} + +// Projection sets the optional parameter "projection": What subset of +// fields to fetch for this user. +// +// Possible values: +// "basic" (default) - Do not include any custom fields for the user. +// "custom" - Include custom fields from schemas mentioned in +// customFieldMask. +// "full" - Include all fields associated with this user. +func (c *UsersGetCall) Projection(projection string) *UsersGetCall { + c.urlParams_.Set("projection", projection) + return c +} + +// ViewType sets the optional parameter "viewType": Whether to fetch the +// ADMIN_VIEW or DOMAIN_PUBLIC view of the user. +// +// Possible values: +// "admin_view" (default) - Fetches the ADMIN_VIEW of the user. +// "domain_public" - Fetches the DOMAIN_PUBLIC view of the user. +func (c *UsersGetCall) ViewType(viewType string) *UsersGetCall { + c.urlParams_.Set("viewType", viewType) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.get" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "retrieve user", + // "httpMethod": "GET", + // "id": "directory.users.get", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "customFieldMask": { + // "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.", + // "location": "query", + // "type": "string" + // }, + // "projection": { + // "default": "basic", + // "description": "What subset of fields to fetch for this user.", + // "enum": [ + // "basic", + // "custom", + // "full" + // ], + // "enumDescriptions": [ + // "Do not include any custom fields for the user.", + // "Include custom fields from schemas mentioned in customFieldMask.", + // "Include all fields associated with this user." + // ], + // "location": "query", + // "type": "string" + // }, + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "viewType": { + // "default": "admin_view", + // "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.", + // "enum": [ + // "admin_view", + // "domain_public" + // ], + // "enumDescriptions": [ + // "Fetches the ADMIN_VIEW of the user.", + // "Fetches the DOMAIN_PUBLIC view of the user." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "users/{userKey}", + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.readonly" + // ] + // } + +} + +// method id "directory.users.insert": + +type UsersInsertCall struct { + s *Service + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: create user. +func (r *UsersService) Insert(user *User) *UsersInsertCall { + c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.user = user + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.insert" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "create user.", + // "httpMethod": "POST", + // "id": "directory.users.insert", + // "path": "users", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.list": + +type UsersListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve either deleted users or all users in a domain +// (paginated) +func (r *UsersService) List() *UsersListCall { + c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// CustomFieldMask sets the optional parameter "customFieldMask": +// Comma-separated list of schema names. All fields from these schemas +// are fetched. This should only be set when projection=custom. +func (c *UsersListCall) CustomFieldMask(customFieldMask string) *UsersListCall { + c.urlParams_.Set("customFieldMask", customFieldMask) + return c +} + +// Customer sets the optional parameter "customer": Immutable ID of the +// G Suite account. In case of multi-domain, to fetch all users for a +// customer, fill this field instead of domain. +func (c *UsersListCall) Customer(customer string) *UsersListCall { + c.urlParams_.Set("customer", customer) + return c +} + +// Domain sets the optional parameter "domain": Name of the domain. Fill +// this field to get users from only this domain. To return all users in +// a multi-domain fill customer field instead. +func (c *UsersListCall) Domain(domain string) *UsersListCall { + c.urlParams_.Set("domain", domain) + return c +} + +// Event sets the optional parameter "event": Event on which +// subscription is intended (if subscribing) +// +// Possible values: +// "add" - User Created Event +// "delete" - User Deleted Event +// "makeAdmin" - User Admin Status Change Event +// "undelete" - User Undeleted Event +// "update" - User Updated Event +func (c *UsersListCall) Event(event string) *UsersListCall { + c.urlParams_.Set("event", event) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Column to use for +// sorting results +// +// Possible values: +// "email" - Primary email of the user. +// "familyName" - User's family name. +// "givenName" - User's given name. +func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list +func (c *UsersListCall) PageToken(pageToken string) *UsersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Projection sets the optional parameter "projection": What subset of +// fields to fetch for this user. +// +// Possible values: +// "basic" (default) - Do not include any custom fields for the user. +// "custom" - Include custom fields from schemas mentioned in +// customFieldMask. +// "full" - Include all fields associated with this user. +func (c *UsersListCall) Projection(projection string) *UsersListCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Query sets the optional parameter "query": Query string search. +// Should be of the form "". Complete documentation is at +// https://developers.google.com/admin-sdk/directory/v1/guides/search-users +func (c *UsersListCall) Query(query string) *UsersListCall { + c.urlParams_.Set("query", query) + return c +} + +// ShowDeleted sets the optional parameter "showDeleted": If set to +// true, retrieves the list of deleted users. (Default: false) +func (c *UsersListCall) ShowDeleted(showDeleted string) *UsersListCall { + c.urlParams_.Set("showDeleted", showDeleted) + return c +} + +// SortOrder sets the optional parameter "sortOrder": Whether to return +// results in ascending or descending order. +// +// Possible values: +// "ASCENDING" - Ascending order. +// "DESCENDING" - Descending order. +func (c *UsersListCall) SortOrder(sortOrder string) *UsersListCall { + c.urlParams_.Set("sortOrder", sortOrder) + return c +} + +// ViewType sets the optional parameter "viewType": Whether to fetch the +// ADMIN_VIEW or DOMAIN_PUBLIC view of the user. +// +// Possible values: +// "admin_view" (default) - Fetches the ADMIN_VIEW of the user. +// "domain_public" - Fetches the DOMAIN_PUBLIC view of the user. +func (c *UsersListCall) ViewType(viewType string) *UsersListCall { + c.urlParams_.Set("viewType", viewType) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersListCall) Context(ctx context.Context) *UsersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.list" call. +// Exactly one of *Users or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Users.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*Users, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Users{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve either deleted users or all users in a domain (paginated)", + // "httpMethod": "GET", + // "id": "directory.users.list", + // "parameters": { + // "customFieldMask": { + // "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.", + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", + // "location": "query", + // "type": "string" + // }, + // "domain": { + // "description": "Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.", + // "location": "query", + // "type": "string" + // }, + // "event": { + // "description": "Event on which subscription is intended (if subscribing)", + // "enum": [ + // "add", + // "delete", + // "makeAdmin", + // "undelete", + // "update" + // ], + // "enumDescriptions": [ + // "User Created Event", + // "User Deleted Event", + // "User Admin Status Change Event", + // "User Undeleted Event", + // "User Updated Event" + // ], + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "100", + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "500", + // "minimum": "1", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Column to use for sorting results", + // "enum": [ + // "email", + // "familyName", + // "givenName" + // ], + // "enumDescriptions": [ + // "Primary email of the user.", + // "User's family name.", + // "User's given name." + // ], + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list", + // "location": "query", + // "type": "string" + // }, + // "projection": { + // "default": "basic", + // "description": "What subset of fields to fetch for this user.", + // "enum": [ + // "basic", + // "custom", + // "full" + // ], + // "enumDescriptions": [ + // "Do not include any custom fields for the user.", + // "Include custom fields from schemas mentioned in customFieldMask.", + // "Include all fields associated with this user." + // ], + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users", + // "location": "query", + // "type": "string" + // }, + // "showDeleted": { + // "description": "If set to true, retrieves the list of deleted users. (Default: false)", + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Whether to return results in ascending or descending order.", + // "enum": [ + // "ASCENDING", + // "DESCENDING" + // ], + // "enumDescriptions": [ + // "Ascending order.", + // "Descending order." + // ], + // "location": "query", + // "type": "string" + // }, + // "viewType": { + // "default": "admin_view", + // "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.", + // "enum": [ + // "admin_view", + // "domain_public" + // ], + // "enumDescriptions": [ + // "Fetches the ADMIN_VIEW of the user.", + // "Fetches the DOMAIN_PUBLIC view of the user." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "users", + // "response": { + // "$ref": "Users" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ], + // "supportsSubscription": true + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *UsersListCall) Pages(ctx context.Context, f func(*Users) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "directory.users.makeAdmin": + +type UsersMakeAdminCall struct { + s *Service + userKey string + usermakeadmin *UserMakeAdmin + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MakeAdmin: change admin status of a user +func (r *UsersService) MakeAdmin(userKey string, usermakeadmin *UserMakeAdmin) *UsersMakeAdminCall { + c := &UsersMakeAdminCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.usermakeadmin = usermakeadmin + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersMakeAdminCall) Fields(s ...googleapi.Field) *UsersMakeAdminCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersMakeAdminCall) Context(ctx context.Context) *UsersMakeAdminCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersMakeAdminCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersMakeAdminCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.usermakeadmin) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/makeAdmin") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.makeAdmin" call. +func (c *UsersMakeAdminCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "change admin status of a user", + // "httpMethod": "POST", + // "id": "directory.users.makeAdmin", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user as admin", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/makeAdmin", + // "request": { + // "$ref": "UserMakeAdmin" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.patch": + +type UsersPatchCall struct { + s *Service + userKey string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: update user. This method supports patch semantics. +func (r *UsersService) Patch(userKey string, user *User) *UsersPatchCall { + c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.user = user + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.patch" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "update user. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.users.patch", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user. If ID, it should match with id of user object", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.undelete": + +type UsersUndeleteCall struct { + s *Service + userKey string + userundelete *UserUndelete + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Undelete: Undelete a deleted user +func (r *UsersService) Undelete(userKey string, userundelete *UserUndelete) *UsersUndeleteCall { + c := &UsersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.userundelete = userundelete + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersUndeleteCall) Fields(s ...googleapi.Field) *UsersUndeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersUndeleteCall) Context(ctx context.Context) *UsersUndeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersUndeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersUndeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.userundelete) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/undelete") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.undelete" call. +func (c *UsersUndeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Undelete a deleted user", + // "httpMethod": "POST", + // "id": "directory.users.undelete", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "The immutable id of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/undelete", + // "request": { + // "$ref": "UserUndelete" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.update": + +type UsersUpdateCall struct { + s *Service + userKey string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: update user +func (r *UsersService) Update(userKey string, user *User) *UsersUpdateCall { + c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.user = user + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.update" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "update user", + // "httpMethod": "PUT", + // "id": "directory.users.update", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user. If ID, it should match with id of user object", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.watch": + +type UsersWatchCall struct { + s *Service + channel *Channel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Watch: Watch for changes in users list +func (r *UsersService) Watch(channel *Channel) *UsersWatchCall { + c := &UsersWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.channel = channel + return c +} + +// CustomFieldMask sets the optional parameter "customFieldMask": +// Comma-separated list of schema names. All fields from these schemas +// are fetched. This should only be set when projection=custom. +func (c *UsersWatchCall) CustomFieldMask(customFieldMask string) *UsersWatchCall { + c.urlParams_.Set("customFieldMask", customFieldMask) + return c +} + +// Customer sets the optional parameter "customer": Immutable ID of the +// G Suite account. In case of multi-domain, to fetch all users for a +// customer, fill this field instead of domain. +func (c *UsersWatchCall) Customer(customer string) *UsersWatchCall { + c.urlParams_.Set("customer", customer) + return c +} + +// Domain sets the optional parameter "domain": Name of the domain. Fill +// this field to get users from only this domain. To return all users in +// a multi-domain fill customer field instead. +func (c *UsersWatchCall) Domain(domain string) *UsersWatchCall { + c.urlParams_.Set("domain", domain) + return c +} + +// Event sets the optional parameter "event": Event on which +// subscription is intended (if subscribing) +// +// Possible values: +// "add" - User Created Event +// "delete" - User Deleted Event +// "makeAdmin" - User Admin Status Change Event +// "undelete" - User Undeleted Event +// "update" - User Updated Event +func (c *UsersWatchCall) Event(event string) *UsersWatchCall { + c.urlParams_.Set("event", event) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to return. +func (c *UsersWatchCall) MaxResults(maxResults int64) *UsersWatchCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Column to use for +// sorting results +// +// Possible values: +// "email" - Primary email of the user. +// "familyName" - User's family name. +// "givenName" - User's given name. +func (c *UsersWatchCall) OrderBy(orderBy string) *UsersWatchCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list +func (c *UsersWatchCall) PageToken(pageToken string) *UsersWatchCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Projection sets the optional parameter "projection": What subset of +// fields to fetch for this user. +// +// Possible values: +// "basic" (default) - Do not include any custom fields for the user. +// "custom" - Include custom fields from schemas mentioned in +// customFieldMask. +// "full" - Include all fields associated with this user. +func (c *UsersWatchCall) Projection(projection string) *UsersWatchCall { + c.urlParams_.Set("projection", projection) + return c +} + +// Query sets the optional parameter "query": Query string search. +// Should be of the form "". Complete documentation is at +// https://developers.google.com/admin-sdk/directory/v1/guides/search-users +func (c *UsersWatchCall) Query(query string) *UsersWatchCall { + c.urlParams_.Set("query", query) + return c +} + +// ShowDeleted sets the optional parameter "showDeleted": If set to +// true, retrieves the list of deleted users. (Default: false) +func (c *UsersWatchCall) ShowDeleted(showDeleted string) *UsersWatchCall { + c.urlParams_.Set("showDeleted", showDeleted) + return c +} + +// SortOrder sets the optional parameter "sortOrder": Whether to return +// results in ascending or descending order. +// +// Possible values: +// "ASCENDING" - Ascending order. +// "DESCENDING" - Descending order. +func (c *UsersWatchCall) SortOrder(sortOrder string) *UsersWatchCall { + c.urlParams_.Set("sortOrder", sortOrder) + return c +} + +// ViewType sets the optional parameter "viewType": Whether to fetch the +// ADMIN_VIEW or DOMAIN_PUBLIC view of the user. +// +// Possible values: +// "admin_view" (default) - Fetches the ADMIN_VIEW of the user. +// "domain_public" - Fetches the DOMAIN_PUBLIC view of the user. +func (c *UsersWatchCall) ViewType(viewType string) *UsersWatchCall { + c.urlParams_.Set("viewType", viewType) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersWatchCall) Fields(s ...googleapi.Field) *UsersWatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersWatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersWatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/watch") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.watch" call. +// Exactly one of *Channel or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Channel.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *UsersWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Channel{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Watch for changes in users list", + // "httpMethod": "POST", + // "id": "directory.users.watch", + // "parameters": { + // "customFieldMask": { + // "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.", + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", + // "location": "query", + // "type": "string" + // }, + // "domain": { + // "description": "Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.", + // "location": "query", + // "type": "string" + // }, + // "event": { + // "description": "Event on which subscription is intended (if subscribing)", + // "enum": [ + // "add", + // "delete", + // "makeAdmin", + // "undelete", + // "update" + // ], + // "enumDescriptions": [ + // "User Created Event", + // "User Deleted Event", + // "User Admin Status Change Event", + // "User Undeleted Event", + // "User Updated Event" + // ], + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "100", + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "maximum": "500", + // "minimum": "1", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Column to use for sorting results", + // "enum": [ + // "email", + // "familyName", + // "givenName" + // ], + // "enumDescriptions": [ + // "Primary email of the user.", + // "User's family name.", + // "User's given name." + // ], + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list", + // "location": "query", + // "type": "string" + // }, + // "projection": { + // "default": "basic", + // "description": "What subset of fields to fetch for this user.", + // "enum": [ + // "basic", + // "custom", + // "full" + // ], + // "enumDescriptions": [ + // "Do not include any custom fields for the user.", + // "Include custom fields from schemas mentioned in customFieldMask.", + // "Include all fields associated with this user." + // ], + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users", + // "location": "query", + // "type": "string" + // }, + // "showDeleted": { + // "description": "If set to true, retrieves the list of deleted users. (Default: false)", + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Whether to return results in ascending or descending order.", + // "enum": [ + // "ASCENDING", + // "DESCENDING" + // ], + // "enumDescriptions": [ + // "Ascending order.", + // "Descending order." + // ], + // "location": "query", + // "type": "string" + // }, + // "viewType": { + // "default": "admin_view", + // "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.", + // "enum": [ + // "admin_view", + // "domain_public" + // ], + // "enumDescriptions": [ + // "Fetches the ADMIN_VIEW of the user.", + // "Fetches the DOMAIN_PUBLIC view of the user." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "users/watch", + // "request": { + // "$ref": "Channel", + // "parameterName": "resource" + // }, + // "response": { + // "$ref": "Channel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ], + // "supportsSubscription": true + // } + +} + +// method id "directory.users.aliases.delete": + +type UsersAliasesDeleteCall struct { + s *Service + userKey string + alias string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Remove a alias for the user +func (r *UsersAliasesService) Delete(userKey string, alias string) *UsersAliasesDeleteCall { + c := &UsersAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.alias = alias + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersAliasesDeleteCall) Fields(s ...googleapi.Field) *UsersAliasesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersAliasesDeleteCall) Context(ctx context.Context) *UsersAliasesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersAliasesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersAliasesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases/{alias}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + "alias": c.alias, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.aliases.delete" call. +func (c *UsersAliasesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Remove a alias for the user", + // "httpMethod": "DELETE", + // "id": "directory.users.aliases.delete", + // "parameterOrder": [ + // "userKey", + // "alias" + // ], + // "parameters": { + // "alias": { + // "description": "The alias to be removed", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/aliases/{alias}", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.alias" + // ] + // } + +} + +// method id "directory.users.aliases.insert": + +type UsersAliasesInsertCall struct { + s *Service + userKey string + alias *Alias + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Add a alias for the user +func (r *UsersAliasesService) Insert(userKey string, alias *Alias) *UsersAliasesInsertCall { + c := &UsersAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.alias = alias + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersAliasesInsertCall) Fields(s ...googleapi.Field) *UsersAliasesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersAliasesInsertCall) Context(ctx context.Context) *UsersAliasesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersAliasesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersAliasesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.aliases.insert" call. +// Exactly one of *Alias or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Alias.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *UsersAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Alias{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Add a alias for the user", + // "httpMethod": "POST", + // "id": "directory.users.aliases.insert", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/aliases", + // "request": { + // "$ref": "Alias" + // }, + // "response": { + // "$ref": "Alias" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.alias" + // ] + // } + +} + +// method id "directory.users.aliases.list": + +type UsersAliasesListCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all aliases for a user +func (r *UsersAliasesService) List(userKey string) *UsersAliasesListCall { + c := &UsersAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Event sets the optional parameter "event": Event on which +// subscription is intended (if subscribing) +// +// Possible values: +// "add" - Alias Created Event +// "delete" - Alias Deleted Event +func (c *UsersAliasesListCall) Event(event string) *UsersAliasesListCall { + c.urlParams_.Set("event", event) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersAliasesListCall) Fields(s ...googleapi.Field) *UsersAliasesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *UsersAliasesListCall) IfNoneMatch(entityTag string) *UsersAliasesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersAliasesListCall) Context(ctx context.Context) *UsersAliasesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersAliasesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersAliasesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.aliases.list" call. +// Exactly one of *Aliases or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Aliases.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *UsersAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Aliases{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all aliases for a user", + // "httpMethod": "GET", + // "id": "directory.users.aliases.list", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "event": { + // "description": "Event on which subscription is intended (if subscribing)", + // "enum": [ + // "add", + // "delete" + // ], + // "enumDescriptions": [ + // "Alias Created Event", + // "Alias Deleted Event" + // ], + // "location": "query", + // "type": "string" + // }, + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/aliases", + // "response": { + // "$ref": "Aliases" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.alias", + // "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + // "https://www.googleapis.com/auth/admin.directory.user.readonly" + // ], + // "supportsSubscription": true + // } + +} + +// method id "directory.users.aliases.watch": + +type UsersAliasesWatchCall struct { + s *Service + userKey string + channel *Channel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Watch: Watch for changes in user aliases list +func (r *UsersAliasesService) Watch(userKey string, channel *Channel) *UsersAliasesWatchCall { + c := &UsersAliasesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.channel = channel + return c +} + +// Event sets the optional parameter "event": Event on which +// subscription is intended (if subscribing) +// +// Possible values: +// "add" - Alias Created Event +// "delete" - Alias Deleted Event +func (c *UsersAliasesWatchCall) Event(event string) *UsersAliasesWatchCall { + c.urlParams_.Set("event", event) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersAliasesWatchCall) Fields(s ...googleapi.Field) *UsersAliasesWatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersAliasesWatchCall) Context(ctx context.Context) *UsersAliasesWatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersAliasesWatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersAliasesWatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases/watch") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.aliases.watch" call. +// Exactly one of *Channel or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Channel.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *UsersAliasesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Channel{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Watch for changes in user aliases list", + // "httpMethod": "POST", + // "id": "directory.users.aliases.watch", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "event": { + // "description": "Event on which subscription is intended (if subscribing)", + // "enum": [ + // "add", + // "delete" + // ], + // "enumDescriptions": [ + // "Alias Created Event", + // "Alias Deleted Event" + // ], + // "location": "query", + // "type": "string" + // }, + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/aliases/watch", + // "request": { + // "$ref": "Channel", + // "parameterName": "resource" + // }, + // "response": { + // "$ref": "Channel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.alias", + // "https://www.googleapis.com/auth/admin.directory.user.alias.readonly", + // "https://www.googleapis.com/auth/admin.directory.user.readonly" + // ], + // "supportsSubscription": true + // } + +} + +// method id "directory.users.photos.delete": + +type UsersPhotosDeleteCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Remove photos for the user +func (r *UsersPhotosService) Delete(userKey string) *UsersPhotosDeleteCall { + c := &UsersPhotosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersPhotosDeleteCall) Fields(s ...googleapi.Field) *UsersPhotosDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersPhotosDeleteCall) Context(ctx context.Context) *UsersPhotosDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersPhotosDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersPhotosDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.photos.delete" call. +func (c *UsersPhotosDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Remove photos for the user", + // "httpMethod": "DELETE", + // "id": "directory.users.photos.delete", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/photos/thumbnail", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.photos.get": + +type UsersPhotosGetCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve photo of a user +func (r *UsersPhotosService) Get(userKey string) *UsersPhotosGetCall { + c := &UsersPhotosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersPhotosGetCall) Fields(s ...googleapi.Field) *UsersPhotosGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *UsersPhotosGetCall) IfNoneMatch(entityTag string) *UsersPhotosGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersPhotosGetCall) Context(ctx context.Context) *UsersPhotosGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersPhotosGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersPhotosGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.photos.get" call. +// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *UserPhoto.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *UsersPhotosGetCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UserPhoto{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve photo of a user", + // "httpMethod": "GET", + // "id": "directory.users.photos.get", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/photos/thumbnail", + // "response": { + // "$ref": "UserPhoto" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user", + // "https://www.googleapis.com/auth/admin.directory.user.readonly" + // ] + // } + +} + +// method id "directory.users.photos.patch": + +type UsersPhotosPatchCall struct { + s *Service + userKey string + userphoto *UserPhoto + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Add a photo for the user. This method supports patch +// semantics. +func (r *UsersPhotosService) Patch(userKey string, userphoto *UserPhoto) *UsersPhotosPatchCall { + c := &UsersPhotosPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.userphoto = userphoto + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersPhotosPatchCall) Fields(s ...googleapi.Field) *UsersPhotosPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersPhotosPatchCall) Context(ctx context.Context) *UsersPhotosPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersPhotosPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersPhotosPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.photos.patch" call. +// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *UserPhoto.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *UsersPhotosPatchCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UserPhoto{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Add a photo for the user. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "directory.users.photos.patch", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/photos/thumbnail", + // "request": { + // "$ref": "UserPhoto" + // }, + // "response": { + // "$ref": "UserPhoto" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.users.photos.update": + +type UsersPhotosUpdateCall struct { + s *Service + userKey string + userphoto *UserPhoto + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Add a photo for the user +func (r *UsersPhotosService) Update(userKey string, userphoto *UserPhoto) *UsersPhotosUpdateCall { + c := &UsersPhotosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + c.userphoto = userphoto + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UsersPhotosUpdateCall) Fields(s ...googleapi.Field) *UsersPhotosUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UsersPhotosUpdateCall) Context(ctx context.Context) *UsersPhotosUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersPhotosUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersPhotosUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.users.photos.update" call. +// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *UserPhoto.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *UsersPhotosUpdateCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UserPhoto{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Add a photo for the user", + // "httpMethod": "PUT", + // "id": "directory.users.photos.update", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/photos/thumbnail", + // "request": { + // "$ref": "UserPhoto" + // }, + // "response": { + // "$ref": "UserPhoto" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user" + // ] + // } + +} + +// method id "directory.verificationCodes.generate": + +type VerificationCodesGenerateCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Generate: Generate new backup verification codes for the user. +func (r *VerificationCodesService) Generate(userKey string) *VerificationCodesGenerateCall { + c := &VerificationCodesGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VerificationCodesGenerateCall) Fields(s ...googleapi.Field) *VerificationCodesGenerateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VerificationCodesGenerateCall) Context(ctx context.Context) *VerificationCodesGenerateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VerificationCodesGenerateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VerificationCodesGenerateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/verificationCodes/generate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.verificationCodes.generate" call. +func (c *VerificationCodesGenerateCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Generate new backup verification codes for the user.", + // "httpMethod": "POST", + // "id": "directory.verificationCodes.generate", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/verificationCodes/generate", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.verificationCodes.invalidate": + +type VerificationCodesInvalidateCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Invalidate: Invalidate the current backup verification codes for the +// user. +func (r *VerificationCodesService) Invalidate(userKey string) *VerificationCodesInvalidateCall { + c := &VerificationCodesInvalidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VerificationCodesInvalidateCall) Fields(s ...googleapi.Field) *VerificationCodesInvalidateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VerificationCodesInvalidateCall) Context(ctx context.Context) *VerificationCodesInvalidateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VerificationCodesInvalidateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VerificationCodesInvalidateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/verificationCodes/invalidate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.verificationCodes.invalidate" call. +func (c *VerificationCodesInvalidateCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Invalidate the current backup verification codes for the user.", + // "httpMethod": "POST", + // "id": "directory.verificationCodes.invalidate", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Email or immutable ID of the user", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/verificationCodes/invalidate", + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} + +// method id "directory.verificationCodes.list": + +type VerificationCodesListCall struct { + s *Service + userKey string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns the current set of valid backup verification codes for +// the specified user. +func (r *VerificationCodesService) List(userKey string) *VerificationCodesListCall { + c := &VerificationCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.userKey = userKey + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VerificationCodesListCall) Fields(s ...googleapi.Field) *VerificationCodesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VerificationCodesListCall) IfNoneMatch(entityTag string) *VerificationCodesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VerificationCodesListCall) Context(ctx context.Context) *VerificationCodesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VerificationCodesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VerificationCodesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/verificationCodes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "userKey": c.userKey, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "directory.verificationCodes.list" call. +// Exactly one of *VerificationCodes or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *VerificationCodes.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VerificationCodesListCall) Do(opts ...googleapi.CallOption) (*VerificationCodes, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VerificationCodes{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the current set of valid backup verification codes for the specified user.", + // "httpMethod": "GET", + // "id": "directory.verificationCodes.list", + // "parameterOrder": [ + // "userKey" + // ], + // "parameters": { + // "userKey": { + // "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "users/{userKey}/verificationCodes", + // "response": { + // "$ref": "VerificationCodes" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.directory.user.security" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json index 884c0fc65..376741598 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -884,7 +884,7 @@ ] }, "getIamPolicy": { - "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project.\n\nFor additional information about resource structure and identification,\nsee [Resource Names](/apis/design/resource_names).", + "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project.\n\nFor additional information about `resource` (e.g. my-project-id) structure\nand identification, see [Resource Names](/apis/design/resource_names).", "flatPath": "v1/projects/{resource}:getIamPolicy", "httpMethod": "POST", "id": "cloudresourcemanager.projects.getIamPolicy", @@ -948,7 +948,7 @@ "parameterOrder": [], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ `labels.\u003ckey\u003e` (where *key* is the name of a label)\n+ `parent.type`\n+ `parent.id`\n\nSome examples of using labels as filters:\n\n| Filter | Description |\n|------------------|-----------------------------------------------------|\n| name:how* | The project's name starts with \"how\". |\n| name:Howl | The project's name is `Howl` or `howl`. |\n| name:HOWL | Equivalent to above. |\n| NAME:howl | Equivalent to above. |\n| labels.color:* | The project has the label `color`. |\n| labels.color:red | The project's label `color` has the value `red`. |\n| labels.color:red\u0026nbsp;labels.size:big |The project's label `color` has\n the value `red` and its label `size` has the value `big`. |\n\nIf no filter is specified, the call will return projects for which the user\nhas the `resourcemanager.projects.get` permission.\n\nNOTE: To perform a by-parent query (eg., what projects are directly in a\nFolder), the caller must have the `resourcemanager.projects.list`\npermission on the parent and the filter must contain both a `parent.type`\nand a `parent.id` restriction\n(example: \"parent.type:folder parent.id:123\"). In this case an alternate\nsearch index is used which provides more consistent results.\n\nOptional.", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. Some eligible fields for filtering are:\n\n+ `name`\n+ `id`\n+ `labels.\u003ckey\u003e` (where *key* is the name of a label)\n+ `parent.type`\n+ `parent.id`\n+ `lifecycleState`\n\nSome examples of filter strings:\n\n| Filter | Description |\n|------------------|-----------------------------------------------------|\n| name:how* | The project's name starts with \"how\". |\n| name:Howl | The project's name is `Howl` or `howl`. |\n| name:HOWL | Equivalent to above. |\n| NAME:howl | Equivalent to above. |\n| labels.color:* | The project has the label `color`. |\n| labels.color:red | The project's label `color` has the value `red`. |\n| labels.color:red\u0026nbsp;labels.size:big | The project's label `color` |\n: : has the value `red` and its :\n: : label`size` has the value :\n: : `big`. :\n| lifecycleState:DELETE_REQUESTED | Only show projects that are |\n: : pending deletion. :\n\nIf no filter is specified, the call will return projects for which the user\nhas the `resourcemanager.projects.get` permission.\n\nNOTE: To perform a by-parent query (eg., what projects are directly in a\nFolder), the caller must have the `resourcemanager.projects.list`\npermission on the parent and the filter must contain both a `parent.type`\nand a `parent.id` restriction\n(example: \"parent.type:folder parent.id:123\"). In this case an alternate\nsearch index is used which provides more consistent results.\n\nOptional.", "location": "query", "type": "string" }, @@ -1032,7 +1032,7 @@ ] }, "setIamPolicy": { - "description": "Sets the IAM access control policy for the specified Project. Overwrites\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted to a `user`, `serviceAccount`, or a group\nthat is part of an organization. For example,\ngroup@myownpersonaldomain.com could be added as an owner to a project in\nthe myownpersonaldomain.com organization, but not the examplepetstore.com\norganization.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ You can only grant ownership of a project to a member by using the\nGCP Console. Inviting a member will deliver an invitation email that\nthey must accept. An invitation email is not generated if you are\ngranting a role other than owner, or if both the member you are inviting\nand the project are part of your organization.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ This method will replace the existing policy, and cannot be used to\nappend additional IAM settings.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.setIamPolicy` on the project", + "description": "Sets the IAM access control policy for the specified Project.\n\nCAUTION: This method will replace the existing policy, and cannot be used\nto append additional IAM settings.\n\nNOTE: Removing service accounts from policies or changing their roles can\nrender services completely inoperable. It is important to understand how\nthe service account is being used before removing or updating its roles.\n\nFor additional information about `resource` (e.g. my-project-id) structure\nand identification, see [Resource Names](/apis/design/resource_names).\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted to a `user`, `serviceAccount`, or a group\nthat is part of an organization. For example,\ngroup@myownpersonaldomain.com could be added as an owner to a project in\nthe myownpersonaldomain.com organization, but not the examplepetstore.com\norganization.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ You can only grant ownership of a project to a member by using the\nGCP Console. Inviting a member will deliver an invitation email that\nthey must accept. An invitation email is not generated if you are\ngranting a role other than owner, or if both the member you are inviting\nand the project are part of your organization.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.setIamPolicy` on the project", "flatPath": "v1/projects/{resource}:setIamPolicy", "httpMethod": "POST", "id": "cloudresourcemanager.projects.setIamPolicy", @@ -1087,7 +1087,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified Project.\n\nThere are no permissions required for making this API call.", + "description": "Returns permissions that a caller has on the specified Project.\n\nFor additional information about `resource` (e.g. my-project-id) structure\nand identification, see [Resource Names](/apis/design/resource_names).\n\nThere are no permissions required for making this API call.", "flatPath": "v1/projects/{resource}:testIamPermissions", "httpMethod": "POST", "id": "cloudresourcemanager.projects.testIamPermissions", @@ -1171,7 +1171,7 @@ } } }, - "revision": "20200415", + "revision": "20200622", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1186,7 +1186,7 @@ "type": "object" }, "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"sampleservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:aliya@example.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts jose@example.com from DATA_READ logging, and\naliya@example.com from DATA_WRITE logging.", + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n },\n {\n \"log_type\": \"ADMIN_READ\"\n }\n ]\n },\n {\n \"service\": \"sampleservice.googleapis.com\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\"\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:aliya@example.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts jose@example.com from DATA_READ logging, and\naliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", "properties": { "auditLogConfigs": { @@ -1204,7 +1204,7 @@ "type": "object" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\njose@example.com from DATA_READ logging.", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\njose@example.com from DATA_READ logging.", "id": "AuditLogConfig", "properties": { "exemptedMembers": { @@ -1239,7 +1239,7 @@ "properties": { "condition": { "$ref": "Expr", - "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\n\nIf the condition evaluates to `true`, then this binding applies to the\ncurrent request.\n\nIf the condition evaluates to `false`, then this binding does not apply to\nthe current request. However, a different role binding might grant the same\nrole to one or more of the members in this binding.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@example.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a user that has been recently deleted. For\n example, `alice@example.com?uid=123456789012345678901`. If the user is\n recovered, this value reverts to `user:{emailid}` and the recovered user\n retains the role in the binding.\n\n* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus\n unique identifier) representing a service account that has been recently\n deleted. For example,\n `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.\n If the service account is undeleted, this value reverts to\n `serviceAccount:{emailid}` and the undeleted service account retains the\n role in the binding.\n\n* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a Google group that has been recently\n deleted. For example, `admins@example.com?uid=123456789012345678901`. If\n the group is recovered, this value reverts to `group:{emailid}` and the\n recovered group retains the role in the binding.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", @@ -1289,7 +1289,7 @@ "type": "object" }, "Constraint": { - "description": "A `Constraint` describes a way in which a resource's configuration can be\nrestricted. For example, it controls which cloud services can be activated\nacross an organization, or whether a Compute Engine instance can have\nserial port connections established. `Constraints` can be configured by the\norganization's policy adminstrator to fit the needs of the organzation by\nsetting Policies for `Constraints` at different locations in the\norganization's resource hierarchy. Policies are inherited down the resource\nhierarchy from higher levels, but can also be overridden. For details about\nthe inheritance rules please read about\nPolicies.\n\n`Constraints` have a default behavior determined by the `constraint_default`\nfield, which is the enforcement behavior that is used in the absence of a\n`Policy` being defined or inherited for the resource in question.", + "description": "A `Constraint` describes a way in which a resource's configuration can be\nrestricted. For example, it controls which cloud services can be activated\nacross an organization, or whether a Compute Engine instance can have\nserial port connections established. `Constraints` can be configured by the\norganization's policy administrator to fit the needs of the organzation by\nsetting Policies for `Constraints` at different locations in the\norganization's resource hierarchy. Policies are inherited down the resource\nhierarchy from higher levels, but can also be overridden. For details about\nthe inheritance rules please read about\n[Policies](/resource-manager/reference/rest/v1/Policy).\n\n`Constraints` have a default behavior determined by the `constraint_default`\nfield, which is the enforcement behavior that is used in the absence of a\n`Policy` being defined or inherited for the resource in question.", "id": "Constraint", "properties": { "booleanConstraint": { @@ -1297,7 +1297,7 @@ "description": "Defines this constraint as being a BooleanConstraint." }, "constraintDefault": { - "description": "The evaluation behavior of this constraint in the absense of 'Policy'.", + "description": "The evaluation behavior of this constraint in the absence of 'Policy'.", "enum": [ "CONSTRAINT_DEFAULT_UNSPECIFIED", "ALLOW", @@ -1438,7 +1438,7 @@ "type": "object" }, "GetAncestryResponse": { - "description": "Response from the GetAncestry method.", + "description": "Response from the\nprojects.getAncestry\nmethod.", "id": "GetAncestryResponse", "properties": { "ancestor": { @@ -1489,7 +1489,7 @@ "id": "GetPolicyOptions", "properties": { "requestedPolicyVersion": { - "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.", + "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies).", "format": "int32", "type": "integer" } @@ -1532,7 +1532,7 @@ "type": "object" }, "ListAvailableOrgPolicyConstraintsRequest": { - "description": "The request sent to the [ListAvailableOrgPolicyConstraints]\ngoogle.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.", + "description": "The request sent to the `ListAvailableOrgPolicyConstraints` method on the\nproject, folder, or organization.", "id": "ListAvailableOrgPolicyConstraintsRequest", "properties": { "pageSize": { @@ -1548,7 +1548,7 @@ "type": "object" }, "ListAvailableOrgPolicyConstraintsResponse": { - "description": "The response returned from the ListAvailableOrgPolicyConstraints method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", + "description": "The response returned from the `ListAvailableOrgPolicyConstraints` method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", "id": "ListAvailableOrgPolicyConstraintsResponse", "properties": { "constraints": { @@ -1615,7 +1615,7 @@ "type": "object" }, "ListOrgPoliciesResponse": { - "description": "The response returned from the ListOrgPolicies method. It will be empty\nif no `Policies` are set on the resource.", + "description": "The response returned from the `ListOrgPolicies` method. It will be empty\nif no `Policies` are set on the resource.", "id": "ListOrgPoliciesResponse", "properties": { "nextPageToken": { @@ -1665,7 +1665,7 @@ "type": "array" }, "inheritFromParent": { - "description": "Determines the inheritance behavior for this `Policy`.\n\nBy default, a `ListPolicy` set at a resource supercedes any `Policy` set\nanywhere up the resource hierarchy. However, if `inherit_from_parent` is\nset to `true`, then the values from the effective `Policy` of the parent\nresource are inherited, meaning the values set in this `Policy` are\nadded to the values inherited up the hierarchy.\n\nSetting `Policy` hierarchies that inherit both allowed values and denied\nvalues isn't recommended in most circumstances to keep the configuration\nsimple and understandable. However, it is possible to set a `Policy` with\n`allowed_values` set that inherits a `Policy` with `denied_values` set.\nIn this case, the values that are allowed must be in `allowed_values` and\nnot present in `denied_values`.\n\nFor example, suppose you have a `Constraint`\n`constraints/serviceuser.services`, which has a `constraint_type` of\n`list_constraint`, and with `constraint_default` set to `ALLOW`.\nSuppose that at the Organization level, a `Policy` is applied that\nrestricts the allowed API activations to {`E1`, `E2`}. Then, if a\n`Policy` is applied to a project below the Organization that has\n`inherit_from_parent` set to `false` and field all_values set to DENY,\nthen an attempt to activate any API will be denied.\n\nThe following examples demonstrate different possible layerings for\n`projects/bar` parented by `organizations/foo`:\n\nExample 1 (no inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values:\"E2\"}\n `projects/bar` has `inherit_from_parent` `false` and values:\n {allowed_values: \"E3\" allowed_values: \"E4\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E3`, and `E4`.\n\nExample 2 (inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values:\"E2\"}\n `projects/bar` has a `Policy` with values:\n {value: \"E3\" value: \"E4\" inherit_from_parent: true}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.\n\nExample 3 (inheriting both allowed and denied values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {denied_values: \"E1\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe value accepted at `projects/bar` is `E2`.\n\nExample 4 (RestoreDefault):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values:\"E2\"}\n `projects/bar` has a `Policy` with values:\n {RestoreDefault: {}}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 5 (no policy inherits parent policy):\n `organizations/foo` has no `Policy` set.\n `projects/bar` has no `Policy` set.\nThe accepted values at both levels are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 6 (ListConstraint allowing all):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {all: ALLOW}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nAny value is accepted at `projects/bar`.\n\nExample 7 (ListConstraint allowing none):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {all: DENY}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nNo value is accepted at `projects/bar`.\n\nExample 10 (allowed and denied subtrees of Resource Manager hierarchy):\nGiven the following resource hierarchy\n O1-\u003e{F1, F2}; F1-\u003e{P1}; F2-\u003e{P2, P3},\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"under:organizations/O1\"}\n `projects/bar` has a `Policy` with:\n {allowed_values: \"under:projects/P3\"}\n {denied_values: \"under:folders/F2\"}\nThe accepted values at `organizations/foo` are `organizations/O1`,\n `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,\n `projects/P3`.\nThe accepted values at `projects/bar` are `organizations/O1`,\n `folders/F1`, `projects/P1`.", + "description": "Determines the inheritance behavior for this `Policy`.\n\nBy default, a `ListPolicy` set at a resource supersedes any `Policy` set\nanywhere up the resource hierarchy. However, if `inherit_from_parent` is\nset to `true`, then the values from the effective `Policy` of the parent\nresource are inherited, meaning the values set in this `Policy` are\nadded to the values inherited up the hierarchy.\n\nSetting `Policy` hierarchies that inherit both allowed values and denied\nvalues isn't recommended in most circumstances to keep the configuration\nsimple and understandable. However, it is possible to set a `Policy` with\n`allowed_values` set that inherits a `Policy` with `denied_values` set.\nIn this case, the values that are allowed must be in `allowed_values` and\nnot present in `denied_values`.\n\nFor example, suppose you have a `Constraint`\n`constraints/serviceuser.services`, which has a `constraint_type` of\n`list_constraint`, and with `constraint_default` set to `ALLOW`.\nSuppose that at the Organization level, a `Policy` is applied that\nrestricts the allowed API activations to {`E1`, `E2`}. Then, if a\n`Policy` is applied to a project below the Organization that has\n`inherit_from_parent` set to `false` and field all_values set to DENY,\nthen an attempt to activate any API will be denied.\n\nThe following examples demonstrate different possible layerings for\n`projects/bar` parented by `organizations/foo`:\n\nExample 1 (no inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values:\"E2\"}\n `projects/bar` has `inherit_from_parent` `false` and values:\n {allowed_values: \"E3\" allowed_values: \"E4\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E3`, and `E4`.\n\nExample 2 (inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values:\"E2\"}\n `projects/bar` has a `Policy` with values:\n {value: \"E3\" value: \"E4\" inherit_from_parent: true}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.\n\nExample 3 (inheriting both allowed and denied values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {denied_values: \"E1\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe value accepted at `projects/bar` is `E2`.\n\nExample 4 (RestoreDefault):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values:\"E2\"}\n `projects/bar` has a `Policy` with values:\n {RestoreDefault: {}}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 5 (no policy inherits parent policy):\n `organizations/foo` has no `Policy` set.\n `projects/bar` has no `Policy` set.\nThe accepted values at both levels are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 6 (ListConstraint allowing all):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {all: ALLOW}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nAny value is accepted at `projects/bar`.\n\nExample 7 (ListConstraint allowing none):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {all: DENY}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nNo value is accepted at `projects/bar`.\n\nExample 10 (allowed and denied subtrees of Resource Manager hierarchy):\nGiven the following resource hierarchy\n O1-\u003e{F1, F2}; F1-\u003e{P1}; F2-\u003e{P2, P3},\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"under:organizations/O1\"}\n `projects/bar` has a `Policy` with:\n {allowed_values: \"under:projects/P3\"}\n {denied_values: \"under:folders/F2\"}\nThe accepted values at `organizations/foo` are `organizations/O1`,\n `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,\n `projects/P3`.\nThe accepted values at `projects/bar` are `organizations/O1`,\n `folders/F1`, `projects/P1`.", "type": "boolean" }, "suggestedValue": { @@ -1737,7 +1737,7 @@ "description": "For boolean `Constraints`, whether to enforce the `Constraint` or not." }, "constraint": { - "description": "The name of the `Constraint` the `Policy` is configuring, for example,\n`constraints/serviceuser.services`.\n\nImmutable after creation.", + "description": "The name of the `Constraint` the `Policy` is configuring, for example,\n`constraints/serviceuser.services`.\n\nA [list of available\nconstraints](/resource-manager/docs/organization-policy/org-policy-constraints)\nis available.\n\nImmutable after creation.", "type": "string" }, "etag": { @@ -1816,7 +1816,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members` to a single `role`. Members can be user accounts, service accounts,\nGoogle groups, and domains (such as G Suite). A `role` is a named list of\npermissions; each `role` can be an IAM predefined role or a user-created\ncustom role.\n\nOptionally, a `binding` can specify a `condition`, which is a logical\nexpression that allows access to a resource only if the expression evaluates\nto `true`. A condition can add constraints based on attributes of the\nrequest, the resource, or both.\n\n**JSON example:**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\"user:eve@example.com\"],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n\n**YAML example:**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n - etag: BwWWja0YfJA=\n - version: 3\n\nFor a description of IAM and its features, see the\n[IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members` to a single `role`. Members can be user accounts, service accounts,\nGoogle groups, and domains (such as G Suite). A `role` is a named list of\npermissions; each `role` can be an IAM predefined role or a user-created\ncustom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a\n`condition`, which is a logical expression that allows access to a resource\nonly if the expression evaluates to `true`. A condition can add constraints\nbased on attributes of the request, the resource, or both. To learn which\nresources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\n \"user:eve@example.com\"\n ],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n\n**YAML example:**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n - etag: BwWWja0YfJA=\n - version: 3\n\nFor a description of IAM and its features, see the\n[IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -1839,7 +1839,7 @@ "type": "string" }, "version": { - "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.", + "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", "format": "int32", "type": "integer" } @@ -1859,7 +1859,7 @@ "additionalProperties": { "type": "string" }, - "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. A label\nvalue can be empty.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", + "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: a-z{0,62}.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression [a-z0-9_-]{0,63}. A label value can be empty.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", "type": "object" }, "lifecycleState": { diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go index f2ac5984e..bb95808a5 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -79,6 +79,7 @@ const apiId = "cloudresourcemanager:v1" const apiName = "cloudresourcemanager" const apiVersion = "v1" const basePath = "https://cloudresourcemanager.googleapis.com/" +const mtlsBasePath = "https://cloudresourcemanager.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( @@ -98,6 +99,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) client, endpoint, err := htransport.NewClient(ctx, opts...) if err != nil { return nil, err @@ -245,7 +247,7 @@ func (s *Ancestor) MarshalJSON() ([]byte, error) { // { // "audit_configs": [ // { -// "service": "allServices" +// "service": "allServices", // "audit_log_configs": [ // { // "log_type": "DATA_READ", @@ -254,18 +256,18 @@ func (s *Ancestor) MarshalJSON() ([]byte, error) { // ] // }, // { -// "log_type": "DATA_WRITE", +// "log_type": "DATA_WRITE" // }, // { -// "log_type": "ADMIN_READ", +// "log_type": "ADMIN_READ" // } // ] // }, // { -// "service": "sampleservice.googleapis.com" +// "service": "sampleservice.googleapis.com", // "audit_log_configs": [ // { -// "log_type": "DATA_READ", +// "log_type": "DATA_READ" // }, // { // "log_type": "DATA_WRITE", @@ -332,7 +334,7 @@ func (s *AuditConfig) MarshalJSON() ([]byte, error) { // ] // }, // { -// "log_type": "DATA_WRITE", +// "log_type": "DATA_WRITE" // } // ] // } @@ -383,11 +385,23 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. - // NOTE: An unsatisfied condition will not allow user access via - // current - // binding. Different bindings, including their conditions, are - // examined - // independently. + // + // If the condition evaluates to `true`, then this binding applies to + // the + // current request. + // + // If the condition evaluates to `false`, then this binding does not + // apply to + // the current request. However, a different role binding might grant + // the same + // role to one or more of the members in this binding. + // + // To learn which resources support conditions in their IAM policies, + // see + // the + // [IAM + // documentation](https://cloud.google.com/iam/help/conditions/r + // esource-policies). Condition *Expr `json:"condition,omitempty"` // Members: Specifies the identities requesting access for a Cloud @@ -622,7 +636,7 @@ func (s *ClearOrgPolicyRequest) MarshalJSON() ([]byte, error) { // have // serial port connections established. `Constraints` can be configured // by the -// organization's policy adminstrator to fit the needs of the +// organization's policy administrator to fit the needs of the // organzation by // setting Policies for `Constraints` at different locations in // the @@ -630,10 +644,12 @@ func (s *ClearOrgPolicyRequest) MarshalJSON() ([]byte, error) { // resource // hierarchy from higher levels, but can also be overridden. For details // about -// the inheritance rules please read about -// Policies. +// the inheritance rules please read +// about +// [Policies](/resource-manager/reference/rest/v1/Policy). // -// `Constraints` have a default behavior determined by the +// `Constr +// aints` have a default behavior determined by the // `constraint_default` // field, which is the enforcement behavior that is used in the absence // of a @@ -644,7 +660,7 @@ type Constraint struct { BooleanConstraint *BooleanConstraint `json:"booleanConstraint,omitempty"` // ConstraintDefault: The evaluation behavior of this constraint in the - // absense of 'Policy'. + // absence of 'Policy'. // // Possible values: // "CONSTRAINT_DEFAULT_UNSPECIFIED" - This is only used for @@ -913,7 +929,9 @@ func (s *FolderOperationError) MarshalJSON() ([]byte, error) { type GetAncestryRequest struct { } -// GetAncestryResponse: Response from the GetAncestry method. +// GetAncestryResponse: Response from the +// projects.getAncestry +// method. type GetAncestryResponse struct { // Ancestor: Ancestors are ordered from bottom to top of the resource // hierarchy. The @@ -1051,6 +1069,13 @@ type GetPolicyOptions struct { // Policies without any conditional bindings may specify any valid value // or // leave the field unset. + // + // To learn which resources support conditions in their IAM policies, + // see + // the + // [IAM + // documentation](https://cloud.google.com/iam/help/conditions/r + // esource-policies). RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1154,9 +1179,8 @@ func (s *Lien) MarshalJSON() ([]byte, error) { } // ListAvailableOrgPolicyConstraintsRequest: The request sent to the -// [ListAvailableOrgPolicyConstraints] -// google.cloud.OrgPolicy.v1.ListAvai -// lableOrgPolicyConstraints] method. +// `ListAvailableOrgPolicyConstraints` method on the +// project, folder, or organization. type ListAvailableOrgPolicyConstraintsRequest struct { // PageSize: Size of the pages to be returned. This is currently // unsupported and will @@ -1195,7 +1219,7 @@ func (s *ListAvailableOrgPolicyConstraintsRequest) MarshalJSON() ([]byte, error) } // ListAvailableOrgPolicyConstraintsResponse: The response returned from -// the ListAvailableOrgPolicyConstraints method. +// the `ListAvailableOrgPolicyConstraints` method. // Returns all `Constraints` that could be set at this level of the // hierarchy // (contrast with the response from `ListPolicies`, which returns all @@ -1356,7 +1380,7 @@ func (s *ListOrgPoliciesRequest) MarshalJSON() ([]byte, error) { } // ListOrgPoliciesResponse: The response returned from the -// ListOrgPolicies method. It will be empty +// `ListOrgPolicies` method. It will be empty // if no `Policies` are set on the resource. type ListOrgPoliciesResponse struct { // NextPageToken: Page token used to retrieve the next page. This is @@ -1453,7 +1477,7 @@ type ListPolicy struct { // InheritFromParent: Determines the inheritance behavior for this // `Policy`. // - // By default, a `ListPolicy` set at a resource supercedes any `Policy` + // By default, a `ListPolicy` set at a resource supersedes any `Policy` // set // anywhere up the resource hierarchy. However, if `inherit_from_parent` // is @@ -1751,6 +1775,12 @@ type OrgPolicy struct { // for example, // `constraints/serviceuser.services`. // + // A [list of + // available + // constraints](/resource-manager/docs/organization-policy/org- + // policy-constraints) + // is available. + // // Immutable after creation. Constraint string `json:"constraint,omitempty"` @@ -1945,13 +1975,18 @@ func (s *OrganizationOwner) MarshalJSON() ([]byte, error) { // user-created // custom role. // -// Optionally, a `binding` can specify a `condition`, which is a -// logical -// expression that allows access to a resource only if the expression -// evaluates -// to `true`. A condition can add constraints based on attributes of -// the -// request, the resource, or both. +// For some types of Google Cloud resources, a `binding` can also +// specify a +// `condition`, which is a logical expression that allows access to a +// resource +// only if the expression evaluates to `true`. A condition can add +// constraints +// based on attributes of the request, the resource, or both. To learn +// which +// resources support conditions in their IAM policies, see the +// [IAM +// documentation](https://cloud.google.com/iam/help/conditions/resource-p +// olicies). // // **JSON example:** // @@ -1969,7 +2004,9 @@ func (s *OrganizationOwner) MarshalJSON() ([]byte, error) { // }, // { // "role": "roles/resourcemanager.organizationViewer", -// "members": ["user:eve@example.com"], +// "members": [ +// "user:eve@example.com" +// ], // "condition": { // "title": "expirable access", // "description": "Does not grant access after Sep 2020", @@ -2068,6 +2105,12 @@ type Policy struct { // If a policy does not include any conditions, operations on that // policy may // specify any valid version or leave the field unset. + // + // To learn which resources support conditions in their IAM policies, + // see the + // [IAM + // documentation](https://cloud.google.com/iam/help/conditions/resource-p + // olicies). Version int64 `json:"version,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2111,14 +2154,12 @@ type Project struct { // // Label keys must be between 1 and 63 characters long and must // conform - // to the following regular expression: - // \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + // to the following regular expression: a-z{0,62}. // // Label values must be between 0 and 63 characters long and must // conform - // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A - // label - // value can be empty. + // to the regular expression [a-z0-9_-]{0,63}. A label value can be + // empty. // // No more than 256 labels can be associated with a given // resource. @@ -2672,7 +2713,7 @@ func (c *FoldersClearOrgPolicyCall) Header() http.Header { func (c *FoldersClearOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2820,7 +2861,7 @@ func (c *FoldersGetEffectiveOrgPolicyCall) Header() http.Header { func (c *FoldersGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2969,7 +3010,7 @@ func (c *FoldersGetOrgPolicyCall) Header() http.Header { func (c *FoldersGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3111,7 +3152,7 @@ func (c *FoldersListAvailableOrgPolicyConstraintsCall) Header() http.Header { func (c *FoldersListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3276,7 +3317,7 @@ func (c *FoldersListOrgPoliciesCall) Header() http.Header { func (c *FoldersListOrgPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3444,7 +3485,7 @@ func (c *FoldersSetOrgPolicyCall) Header() http.Header { func (c *FoldersSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3592,7 +3633,7 @@ func (c *LiensCreateCall) Header() http.Header { func (c *LiensCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3724,7 +3765,7 @@ func (c *LiensDeleteCall) Header() http.Header { func (c *LiensDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3874,7 +3915,7 @@ func (c *LiensGetCall) Header() http.Header { func (c *LiensGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4053,7 +4094,7 @@ func (c *LiensListCall) Header() http.Header { func (c *LiensListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4227,7 +4268,7 @@ func (c *OperationsGetCall) Header() http.Header { func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4363,7 +4404,7 @@ func (c *OrganizationsClearOrgPolicyCall) Header() http.Header { func (c *OrganizationsClearOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4513,7 +4554,7 @@ func (c *OrganizationsGetCall) Header() http.Header { func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4657,7 +4698,7 @@ func (c *OrganizationsGetEffectiveOrgPolicyCall) Header() http.Header { func (c *OrganizationsGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4808,7 +4849,7 @@ func (c *OrganizationsGetIamPolicyCall) Header() http.Header { func (c *OrganizationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4957,7 +4998,7 @@ func (c *OrganizationsGetOrgPolicyCall) Header() http.Header { func (c *OrganizationsGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5099,7 +5140,7 @@ func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) Header() http.Heade func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5264,7 +5305,7 @@ func (c *OrganizationsListOrgPoliciesCall) Header() http.Header { func (c *OrganizationsListOrgPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5434,7 +5475,7 @@ func (c *OrganizationsSearchCall) Header() http.Header { func (c *OrganizationsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5592,7 +5633,7 @@ func (c *OrganizationsSetIamPolicyCall) Header() http.Header { func (c *OrganizationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5738,7 +5779,7 @@ func (c *OrganizationsSetOrgPolicyCall) Header() http.Header { func (c *OrganizationsSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5883,7 +5924,7 @@ func (c *OrganizationsTestIamPermissionsCall) Header() http.Header { func (c *OrganizationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6024,7 +6065,7 @@ func (c *ProjectsClearOrgPolicyCall) Header() http.Header { func (c *ProjectsClearOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6186,7 +6227,7 @@ func (c *ProjectsCreateCall) Header() http.Header { func (c *ProjectsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6333,7 +6374,7 @@ func (c *ProjectsDeleteCall) Header() http.Header { func (c *ProjectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6476,7 +6517,7 @@ func (c *ProjectsGetCall) Header() http.Header { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6616,7 +6657,7 @@ func (c *ProjectsGetAncestryCall) Header() http.Header { func (c *ProjectsGetAncestryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6764,7 +6805,7 @@ func (c *ProjectsGetEffectiveOrgPolicyCall) Header() http.Header { func (c *ProjectsGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6879,9 +6920,10 @@ type ProjectsGetIamPolicyCall struct { // permission // `resourcemanager.projects.getIamPolicy` on the project. // -// For additional information about resource structure and -// identification, -// see [Resource Names](/apis/design/resource_names). +// For additional information about `resource` (e.g. my-project-id) +// structure +// and identification, see [Resource +// Names](/apis/design/resource_names). func (r *ProjectsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsGetIamPolicyCall { c := &ProjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -6916,7 +6958,7 @@ func (c *ProjectsGetIamPolicyCall) Header() http.Header { func (c *ProjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6980,7 +7022,7 @@ func (c *ProjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project.\n\nFor additional information about resource structure and identification,\nsee [Resource Names](/apis/design/resource_names).", + // "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project.\n\nFor additional information about `resource` (e.g. my-project-id) structure\nand identification, see [Resource Names](/apis/design/resource_names).", // "flatPath": "v1/projects/{resource}:getIamPolicy", // "httpMethod": "POST", // "id": "cloudresourcemanager.projects.getIamPolicy", @@ -7064,7 +7106,7 @@ func (c *ProjectsGetOrgPolicyCall) Header() http.Header { func (c *ProjectsGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7201,15 +7243,16 @@ func (r *ProjectsService) List() *ProjectsListCall { // Filter sets the optional parameter "filter": An expression for // filtering the results of the request. Filter rules are -// case insensitive. The fields eligible for filtering are: +// case insensitive. Some eligible fields for filtering are: // // + `name` // + `id` // + `labels.` (where *key* is the name of a label) // + `parent.type` // + `parent.id` +// + `lifecycleState` // -// Some examples of using labels as filters: +// Some examples of filter strings: // // | Filter | Description // @@ -7228,10 +7271,18 @@ func (r *ProjectsService) List() *ProjectsListCall { // | // | labels.color:red | The project's label `color` has the value `red`. // | -// | labels.color:red labels.size:big |The project's label `color` -// has -// the value `red` and its label `size` has the value `big`. +// | labels.color:red labels.size:big | The project's label `color` // | +// : : has the value `red` and its +// : +// : : label`size` has the value +// : +// : : `big`. +// : +// | lifecycleState:DELETE_REQUESTED | Only show projects that are +// | +// : : pending deletion. +// : // // If no filter is specified, the call will return projects for which // the user @@ -7306,7 +7357,7 @@ func (c *ProjectsListCall) Header() http.Header { func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7372,7 +7423,7 @@ func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectsRespon // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ `labels.\u003ckey\u003e` (where *key* is the name of a label)\n+ `parent.type`\n+ `parent.id`\n\nSome examples of using labels as filters:\n\n| Filter | Description |\n|------------------|-----------------------------------------------------|\n| name:how* | The project's name starts with \"how\". |\n| name:Howl | The project's name is `Howl` or `howl`. |\n| name:HOWL | Equivalent to above. |\n| NAME:howl | Equivalent to above. |\n| labels.color:* | The project has the label `color`. |\n| labels.color:red | The project's label `color` has the value `red`. |\n| labels.color:red\u0026nbsp;labels.size:big |The project's label `color` has\n the value `red` and its label `size` has the value `big`. |\n\nIf no filter is specified, the call will return projects for which the user\nhas the `resourcemanager.projects.get` permission.\n\nNOTE: To perform a by-parent query (eg., what projects are directly in a\nFolder), the caller must have the `resourcemanager.projects.list`\npermission on the parent and the filter must contain both a `parent.type`\nand a `parent.id` restriction\n(example: \"parent.type:folder parent.id:123\"). In this case an alternate\nsearch index is used which provides more consistent results.\n\nOptional.", + // "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. Some eligible fields for filtering are:\n\n+ `name`\n+ `id`\n+ `labels.\u003ckey\u003e` (where *key* is the name of a label)\n+ `parent.type`\n+ `parent.id`\n+ `lifecycleState`\n\nSome examples of filter strings:\n\n| Filter | Description |\n|------------------|-----------------------------------------------------|\n| name:how* | The project's name starts with \"how\". |\n| name:Howl | The project's name is `Howl` or `howl`. |\n| name:HOWL | Equivalent to above. |\n| NAME:howl | Equivalent to above. |\n| labels.color:* | The project has the label `color`. |\n| labels.color:red | The project's label `color` has the value `red`. |\n| labels.color:red\u0026nbsp;labels.size:big | The project's label `color` |\n: : has the value `red` and its :\n: : label`size` has the value :\n: : `big`. :\n| lifecycleState:DELETE_REQUESTED | Only show projects that are |\n: : pending deletion. :\n\nIf no filter is specified, the call will return projects for which the user\nhas the `resourcemanager.projects.get` permission.\n\nNOTE: To perform a by-parent query (eg., what projects are directly in a\nFolder), the caller must have the `resourcemanager.projects.list`\npermission on the parent and the filter must contain both a `parent.type`\nand a `parent.id` restriction\n(example: \"parent.type:folder parent.id:123\"). In this case an alternate\nsearch index is used which provides more consistent results.\n\nOptional.", // "location": "query", // "type": "string" // }, @@ -7468,7 +7519,7 @@ func (c *ProjectsListAvailableOrgPolicyConstraintsCall) Header() http.Header { func (c *ProjectsListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7633,7 +7684,7 @@ func (c *ProjectsListOrgPoliciesCall) Header() http.Header { func (c *ProjectsListOrgPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7761,8 +7812,23 @@ type ProjectsSetIamPolicyCall struct { } // SetIamPolicy: Sets the IAM access control policy for the specified -// Project. Overwrites -// any existing policy. +// Project. +// +// CAUTION: This method will replace the existing policy, and cannot be +// used +// to append additional IAM settings. +// +// NOTE: Removing service accounts from policies or changing their roles +// can +// render services completely inoperable. It is important to understand +// how +// the service account is being used before removing or updating its +// roles. +// +// For additional information about `resource` (e.g. my-project-id) +// structure +// and identification, see [Resource +// Names](/apis/design/resource_names). // // The following constraints apply when using `setIamPolicy()`: // @@ -7819,18 +7885,6 @@ type ProjectsSetIamPolicyCall struct { // is // rectified. // -// + This method will replace the existing policy, and cannot be used -// to -// append additional IAM settings. -// -// Note: Removing service accounts from policies or changing their -// roles -// can render services completely inoperable. It is important to -// understand -// how the service account is being used before removing or updating -// its -// roles. -// // Authorization requires the Google IAM // permission // `resourcemanager.projects.setIamPolicy` on the project @@ -7868,7 +7922,7 @@ func (c *ProjectsSetIamPolicyCall) Header() http.Header { func (c *ProjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7932,7 +7986,7 @@ func (c *ProjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Sets the IAM access control policy for the specified Project. Overwrites\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted to a `user`, `serviceAccount`, or a group\nthat is part of an organization. For example,\ngroup@myownpersonaldomain.com could be added as an owner to a project in\nthe myownpersonaldomain.com organization, but not the examplepetstore.com\norganization.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ You can only grant ownership of a project to a member by using the\nGCP Console. Inviting a member will deliver an invitation email that\nthey must accept. An invitation email is not generated if you are\ngranting a role other than owner, or if both the member you are inviting\nand the project are part of your organization.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ This method will replace the existing policy, and cannot be used to\nappend additional IAM settings.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.setIamPolicy` on the project", + // "description": "Sets the IAM access control policy for the specified Project.\n\nCAUTION: This method will replace the existing policy, and cannot be used\nto append additional IAM settings.\n\nNOTE: Removing service accounts from policies or changing their roles can\nrender services completely inoperable. It is important to understand how\nthe service account is being used before removing or updating its roles.\n\nFor additional information about `resource` (e.g. my-project-id) structure\nand identification, see [Resource Names](/apis/design/resource_names).\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted to a `user`, `serviceAccount`, or a group\nthat is part of an organization. For example,\ngroup@myownpersonaldomain.com could be added as an owner to a project in\nthe myownpersonaldomain.com organization, but not the examplepetstore.com\norganization.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ You can only grant ownership of a project to a member by using the\nGCP Console. Inviting a member will deliver an invitation email that\nthey must accept. An invitation email is not generated if you are\ngranting a role other than owner, or if both the member you are inviting\nand the project are part of your organization.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.setIamPolicy` on the project", // "flatPath": "v1/projects/{resource}:setIamPolicy", // "httpMethod": "POST", // "id": "cloudresourcemanager.projects.setIamPolicy", @@ -8013,7 +8067,7 @@ func (c *ProjectsSetOrgPolicyCall) Header() http.Header { func (c *ProjectsSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8121,6 +8175,11 @@ type ProjectsTestIamPermissionsCall struct { // TestIamPermissions: Returns permissions that a caller has on the // specified Project. // +// For additional information about `resource` (e.g. my-project-id) +// structure +// and identification, see [Resource +// Names](/apis/design/resource_names). +// // There are no permissions required for making this API call. func (r *ProjectsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsTestIamPermissionsCall { c := &ProjectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -8156,7 +8215,7 @@ func (c *ProjectsTestIamPermissionsCall) Header() http.Header { func (c *ProjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8220,7 +8279,7 @@ func (c *ProjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified Project.\n\nThere are no permissions required for making this API call.", + // "description": "Returns permissions that a caller has on the specified Project.\n\nFor additional information about `resource` (e.g. my-project-id) structure\nand identification, see [Resource Names](/apis/design/resource_names).\n\nThere are no permissions required for making this API call.", // "flatPath": "v1/projects/{resource}:testIamPermissions", // "httpMethod": "POST", // "id": "cloudresourcemanager.projects.testIamPermissions", @@ -8304,7 +8363,7 @@ func (c *ProjectsUndeleteCall) Header() http.Header { func (c *ProjectsUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8447,7 +8506,7 @@ func (c *ProjectsUpdateCall) Header() http.Header { func (c *ProjectsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 2314b85cd..afdbe8542 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/Kv3mdz8R6SmTm6CaMZqTSDKLCbE\"", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/L9LOTkeGMiZOvax0wDyduhAKK-M\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -185,7 +185,7 @@ ] }, "list": { - "description": "Retrieves a list of accelerator types available to the specified project.", + "description": "Retrieves a list of accelerator types that are available to the specified project.", "httpMethod": "GET", "id": "compute.acceleratorTypes.list", "parameterOrder": [ @@ -1398,7 +1398,7 @@ ] }, "insert": { - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Understanding backend services for more information.", + "description": "Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.", "httpMethod": "POST", "id": "compute.backendServices.insert", "parameterOrder": [ @@ -1480,7 +1480,7 @@ ] }, "patch": { - "description": "Patches the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "httpMethod": "PATCH", "id": "compute.backendServices.patch", "parameterOrder": [ @@ -1561,7 +1561,7 @@ ] }, "update": { - "description": "Updates the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.", + "description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.", "httpMethod": "PUT", "id": "compute.backendServices.update", "parameterOrder": [ @@ -5675,7 +5675,7 @@ ] }, "listErrors": { - "description": "Lists all errors thrown by actions on instances for a given managed instance group.", + "description": "Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.", "httpMethod": "GET", "id": "compute.instanceGroupManagers.listErrors", "parameterOrder": [ @@ -5738,7 +5738,7 @@ ] }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -6326,7 +6326,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group.", + "description": "Lists the instances in the specified instance group. The orderBy query parameter is not supported.", "httpMethod": "POST", "id": "compute.instanceGroups.listInstances", "parameterOrder": [ @@ -7465,7 +7465,7 @@ ] }, "listReferrers": { - "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + "description": "Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.", "httpMethod": "GET", "id": "compute.instances.listReferrers", "parameterOrder": [ @@ -8027,7 +8027,7 @@ ] }, "setScheduling": { - "description": "Sets an instance's scheduling options.", + "description": "Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.", "httpMethod": "POST", "id": "compute.instances.setScheduling", "parameterOrder": [ @@ -13126,7 +13126,7 @@ ] }, "insert": { - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Understanding backend services for more information.", + "description": "Creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.", "httpMethod": "POST", "id": "compute.regionBackendServices.insert", "parameterOrder": [ @@ -13224,7 +13224,7 @@ ] }, "patch": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "httpMethod": "PATCH", "id": "compute.regionBackendServices.patch", "parameterOrder": [ @@ -13273,7 +13273,7 @@ ] }, "update": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.", + "description": "Updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview.", "httpMethod": "PUT", "id": "compute.regionBackendServices.update", "parameterOrder": [ @@ -13811,6 +13811,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.regionDisks.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/disks/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates a persistent regional disk in the specified project using the data included in the request.", "httpMethod": "POST", @@ -14012,6 +14054,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "httpMethod": "POST", + "id": "compute.regionDisks.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/disks/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "description": "Sets the labels on the target regional disk.", "httpMethod": "POST", @@ -14108,6 +14194,242 @@ } } }, + "regionHealthCheckServices": { + "methods": { + "delete": { + "description": "Deletes the specified regional HealthCheckService.", + "httpMethod": "DELETE", + "id": "compute.regionHealthCheckServices.delete", + "parameterOrder": [ + "project", + "region", + "healthCheckService" + ], + "parameters": { + "healthCheckService": { + "description": "Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthCheckServices/{healthCheckService}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified regional HealthCheckService resource.", + "httpMethod": "GET", + "id": "compute.regionHealthCheckServices.get", + "parameterOrder": [ + "project", + "region", + "healthCheckService" + ], + "parameters": { + "healthCheckService": { + "description": "Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthCheckServices/{healthCheckService}", + "response": { + "$ref": "HealthCheckService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a regional HealthCheckService resource in the specified project and region using the data included in the request.", + "httpMethod": "POST", + "id": "compute.regionHealthCheckServices.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthCheckServices", + "request": { + "$ref": "HealthCheckService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists all the HealthCheckService resources that have been configured for the specified project in the given region.", + "httpMethod": "GET", + "id": "compute.regionHealthCheckServices.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\u003e`, or `\u003c`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthCheckServices", + "response": { + "$ref": "HealthCheckServicesList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Updates the specified regional HealthCheckService resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.regionHealthCheckServices.patch", + "parameterOrder": [ + "project", + "region", + "healthCheckService" + ], + "parameters": { + "healthCheckService": { + "description": "Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthCheckServices/{healthCheckService}", + "request": { + "$ref": "HealthCheckService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "regionHealthChecks": { "methods": { "delete": { @@ -14762,7 +15084,7 @@ ] }, "listErrors": { - "description": "Lists all errors thrown by actions on instances for a given regional managed instance group.", + "description": "Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.listErrors", "parameterOrder": [ @@ -14825,7 +15147,7 @@ ] }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -15229,7 +15551,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. The orderBy query parameter is not supported.", "httpMethod": "POST", "id": "compute.regionInstanceGroups.listInstances", "parameterOrder": [ @@ -15343,6 +15665,196 @@ } } }, + "regionNotificationEndpoints": { + "methods": { + "delete": { + "description": "Deletes the specified NotificationEndpoint in the given region", + "httpMethod": "DELETE", + "id": "compute.regionNotificationEndpoints.delete", + "parameterOrder": [ + "project", + "region", + "notificationEndpoint" + ], + "parameters": { + "notificationEndpoint": { + "description": "Name of the NotificationEndpoint resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified NotificationEndpoint resource in the given region.", + "httpMethod": "GET", + "id": "compute.regionNotificationEndpoints.get", + "parameterOrder": [ + "project", + "region", + "notificationEndpoint" + ], + "parameters": { + "notificationEndpoint": { + "description": "Name of the NotificationEndpoint resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", + "response": { + "$ref": "NotificationEndpoint" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.", + "httpMethod": "POST", + "id": "compute.regionNotificationEndpoints.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/notificationEndpoints", + "request": { + "$ref": "NotificationEndpoint" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists the NotificationEndpoints for a project in the given region.", + "httpMethod": "GET", + "id": "compute.regionNotificationEndpoints.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\u003e`, or `\u003c`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/notificationEndpoints", + "response": { + "$ref": "NotificationEndpointList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionOperations": { "methods": { "delete": { @@ -19576,7 +20088,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project.", + "description": "Retrieves an aggregated list of all usable subnetworks in the project.", "httpMethod": "GET", "id": "compute.subnetworks.listUsable", "parameterOrder": [ @@ -23301,7 +23813,7 @@ } } }, - "revision": "20200331", + "revision": "20200612", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -23347,7 +23859,7 @@ "type": "string" }, "maximumCardsPerInstance": { - "description": "[Output Only] Maximum accelerator cards allowed per instance.", + "description": "[Output Only] Maximum number of accelerator cards allowed per instance.", "format": "int32", "type": "integer" }, @@ -23357,7 +23869,7 @@ "type": "string" }, "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "description": "[Output Only] Server-defined, fully qualified URL for this resource.", "type": "string" }, "zone": { @@ -24230,7 +24742,7 @@ "type": "object" }, "AllocationSpecificSKUAllocationReservedInstanceProperties": { - "description": "Properties of the SKU instances being reserved.", + "description": "Properties of the SKU instances being reserved. Next ID: 9", "id": "AllocationSpecificSKUAllocationReservedInstanceProperties", "properties": { "guestAccelerators": { @@ -24251,6 +24763,18 @@ "description": "Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.", "type": "string" }, + "maintenanceInterval": { + "description": "Specifies whether this VM may be a stable fleet VM. Setting this to \"Periodic\" designates this VM as a Stable Fleet VM.\n\nSee go/stable-fleet-ug for more details.", + "enum": [ + "AS_NEEDED", + "PERIODIC" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "minCpuPlatform": { "description": "Minimum cpu platform the reservation.", "type": "string" @@ -24448,7 +24972,7 @@ "type": "object" }, "AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"sampleservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", "properties": { "auditLogConfigs": { @@ -24473,7 +24997,7 @@ "type": "object" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", "id": "AuditLogConfig", "properties": { "exemptedMembers": { @@ -24857,6 +25381,7 @@ "MISSING_CUSTOM_METRIC_DATA_POINTS", "MISSING_LOAD_BALANCING_DATA_POINTS", "MODE_OFF", + "MODE_ONLY_SCALE_OUT", "MODE_ONLY_UP", "MORE_THAN_ONE_BACKEND_SERVICE", "NOT_ENOUGH_QUOTA_AVAILABLE", @@ -24883,6 +25408,7 @@ "", "", "", + "", "" ], "type": "string" @@ -25023,9 +25549,11 @@ "enum": [ "OFF", "ON", + "ONLY_SCALE_OUT", "ONLY_UP" ], "enumDescriptions": [ + "", "", "", "" @@ -25108,7 +25636,7 @@ "type": "string" }, "capacityScaler": { - "description": "A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].\n\nThis cannot be used for internal load balancing.", + "description": "A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. Valid range is 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.\n\nThis cannot be used for internal load balancing.", "format": "float", "type": "number" }, @@ -25340,7 +25868,7 @@ "type": "object" }, "BackendService": { - "description": "Represents a Backend Service resource.\n\nA backend service contains configuration values for Google Cloud Platform load balancing services.\n\nBackend services in Google Compute Engine can be either regionally or globally scoped.\n\n* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)\n\nFor more information, read Backend Services.\n\n(== resource_for {$api_version}.backendService ==)", + "description": "Represents a Backend Service resource.\n\nA backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.\n\nBackend services in Google Compute Engine can be either regionally or globally scoped.\n\n* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)\n\nFor more information, see Backend Services.\n\n(== resource_for {$api_version}.backendService ==)", "id": "BackendService", "properties": { "affinityCookieTtlSec": { @@ -25406,7 +25934,8 @@ "type": "array" }, "iap": { - "$ref": "BackendServiceIAP" + "$ref": "BackendServiceIAP", + "description": "The configurations for Identity-Aware Proxy on this resource." }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -25437,7 +25966,7 @@ "type": "string" }, "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The possible values are: \n- ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. \n- LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \n- RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \n- RANDOM: The load balancer selects a random healthy host. \n- ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \n- MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 \n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nIf sessionAffinity is not NONE, and this field is not set to \u003eMAGLEV or RING_HASH, session affinity settings will not take effect.", + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: \n- ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. \n- LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \n- RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \n- RANDOM: The load balancer selects a random healthy host. \n- ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \n- MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 \n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nIf sessionAffinity is not NONE, and this field is not set to \u003eMAGLEV or RING_HASH, session affinity settings will not take effect.", "enum": [ "INVALID_LB_POLICY", "LEAST_REQUEST", @@ -25481,7 +26010,7 @@ "type": "integer" }, "portName": { - "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nMust be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).", + "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nMust be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).", "type": "string" }, "protocol": { @@ -25539,7 +26068,7 @@ "type": "string" }, "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.", "format": "int32", "type": "integer" } @@ -25705,6 +26234,13 @@ "BackendServiceGroupHealth": { "id": "BackendServiceGroupHealth", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata defined as annotations on the network endpoint group.", + "type": "object" + }, "healthStatus": { "description": "Health state of the backend instances or endpoints in requested instance or network endpoint group, determined based on configured health checks.", "items": { @@ -25725,12 +26261,15 @@ "id": "BackendServiceIAP", "properties": { "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.", "type": "boolean" }, "oauth2ClientId": { + "description": "OAuth2 client ID to use for the authentication flow.", "type": "string" }, "oauth2ClientSecret": { + "description": "OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.", "type": "string" }, "oauth2ClientSecretSha256": { @@ -25977,7 +26516,7 @@ "properties": { "condition": { "$ref": "Expr", - "description": "The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." + "description": "The condition that is associated with this binding.\n\nIf the condition evaluates to `true`, then this binding applies to the current request.\n\nIf the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.\n\nTo learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.\n\n* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.\n\n* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", @@ -26635,14 +27174,14 @@ "type": "array" }, "allowOriginRegexes": { - "description": "Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript \nAn origin is allowed if it matches either allow_origins or allow_origin_regex.", + "description": "Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript \nAn origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.", "items": { "type": "string" }, "type": "array" }, "allowOrigins": { - "description": "Specifies the list of origins that will be allowed to do CORS requests.\nAn origin is allowed if it matches either allow_origins or allow_origin_regex.", + "description": "Specifies the list of origins that will be allowed to do CORS requests.\nAn origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.", "items": { "type": "string" }, @@ -26826,7 +27365,7 @@ "type": "string" }, "physicalBlockSizeBytes": { - "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.", + "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.", "format": "int64", "type": "string" }, @@ -26857,6 +27396,14 @@ "format": "int64", "type": "string" }, + "sourceDisk": { + "description": "The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk", + "type": "string" + }, + "sourceDiskId": { + "description": "[Output Only] The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used.", + "type": "string" + }, "sourceImage": { "description": "The source image used to create this disk. If the source image is deleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family", "type": "string" @@ -26900,7 +27447,7 @@ "type": "string" }, "type": { - "description": "URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd", + "description": "URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd", "type": "string" }, "users": { @@ -27928,7 +28475,7 @@ "type": "object" }, "ExternalVpnGateway": { - "description": "External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to your Google Cloud VPN gateway. To create a highly available VPN from Google Cloud to your on-premises side or another Cloud provider's VPN gateway, you must create a external VPN gateway resource in GCP, which provides the information to GCP about your external VPN gateway.", + "description": "Represents an external VPN gateway.\n\nExternal VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to your Google Cloud VPN gateway.\n\nTo create a highly available VPN from Google Cloud Platform to your VPN gateway or another cloud provider's VPN gateway, you must create a external VPN gateway resource with information about the other gateway.\n\nFor more information about using external VPN gateways, see Creating an HA VPN gateway and tunnel pair to a peer VPN. (== resource_for {$api_version}.externalVpnGateways ==)", "id": "ExternalVpnGateway", "properties": { "creationTimestamp": { @@ -28139,6 +28686,7 @@ "type": "string" }, "fileType": { + "description": "The file type of source file.", "enum": [ "BIN", "UNDEFINED", @@ -28241,7 +28789,7 @@ }, "logConfig": { "$ref": "FirewallLogConfig", - "description": "This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver." + "description": "This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging." }, "name": { "annotations": { @@ -29083,6 +29631,7 @@ "FEATURE_TYPE_UNSPECIFIED", "MULTI_IP_SUBNET", "SECURE_BOOT", + "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS" @@ -29093,6 +29642,7 @@ "", "", "", + "", "" ], "type": "string" @@ -29300,6 +29850,10 @@ "description": "Type of the resource.", "type": "string" }, + "logConfig": { + "$ref": "HealthCheckLogConfig", + "description": "Configure logging on this health check." + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -29464,6 +30018,17 @@ }, "type": "object" }, + "HealthCheckLogConfig": { + "description": "Configuration of logging on a health check. If logging is enabled, logs will be exported to Stackdriver.", + "id": "HealthCheckLogConfig", + "properties": { + "enable": { + "description": "Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.", + "type": "boolean" + } + }, + "type": "object" + }, "HealthCheckReference": { "description": "A full or valid partial URL to a health check. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check \n- projects/project-id/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", "id": "HealthCheckReference", @@ -29474,6 +30039,203 @@ }, "type": "object" }, + "HealthCheckService": { + "description": "Represents a Health-Check as a Service resource.\n\n(== resource_for {$api_version}.regionHealthCheckServices ==)", + "id": "HealthCheckService", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthCheckService. An up-to-date fingerprint must be provided in order to patch/update the HealthCheckService; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthCheckService.", + "format": "byte", + "type": "string" + }, + "healthChecks": { + "description": "List of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks\u003c/code? must belong to the same region as zones of NEGs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "healthStatusAggregationPolicy": { + "description": "Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. \n- NO_AGGREGATION. An EndpointHealth message is returned for each backend in the health check service. \n- AND. If any backend's health check reports UNHEALTHY, then UNHEALTHY is the HealthState of the entire health check service. If all backend's are healthy, the HealthState of the health check service is HEALTHY. .", + "enum": [ + "AND", + "NO_AGGREGATION" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#healthCheckService", + "description": "[Output only] Type of the resource. Always compute#healthCheckServicefor health check services.", + "type": "string" + }, + "name": { + "description": "Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "networkEndpointGroups": { + "description": "List of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService.", + "items": { + "type": "string" + }, + "type": "array" + }, + "notificationEndpoints": { + "description": "List of URLs to the NotificationEndpoint resources. Must not have more than 10. A list of endpoints for receiving notifications of change in health status. For regional HealthCheckService, NotificationEndpoint must be regional and in the same region. For global HealthCheckService, NotificationEndpoint must be global.", + "items": { + "type": "string" + }, + "type": "array" + }, + "region": { + "description": "[Output Only] URL of the region where the health check service resides. This field is not applicable to global health check services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + } + }, + "type": "object" + }, + "HealthCheckServiceReference": { + "description": "A full or valid partial URL to a health check service. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service \n- projects/project-id/regions/us-west1/healthCheckServices/health-check-service \n- regions/us-west1/healthCheckServices/health-check-service", + "id": "HealthCheckServiceReference", + "properties": { + "healthCheckService": { + "type": "string" + } + }, + "type": "object" + }, + "HealthCheckServicesList": { + "id": "HealthCheckServicesList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of HealthCheckService resources.", + "items": { + "$ref": "HealthCheckService" + }, + "type": "array" + }, + "kind": { + "default": "compute#healthCheckServicesList", + "description": "[Output Only] Type of the resource. Always compute#healthCheckServicesList for lists of HealthCheckServices.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "HealthChecksAggregatedList": { "id": "HealthChecksAggregatedList", "properties": { @@ -29683,6 +30445,13 @@ "HealthStatus": { "id": "HealthStatus", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata defined as annotations for network endpoint.", + "type": "object" + }, "healthState": { "description": "Health state of the instance.", "enum": [ @@ -29726,6 +30495,10 @@ "$ref": "HealthCheckReference", "description": "URL of the health check associated with the health state of the network endpoint." }, + "healthCheckService": { + "$ref": "HealthCheckServiceReference", + "description": "URL of the health check service associated with the health state of the network endpoint." + }, "healthState": { "description": "Health state of the network endpoint determined based on the health checks configured.", "enum": [ @@ -30203,7 +30976,7 @@ }, "urlRewrite": { "$ref": "UrlRewrite", - "description": "The spec to modify the URL of the request, prior to forwarding the request to the matched service." + "description": "The spec to modify the URL of the request, prior to forwarding the request to the matched service.\nurlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers." }, "weightedBackendServices": { "description": "A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.\nOnce a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.", @@ -30615,7 +31388,7 @@ "type": "string" }, "sourceImage": { - "description": "URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: \n- this property, or \n- the rawDisk.source property, or \n- the sourceDisk property in order to create an image.", + "description": "URL of the source image used to create this image.\n\nIn order to create an image, you must provide the full or partial URL of one of the following: \n- The selfLink URL \n- This property \n- The rawDisk.source URL \n- The sourceDisk URL", "type": "string" }, "sourceImageEncryptionKey": { @@ -30627,7 +31400,7 @@ "type": "string" }, "sourceSnapshot": { - "description": "URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of: \n- this property, or \n- the sourceImage property, or \n- the rawDisk.source property, or \n- the sourceDisk property in order to create an image.", + "description": "URL of the source snapshot used to create this image.\n\nIn order to create an image, you must provide the full or partial URL of one of the following: \n- The selfLink URL \n- This property \n- The sourceImage URL \n- The rawDisk.source URL \n- The sourceDisk URL", "type": "string" }, "sourceSnapshotEncryptionKey": { @@ -30926,6 +31699,20 @@ }, "type": "array" }, + "privateIpv6GoogleAccess": { + "description": "The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.", + "enum": [ + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", + "INHERIT_FROM_SUBNETWORK" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "reservationAffinity": { "$ref": "ReservationAffinity", "description": "Specifies the reservations that this instance can consume from." @@ -30963,7 +31750,7 @@ "type": "boolean" }, "status": { - "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", + "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.", "enum": [ "DEPROVISIONING", "PROVISIONING", @@ -32779,22 +33566,22 @@ "id": "InstanceProperties", "properties": { "canIpForward": { - "description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.", + "description": "Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.", "type": "boolean" }, "description": { - "description": "An optional text description for the instances that are created from this instance template.", + "description": "An optional text description for the instances that are created from these properties.", "type": "string" }, "disks": { - "description": "An array of disks that are associated with the instances that are created from this template.", + "description": "An array of disks that are associated with the instances that are created from these properties.", "items": { "$ref": "AttachedDisk" }, "type": "array" }, "guestAccelerators": { - "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", + "description": "A list of guest accelerator cards' type and count to use for instances created from these properties.", "items": { "$ref": "AcceleratorConfig" }, @@ -32804,7 +33591,7 @@ "additionalProperties": { "type": "string" }, - "description": "Labels to apply to instances that are created from this template.", + "description": "Labels to apply to instances that are created from these properties.", "type": "object" }, "machineType": { @@ -32813,15 +33600,15 @@ "compute.instanceTemplates.insert" ] }, - "description": "The machine type to use for instances that are created from this template.", + "description": "The machine type to use for instances that are created from these properties.", "type": "string" }, "metadata": { "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." + "description": "The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." }, "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform.", + "description": "Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform.", "type": "string" }, "networkInterfaces": { @@ -32831,12 +33618,26 @@ }, "type": "array" }, + "privateIpv6GoogleAccess": { + "description": "The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.", + "enum": [ + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", + "INHERIT_FROM_SUBNETWORK" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "reservationAffinity": { "$ref": "ReservationAffinity", - "description": "Specifies the reservations that this instance can consume from." + "description": "Specifies the reservations that instances can consume from." }, "resourcePolicies": { - "description": "Resource policies (names, not ULRs) applied to instances created from this template.", + "description": "Resource policies (names, not ULRs) applied to instances created from these properties.", "items": { "type": "string" }, @@ -32844,10 +33645,10 @@ }, "scheduling": { "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from this template." + "description": "Specifies the scheduling options for the instances that are created from these properties." }, "serviceAccounts": { - "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.", + "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.", "items": { "$ref": "ServiceAccount" }, @@ -32858,7 +33659,7 @@ }, "tags": { "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." + "description": "A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." } }, "type": "object" @@ -33981,7 +34782,7 @@ "type": "object" }, "InterconnectCircuitInfo": { - "description": "Describes a single physical circuit between the Customer and Google. CircuitInfo objects are created by Google, so all fields are output only. Next id: 4", + "description": "Describes a single physical circuit between the Customer and Google. CircuitInfo objects are created by Google, so all fields are output only.", "id": "InterconnectCircuitInfo", "properties": { "customerDemarcId": { @@ -34487,7 +35288,7 @@ "type": "object" }, "InterconnectOutageNotification": { - "description": "Description of a planned outage on this Interconnect. Next id: 9", + "description": "Description of a planned outage on this Interconnect.", "id": "InterconnectOutageNotification", "properties": { "affectedCircuits": { @@ -34919,7 +35720,7 @@ "id": "LogConfigDataAccessOptions", "properties": { "logMode": { - "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.", + "description": "", "enum": [ "LOG_FAIL_CLOSED", "LOG_MODE_UNSPECIFIED" @@ -34937,6 +35738,24 @@ "description": "Represents a Machine Type resource.\n\nYou can use specific machine types for your VM instances based on performance and pricing requirements. For more information, read Machine Types. (== resource_for {$api_version}.machineTypes ==)", "id": "MachineType", "properties": { + "accelerators": { + "description": "[Output Only] A list of accelerator configurations assigned to this machine type.", + "items": { + "properties": { + "guestAcceleratorCount": { + "description": "Number of accelerator cards exposed to the guest.", + "format": "int32", + "type": "integer" + }, + "guestAcceleratorType": { + "description": "The accelerator type resource name, not a full URL, e.g. 'nvidia-tesla-k80'.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -35612,7 +36431,7 @@ "type": "string" }, "autoCreateSubnetworks": { - "description": "When set to true, the VPC network is created in \"auto\" mode. When set to false, the VPC network is created in \"custom\" mode.\n\nAn auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges.", + "description": "When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode.\n\nAn auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges.\n\nFor custom mode VPC networks, you can add subnets using the subnetworks insert method.", "type": "boolean" }, "creationTimestamp": { @@ -35674,9 +36493,16 @@ "type": "object" }, "NetworkEndpoint": { - "description": "The network endpoint. Next ID: 7", + "description": "The network endpoint.", "id": "NetworkEndpoint", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata defined as annotations on the network endpoint.", + "type": "object" + }, "fqdn": { "description": "Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type is NON_GCP_FQDN_PORT.", "type": "string" @@ -35698,9 +36524,16 @@ "type": "object" }, "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints.\n\nFor more information read Network endpoint groups overview. (== resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21", + "description": "Represents a collection of network endpoints.\n\nA network endpoint group (NEG) defines how a set of endpoints should be reached, whether they are reachable, and where they are located. For more information about using NEGs, see Setting up internet NEGs or Setting up zonal NEGs. (== resource_for {$api_version}.networkEndpointGroups ==) (== resource_for {$api_version}.globalNetworkEndpointGroups ==)", "id": "NetworkEndpointGroup", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata defined as annotations on the network endpoint group.", + "type": "object" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -36019,7 +36852,7 @@ "id": "NetworkEndpointGroupsListEndpointsRequest", "properties": { "healthStatus": { - "description": "Optional query parameter for showing the health status of each network endpoint. Valid options are SKIP or SHOW. If you don't specifiy this parameter, the health status of network endpoints will not be provided.", + "description": "Optional query parameter for showing the health status of each network endpoint. Valid options are SKIP or SHOW. If you don't specify this parameter, the health status of network endpoints will not be provided.", "enum": [ "SHOW", "SKIP" @@ -36274,6 +37107,10 @@ "format": "byte", "type": "string" }, + "ipv6Address": { + "description": "[Output Only] An IPv6 internal network address for this network interface.", + "type": "string" + }, "kind": { "default": "compute#networkInterface", "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", @@ -36581,7 +37418,7 @@ "type": "string" }, "nodeTemplate": { - "description": "The URL of the node template to which this node group belongs.", + "description": "URL of the node template to create the node group from.", "type": "string" }, "selfLink": { @@ -37157,7 +37994,7 @@ "type": "object" }, "NodeTemplate": { - "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==) (== NextID: 19 ==)", + "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==)", "id": "NodeTemplate", "properties": { "creationTimestamp": { @@ -37944,6 +38781,187 @@ }, "type": "object" }, + "NotificationEndpoint": { + "description": "Represents a notification endpoint.\n\nA notification endpoint resource defines an endpoint to receive notifications when there are status changes detected by the associated health check service.\n\nFor more information, see Health checks overview. (== resource_for {$api_version}.notificationEndpoint ==) (== resource_for {$api_version}.regionNotificationEndpoints ==)", + "id": "NotificationEndpoint", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "grpcSettings": { + "$ref": "NotificationEndpointGrpcSettings", + "description": "Settings of the gRPC notification endpoint including the endpoint URL and the retry duration." + }, + "id": { + "description": "[Output Only] A unique identifier for this resource type. The server generates this identifier.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#notificationEndpoint", + "description": "[Output Only] Type of the resource. Always compute#notificationEndpoint for notification endpoints.", + "type": "string" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the notification endpoint resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + } + }, + "type": "object" + }, + "NotificationEndpointGrpcSettings": { + "description": "Represents a gRPC setting that describes one gRPC notification endpoint and the retry duration attempting to send notification to this endpoint.", + "id": "NotificationEndpointGrpcSettings", + "properties": { + "authority": { + "description": "Optional. If specified, this field is used to set the authority header by the sender of notifications. See https://tools.ietf.org/html/rfc7540#section-8.1.2.3", + "type": "string" + }, + "endpoint": { + "description": "Endpoint to which gRPC notifications are sent. This must be a valid gRPCLB DNS name.", + "type": "string" + }, + "payloadName": { + "description": "Optional. If specified, this field is used to populate the \"name\" field in gRPC requests.", + "type": "string" + }, + "resendInterval": { + "$ref": "Duration", + "description": "Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed." + }, + "retryDurationSec": { + "description": "How much time (in seconds) is spent attempting notification retries until a successful response is received. Default is 30s. Limit is 20m (1200s). Must be a positive number.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "NotificationEndpointList": { + "id": "NotificationEndpointList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of NotificationEndpoint resources.", + "items": { + "$ref": "NotificationEndpoint" + }, + "type": "array" + }, + "kind": { + "default": "compute#notificationEndpointList", + "description": "[Output Only] Type of the resource. Always compute#notificationEndpoint for notification endpoints.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Operation": { "description": "Represents an Operation resource.\n\nGoogle Compute Engine has three Operation resources:\n\n* [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)\n\nYou can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.\n\nOperations can be global, regional or zonal. \n- For global operations, use the `globalOperations` resource. \n- For regional operations, use the `regionOperations` resource. \n- For zonal operations, use the `zonalOperations` resource. \n\nFor more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)", "id": "Operation", @@ -38540,7 +39558,7 @@ "type": "object" }, "PacketMirroring": { - "description": "Represents a PacketMirroring resource.", + "description": "Represents a Packet Mirroring resource.\n\nPacket Mirroring clones the traffic of specified instances in your Virtual Private Cloud (VPC) network and forwards it to a collector destination, such as an instance group of an internal TCP/UDP load balancer, for analysis or examination. For more information about setting up Packet Mirroring, see Using Packet Mirroring. (== resource_for {$api_version}.packetMirrorings ==)", "id": "PacketMirroring", "properties": { "collectorIlb": { @@ -39048,7 +40066,7 @@ "properties": { "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher's defaultRouteAction." }, "defaultService": { "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", @@ -39100,7 +40118,7 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set." + "description": "In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule's routeAction." }, "service": { "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", @@ -39129,7 +40147,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.\n\nOptionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.\n\n**JSON example:**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [\"user:eve@example.com\"], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 }\n\n**YAML example:**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3\n\nFor a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 }\n\n**YAML example:**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3\n\nFor a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -39163,7 +40181,7 @@ "type": "array" }, "version": { - "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.\n\nAny operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.", + "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.\n\nAny operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", "format": "int32", "type": "integer" } @@ -39348,18 +40366,22 @@ "metric": { "description": "[Output Only] Name of the quota metric.", "enum": [ + "A2_CPUS", "AFFINITY_GROUPS", "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", "C2_CPUS", "COMMITMENTS", + "COMMITTED_A2_CPUS", "COMMITTED_C2_CPUS", "COMMITTED_CPUS", "COMMITTED_LICENSES", "COMMITTED_LOCAL_SSD_TOTAL_GB", + "COMMITTED_MEMORY_OPTIMIZED_CPUS", "COMMITTED_N2D_CPUS", "COMMITTED_N2_CPUS", + "COMMITTED_NVIDIA_A100_GPUS", "COMMITTED_NVIDIA_K80_GPUS", "COMMITTED_NVIDIA_P100_GPUS", "COMMITTED_NVIDIA_P4_GPUS", @@ -39389,13 +40411,17 @@ "IN_USE_BACKUP_SCHEDULES", "IN_USE_SNAPSHOT_SCHEDULES", "LOCAL_SSD_TOTAL_GB", + "M1_CPUS", + "M2_CPUS", "MACHINE_IMAGES", "N2D_CPUS", "N2_CPUS", "NETWORKS", "NETWORK_ENDPOINT_GROUPS", + "NETWORK_FIREWALL_POLICIES", "NODE_GROUPS", "NODE_TEMPLATES", + "NVIDIA_A100_GPUS", "NVIDIA_K80_GPUS", "NVIDIA_P100_GPUS", "NVIDIA_P100_VWS_GPUS", @@ -39407,6 +40433,7 @@ "PACKET_MIRRORINGS", "PREEMPTIBLE_CPUS", "PREEMPTIBLE_LOCAL_SSD_GB", + "PREEMPTIBLE_NVIDIA_A100_GPUS", "PREEMPTIBLE_NVIDIA_K80_GPUS", "PREEMPTIBLE_NVIDIA_P100_GPUS", "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS", @@ -39537,6 +40564,15 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -42003,7 +43039,7 @@ "type": "object" }, "Router": { - "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read the the Cloud Router overview.", + "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read the Cloud Router overview.", "id": "Router", "properties": { "bgp": { @@ -42735,7 +43771,7 @@ "type": "object" }, "RouterStatusNatStatus": { - "description": "Status of a NAT contained in this router. Next tag: 9", + "description": "Status of a NAT contained in this router.", "id": "RouterStatusNatStatus", "properties": { "autoAllocatedNatIps": { @@ -43024,7 +44060,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance. NextID: 10", + "description": "Sets the scheduling options for an Instance. NextID: 12", "id": "Scheduling", "properties": { "automaticRestart": { @@ -43051,7 +44087,7 @@ "type": "string" }, "preemptible": { - "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.", + "description": "Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.", "type": "boolean" } }, @@ -43412,15 +44448,15 @@ "id": "ShieldedInstanceConfig", "properties": { "enableIntegrityMonitoring": { - "description": "Defines whether the instance has integrity monitoring enabled.", + "description": "Defines whether the instance has integrity monitoring enabled. Enabled by default.", "type": "boolean" }, "enableSecureBoot": { - "description": "Defines whether the instance has Secure Boot enabled.", + "description": "Defines whether the instance has Secure Boot enabled. Disabled by default.", "type": "boolean" }, "enableVtpm": { - "description": "Defines whether the instance has the vTPM enabled.", + "description": "Defines whether the instance has the vTPM enabled. Enabled by default.", "type": "boolean" } }, @@ -43748,7 +44784,7 @@ "type": "object" }, "SslCertificate": { - "description": "Represents an SSL Certificate resource.\n\nGoogle Compute Engine has two SSL Certificate resources:\n\n* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates)\n\n\n\nThe sslCertificates are used by: \n- external HTTPS load balancers \n- SSL proxy load balancers \n\nThe regionSslCertificates are used by internal HTTPS load balancers.\n\nOptionally, certificate file contents that you upload can contain a set of up to five PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and using SSL certificates and SSL certificates quotas and limits. (== resource_for {$api_version}.sslCertificates ==) (== resource_for {$api_version}.regionSslCertificates ==)", + "description": "Represents an SSL Certificate resource.\n\nGoogle Compute Engine has two SSL Certificate resources:\n\n* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates)\n\n\n\nThe sslCertificates are used by: \n- external HTTPS load balancers \n- SSL proxy load balancers \n\nThe regionSslCertificates are used by internal HTTPS load balancers.\n\nOptionally, certificate file contents that you upload can contain a set of up to five PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and using SSL certificates, SSL certificates quotas and limits, and Troubleshooting SSL certificates. (== resource_for {$api_version}.sslCertificates ==) (== resource_for {$api_version}.regionSslCertificates ==)", "id": "SslCertificate", "properties": { "certificate": { @@ -44531,7 +45567,7 @@ "type": "string" }, "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging. This field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", "type": "boolean" }, "fingerprint": { @@ -44549,7 +45585,11 @@ "type": "string" }, "ipCidrRange": { - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time.", + "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be expanded after creation using expandIpCidrRange.", + "type": "string" + }, + "ipv6CidrRange": { + "description": "[Output Only] The range of internal IPv6 addresses that are owned by this subnetwork.", "type": "string" }, "kind": { @@ -44559,7 +45599,7 @@ }, "logConfig": { "$ref": "SubnetworkLogConfig", - "description": "This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Stackdriver." + "description": "This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Cloud Logging." }, "name": { "description": "The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", @@ -44574,8 +45614,22 @@ "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess.", "type": "boolean" }, + "privateIpv6GoogleAccess": { + "description": "The private IPv6 google access type for the VMs in this subnet. This is an expanded field of enablePrivateV6Access. If both fields are set, privateIpv6GoogleAccess will take priority.\n\nThis field can be both set at resource creation time and updated using patch.", + "enum": [ + "DISABLE_GOOGLE_ACCESS", + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918.", + "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", "enum": [ "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", @@ -47515,7 +48569,7 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set." + "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction." }, "defaultService": { "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.", @@ -48332,7 +49386,7 @@ "type": "object" }, "VpnGateway": { - "description": "Represents a VPN gateway resource. Next ID: 13", + "description": "Represents a HA VPN gateway.\n\nHA VPN is a high-availability (HA) Cloud VPN solution that lets you securely connect your on-premises network to your Google Cloud Virtual Private Cloud network through an IPsec VPN connection in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies . (== resource_for {$api_version}.vpnGateways ==)", "id": "VpnGateway", "properties": { "creationTimestamp": { diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index 9f9eebf1b..d8719cdcc 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -178,9 +178,11 @@ func New(client *http.Client) (*Service, error) { s.RegionCommitments = NewRegionCommitmentsService(s) s.RegionDiskTypes = NewRegionDiskTypesService(s) s.RegionDisks = NewRegionDisksService(s) + s.RegionHealthCheckServices = NewRegionHealthCheckServicesService(s) s.RegionHealthChecks = NewRegionHealthChecksService(s) s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) + s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) s.RegionOperations = NewRegionOperationsService(s) s.RegionSslCertificates = NewRegionSslCertificatesService(s) s.RegionTargetHttpProxies = NewRegionTargetHttpProxiesService(s) @@ -296,12 +298,16 @@ type Service struct { RegionDisks *RegionDisksService + RegionHealthCheckServices *RegionHealthCheckServicesService + RegionHealthChecks *RegionHealthChecksService RegionInstanceGroupManagers *RegionInstanceGroupManagersService RegionInstanceGroups *RegionInstanceGroupsService + RegionNotificationEndpoints *RegionNotificationEndpointsService + RegionOperations *RegionOperationsService RegionSslCertificates *RegionSslCertificatesService @@ -724,6 +730,15 @@ type RegionDisksService struct { s *Service } +func NewRegionHealthCheckServicesService(s *Service) *RegionHealthCheckServicesService { + rs := &RegionHealthCheckServicesService{s: s} + return rs +} + +type RegionHealthCheckServicesService struct { + s *Service +} + func NewRegionHealthChecksService(s *Service) *RegionHealthChecksService { rs := &RegionHealthChecksService{s: s} return rs @@ -751,6 +766,15 @@ type RegionInstanceGroupsService struct { s *Service } +func NewRegionNotificationEndpointsService(s *Service) *RegionNotificationEndpointsService { + rs := &RegionNotificationEndpointsService{s: s} + return rs +} + +type RegionNotificationEndpointsService struct { + s *Service +} + func NewRegionOperationsService(s *Service) *RegionOperationsService { rs := &RegionOperationsService{s: s} return rs @@ -1061,14 +1085,14 @@ type AcceleratorType struct { // compute#acceleratorType for accelerator types. Kind string `json:"kind,omitempty"` - // MaximumCardsPerInstance: [Output Only] Maximum accelerator cards - // allowed per instance. + // MaximumCardsPerInstance: [Output Only] Maximum number of accelerator + // cards allowed per instance. MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // SelfLink: [Output Only] Server-defined, fully qualified URL for this // resource. SelfLink string `json:"selfLink,omitempty"` @@ -2318,7 +2342,7 @@ func (s *AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) } // AllocationSpecificSKUAllocationReservedInstanceProperties: Properties -// of the SKU instances being reserved. +// of the SKU instances being reserved. Next ID: 9 type AllocationSpecificSKUAllocationReservedInstanceProperties struct { // GuestAccelerators: Specifies accelerator type and count. GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` @@ -2333,6 +2357,17 @@ type AllocationSpecificSKUAllocationReservedInstanceProperties struct { // custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. MachineType string `json:"machineType,omitempty"` + // MaintenanceInterval: Specifies whether this VM may be a stable fleet + // VM. Setting this to "Periodic" designates this VM as a Stable Fleet + // VM. + // + // See go/stable-fleet-ug for more details. + // + // Possible values: + // "AS_NEEDED" + // "PERIODIC" + MaintenanceInterval string `json:"maintenanceInterval,omitempty"` + // MinCpuPlatform: Minimum cpu platform the reservation. MinCpuPlatform string `json:"minCpuPlatform,omitempty"` @@ -2698,12 +2733,12 @@ func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { // // Example Policy with multiple AuditConfigs: // -// { "audit_configs": [ { "service": "allServices" "audit_log_configs": +// { "audit_configs": [ { "service": "allServices", "audit_log_configs": // [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { -// "log_type": "ADMIN_READ", } ] }, { "service": -// "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": -// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ // "user:aliya@example.com" ] } ] } ] } // // For sampleservice, this policy enables DATA_READ, DATA_WRITE and @@ -2750,7 +2785,7 @@ func (s *AuditConfig) MarshalJSON() ([]byte, error) { // // { "audit_log_configs": [ { "log_type": "DATA_READ", // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": -// "DATA_WRITE", } ] } +// "DATA_WRITE" } ] } // // This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting // jose@example.com from DATA_READ logging. @@ -3327,6 +3362,7 @@ type AutoscalerStatusDetails struct { // "MISSING_CUSTOM_METRIC_DATA_POINTS" // "MISSING_LOAD_BALANCING_DATA_POINTS" // "MODE_OFF" + // "MODE_ONLY_SCALE_OUT" // "MODE_ONLY_UP" // "MORE_THAN_ONE_BACKEND_SERVICE" // "NOT_ENOUGH_QUOTA_AVAILABLE" @@ -3539,6 +3575,7 @@ type AutoscalingPolicy struct { // Possible values: // "OFF" // "ON" + // "ONLY_SCALE_OUT" // "ONLY_UP" Mode string `json:"mode,omitempty"` @@ -3783,8 +3820,10 @@ type Backend struct { // capacity (based on UTILIZATION, RATE or CONNECTION). Default value is // 1, which means the group will serve up to 100% of its configured // capacity (depending on balancingMode). A setting of 0 means the group - // is completely drained, offering 0% of its available Capacity. Valid - // range is [0.0,1.0]. + // is completely drained, offering 0% of its available capacity. Valid + // range is 0.0 and [0.1,1.0]. You cannot configure a setting larger + // than 0 and smaller than 0.1. You cannot configure a setting of 0 when + // there is only one backend attached to the backend service. // // This cannot be used for internal load balancing. CapacityScaler float64 `json:"capacityScaler,omitempty"` @@ -4226,8 +4265,13 @@ func (s *BackendBucketListWarningData) MarshalJSON() ([]byte, error) { // BackendService: Represents a Backend Service resource. // -// A backend service contains configuration values for Google Cloud -// Platform load balancing services. +// A backend service defines how Google Cloud load balancers distribute +// traffic. The backend service configuration contains a set of values, +// such as the protocol used to connect to backends, various +// distribution and session settings, health checks, and timeouts. These +// settings provide fine-grained control over how your load balancer +// behaves. Most of the settings have default values that allow for easy +// configuration if you need to get started quickly. // // Backend services in Google Compute Engine can be either regionally or // globally scoped. @@ -4238,7 +4282,7 @@ func (s *BackendBucketListWarningData) MarshalJSON() ([]byte, error) { // [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendSe // rvices) // -// For more information, read Backend Services. +// For more information, see Backend Services. // // (== resource_for {$api_version}.backendService ==) type BackendService struct { @@ -4325,6 +4369,7 @@ type BackendService struct { // backends must not have a health check. A health check must HealthChecks []string `json:"healthChecks,omitempty"` + // Iap: The configurations for Identity-Aware Proxy on this resource. Iap *BackendServiceIAP `json:"iap,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -4369,8 +4414,7 @@ type BackendService struct { // - MAGLEV: used as a drop in replacement for the ring hash load // balancer. Maglev is not as stable as ring hash but has faster table // lookup build times and host selection times. For more information - // about Maglev, refer to https://ai.google/research/pubs/pub44824 - // + // about Maglev, see https://ai.google/research/pubs/pub44824 // // This field is applicable to either: // - A regional backend service with the service_protocol set to HTTP, @@ -4440,7 +4484,7 @@ type BackendService struct { // // // Must be omitted when the loadBalancingScheme is INTERNAL (Internal - // TCP/UDP Load Blaancing). + // TCP/UDP Load Balancing). PortName string `json:"portName,omitempty"` // Protocol: The protocol this BackendService uses to communicate with @@ -4499,7 +4543,7 @@ type BackendService struct { SessionAffinity string `json:"sessionAffinity,omitempty"` // TimeoutSec: The backend service timeout has a different meaning - // depending on the type of load balancer. For more information read, + // depending on the type of load balancer. For more information see, // Backend service settings The default is 30 seconds. TimeoutSec int64 `json:"timeoutSec,omitempty"` @@ -4806,6 +4850,10 @@ func (s *BackendServiceFailoverPolicy) UnmarshalJSON(data []byte) error { } type BackendServiceGroupHealth struct { + // Annotations: Metadata defined as annotations on the network endpoint + // group. + Annotations map[string]string `json:"annotations,omitempty"` + // HealthStatus: Health state of the backend instances or endpoints in // requested instance or network endpoint group, determined based on // configured health checks. @@ -4819,7 +4867,7 @@ type BackendServiceGroupHealth struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "HealthStatus") to + // ForceSendFields is a list of field names (e.g. "Annotations") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -4827,7 +4875,7 @@ type BackendServiceGroupHealth struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthStatus") to include + // NullFields is a list of field names (e.g. "Annotations") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -4844,10 +4892,18 @@ func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) { // BackendServiceIAP: Identity-Aware Proxy type BackendServiceIAP struct { + // Enabled: Whether the serving infrastructure will authenticate and + // authorize all incoming requests. If true, the oauth2ClientId and + // oauth2ClientSecret fields must be non-empty. Enabled bool `json:"enabled,omitempty"` + // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. Oauth2ClientId string `json:"oauth2ClientId,omitempty"` + // Oauth2ClientSecret: OAuth2 client secret to use for the + // authentication flow. For security reasons, this value cannot be + // retrieved via the API. Instead, the SHA-256 hash of the value is + // returned in the oauth2ClientSecretSha256 field. Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` // Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the @@ -5247,10 +5303,20 @@ func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: The condition that is associated with this binding. NOTE: - // An unsatisfied condition will not allow user access via current - // binding. Different bindings, including their conditions, are examined - // independently. + // Condition: The condition that is associated with this binding. + // + // If the condition evaluates to `true`, then this binding applies to + // the current request. + // + // If the condition evaluates to `false`, then this binding does not + // apply to the current request. However, a different role binding might + // grant the same role to one or more of the members in this + // binding. + // + // To learn which resources support conditions in their IAM policies, + // see the [IAM + // documentation](https://cloud.google.com/iam/help/conditions/resource-p + // olicies). Condition *Expr `json:"condition,omitempty"` // Members: Specifies the identities requesting access for a Cloud @@ -6211,14 +6277,14 @@ type CorsPolicy struct { // AllowOriginRegexes: Specifies the regualar expression patterns that // match allowed origins. For regular expression grammar please see // en.cppreference.com/w/cpp/regex/ecmascript - // An origin is allowed if it matches either allow_origins or - // allow_origin_regex. + // An origin is allowed if it matches either an item in allowOrigins or + // an item in allowOriginRegexes. AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` // AllowOrigins: Specifies the list of origins that will be allowed to // do CORS requests. - // An origin is allowed if it matches either allow_origins or - // allow_origin_regex. + // An origin is allowed if it matches either an item in allowOrigins or + // an item in allowOriginRegexes. AllowOrigins []string `json:"allowOrigins,omitempty"` // Disabled: If true, specifies the CORS policy is disabled. The default @@ -6500,10 +6566,10 @@ type Disk struct { Options string `json:"options,omitempty"` // PhysicalBlockSizeBytes: Physical block size of the persistent disk, - // in bytes. If not present in a request, a default value is used. - // Currently supported sizes are 4096 and 16384, other sizes may be - // added in the future. If an unsupported value is requested, the error - // message will list the supported values for the caller's project. + // in bytes. If not present in a request, a default value is used. The + // currently supported size is 4096, other sizes may be added in the + // future. If an unsupported value is requested, the error message will + // list the supported values for the caller's project. PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"` // Region: [Output Only] URL of the region where the disk resides. Only @@ -6535,6 +6601,23 @@ type Disk struct { // inclusive. SizeGb int64 `json:"sizeGb,omitempty,string"` + // SourceDisk: The source disk used to create this disk. You can provide + // this as a partial or full URL to the resource. For example, the + // following are valid values: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + // - projects/project/zones/zone/disks/disk + // - zones/zone/disks/disk + SourceDisk string `json:"sourceDisk,omitempty"` + + // SourceDiskId: [Output Only] The unique ID of the disk used to create + // this disk. This value identifies the exact disk that was used to + // create this persistent disk. For example, if you created the + // persistent disk from a disk that was later deleted and recreated + // under the same name, the source disk ID would identify the exact + // version of the disk that was used. + SourceDiskId string `json:"sourceDiskId,omitempty"` + // SourceImage: The source image used to create this disk. If the source // image is deleted, this field will not be set. // @@ -6615,7 +6698,7 @@ type Disk struct { // Type: URL of the disk type resource describing which disk type to use // to create the disk. Provide this when creating the disk. For example: - // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd Type string `json:"type,omitempty"` // Users: [Output Only] Links to the users of the disk (attached @@ -8229,13 +8312,20 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ExternalVpnGateway: External VPN gateway is the on-premises VPN -// gateway(s) or another cloud provider's VPN gateway that connects to -// your Google Cloud VPN gateway. To create a highly available VPN from -// Google Cloud to your on-premises side or another Cloud provider's VPN -// gateway, you must create a external VPN gateway resource in GCP, -// which provides the information to GCP about your external VPN +// ExternalVpnGateway: Represents an external VPN gateway. +// +// External VPN gateway is the on-premises VPN gateway(s) or another +// cloud provider's VPN gateway that connects to your Google Cloud VPN // gateway. +// +// To create a highly available VPN from Google Cloud Platform to your +// VPN gateway or another cloud provider's VPN gateway, you must create +// a external VPN gateway resource with information about the other +// gateway. +// +// For more information about using external VPN gateways, see Creating +// an HA VPN gateway and tunnel pair to a peer VPN. (== resource_for +// {$api_version}.externalVpnGateways ==) type ExternalVpnGateway struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -8523,6 +8613,8 @@ type FileContentBuffer struct { // Content: The raw content in the secure keys file. Content string `json:"content,omitempty"` + // FileType: The file type of source file. + // // Possible values: // "BIN" // "UNDEFINED" @@ -8607,8 +8699,8 @@ type Firewall struct { Kind string `json:"kind,omitempty"` // LogConfig: This field denotes the logging options for a particular - // firewall rule. If logging is enabled, logs will be exported to - // Stackdriver. + // firewall rule. If logging is enabled, logs will be exported to Cloud + // Logging. LogConfig *FirewallLogConfig `json:"logConfig,omitempty"` // Name: Name of the resource; provided by the client when the resource @@ -10087,6 +10179,7 @@ type GuestOsFeature struct { // "FEATURE_TYPE_UNSPECIFIED" // "MULTI_IP_SUBNET" // "SECURE_BOOT" + // "SEV_CAPABLE" // "UEFI_COMPATIBLE" // "VIRTIO_SCSI_MULTIQUEUE" // "WINDOWS" @@ -10389,6 +10482,9 @@ type HealthCheck struct { // Kind: Type of the resource. Kind string `json:"kind,omitempty"` + // LogConfig: Configure logging on this health check. + LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -10615,6 +10711,36 @@ func (s *HealthCheckListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HealthCheckLogConfig: Configuration of logging on a health check. If +// logging is enabled, logs will be exported to Stackdriver. +type HealthCheckLogConfig struct { + // Enable: Indicates whether or not to export logs. This is false by + // default, which means no health check logging will be done. + Enable bool `json:"enable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthCheckLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HealthCheckReference: A full or valid partial URL to a health check. // For example, the following are valid URLs: // - @@ -10647,6 +10773,311 @@ func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HealthCheckService: Represents a Health-Check as a Service +// resource. +// +// (== resource_for {$api_version}.regionHealthCheckServices ==) +type HealthCheckService struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a HealthCheckService. An + // up-to-date fingerprint must be provided in order to patch/update the + // HealthCheckService; Otherwise, the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the HealthCheckService. + Fingerprint string `json:"fingerprint,omitempty"` + + // HealthChecks: List of URLs to the HealthCheck resources. Must have at + // least one HealthCheck, and not more than 10. HealthCheck resources + // must have portSpecification=USE_SERVING_PORT. For regional + // HealthCheckService, the HealthCheck must be regional and in the same + // region. For global HealthCheckService, HealthCheck must be global. + // Mix of regional and global HealthChecks is not supported. Multiple + // regional HealthChecks must belong to the same region. Regional + // HealthChecks`, or +// `<`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. +// +// You can also filter nested fields. For example, you could specify +// `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example: ``` (scheduling.automaticRestart = +// true) (cpuPlatform = "Intel Skylake") ``` By default, each expression +// is an `AND` expression. However, you can include `AND` and `OR` +// expressions explicitly. For example: ``` (cpuPlatform = "Intel +// Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` +func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using `orderBy="creationTimestamp desc". This sorts +// results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources +// like operations so that the newest operation is returned +// first. +// +// Currently, only sorting by `name` or `creationTimestamp desc` is +// supported. +func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthCheckServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthCheckServices") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthCheckServices.list" call. +// Exactly one of *HealthCheckServicesList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HealthCheckServicesList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HealthCheckServicesList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the HealthCheckService resources that have been configured for the specified project in the given region.", + // "httpMethod": "GET", + // "id": "compute.regionHealthCheckServices.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\u003e`, or `\u003c`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthCheckServices", + // "response": { + // "$ref": "HealthCheckServicesList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionHealthCheckServices.patch": + +type RegionHealthCheckServicesPatchCall struct { + s *Service + project string + region string + healthCheckService string + healthcheckservice *HealthCheckService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified regional HealthCheckService resource +// with the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. +func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { + c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthCheckService = healthCheckService + c.healthcheckservice = healthcheckservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthCheckServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheckservice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthCheckServices.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified regional HealthCheckService resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "PATCH", + // "id": "compute.regionHealthCheckServices.patch", + // "parameterOrder": [ + // "project", + // "region", + // "healthCheckService" + // ], + // "parameters": { + // "healthCheckService": { + // "description": "Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthCheckServices/{healthCheckService}", + // "request": { + // "$ref": "HealthCheckService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionHealthChecks.delete": type RegionHealthChecksDeleteCall struct { @@ -100722,7 +102879,7 @@ func (c *RegionHealthChecksDeleteCall) Header() http.Header { func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100891,7 +103048,7 @@ func (c *RegionHealthChecksGetCall) Header() http.Header { func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101067,7 +103224,7 @@ func (c *RegionHealthChecksInsertCall) Header() http.Header { func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101298,7 +103455,7 @@ func (c *RegionHealthChecksListCall) Header() http.Header { func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101512,7 +103669,7 @@ func (c *RegionHealthChecksPatchCall) Header() http.Header { func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101699,7 +103856,7 @@ func (c *RegionHealthChecksUpdateCall) Header() http.Header { func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101901,7 +104058,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102067,7 +104224,7 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.H func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102250,7 +104407,7 @@ func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102433,7 +104590,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102625,7 +104782,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102800,7 +104957,7 @@ func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102981,7 +105138,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103211,7 +105368,7 @@ func (c *RegionInstanceGroupManagersListCall) Header() http.Header { func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103367,7 +105524,8 @@ type RegionInstanceGroupManagersListErrorsCall struct { } // ListErrors: Lists all errors thrown by actions on instances for a -// given regional managed instance group. +// given regional managed instance group. The filter and orderBy query +// parameters are not supported. func (r *RegionInstanceGroupManagersService) ListErrors(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListErrorsCall { c := &RegionInstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103478,7 +105636,7 @@ func (c *RegionInstanceGroupManagersListErrorsCall) Header() http.Header { func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103544,7 +105702,7 @@ func (c *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists all errors thrown by actions on instances for a given regional managed instance group.", + // "description": "Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.listErrors", // "parameterOrder": [ @@ -103645,7 +105803,7 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. +// instances. The orderBy query parameter is not supported. func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103746,7 +105904,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Head func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103809,7 +105967,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -103970,7 +106128,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104168,7 +106326,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104363,7 +106521,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104550,7 +106708,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Heade func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104736,7 +106894,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104910,7 +107068,7 @@ func (c *RegionInstanceGroupsGetCall) Header() http.Header { func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105139,7 +107297,7 @@ func (c *RegionInstanceGroupsListCall) Header() http.Header { func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105297,7 +107455,8 @@ type RegionInstanceGroupsListInstancesCall struct { // ListInstances: Lists the instances in the specified instance group // and displays information about the named ports. Depending on the // specified options, this method can list all instances or only the -// instances that are running. +// instances that are running. The orderBy query parameter is not +// supported. func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105399,7 +107558,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105466,7 +107625,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. The orderBy query parameter is not supported.", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.listInstances", // "parameterOrder": [ @@ -105625,7 +107784,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105740,6 +107899,793 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) } +// method id "compute.regionNotificationEndpoints.delete": + +type RegionNotificationEndpointsDeleteCall struct { + s *Service + project string + region string + notificationEndpoint string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified NotificationEndpoint in the given +// region +func (r *RegionNotificationEndpointsService) Delete(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsDeleteCall { + c := &RegionNotificationEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.notificationEndpoint = notificationEndpoint + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionNotificationEndpointsDeleteCall) RequestId(requestId string) *RegionNotificationEndpointsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionNotificationEndpointsDeleteCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionNotificationEndpointsDeleteCall) Context(ctx context.Context) *RegionNotificationEndpointsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionNotificationEndpointsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionNotificationEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "notificationEndpoint": c.notificationEndpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionNotificationEndpoints.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionNotificationEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified NotificationEndpoint in the given region", + // "httpMethod": "DELETE", + // "id": "compute.regionNotificationEndpoints.delete", + // "parameterOrder": [ + // "project", + // "region", + // "notificationEndpoint" + // ], + // "parameters": { + // "notificationEndpoint": { + // "description": "Name of the NotificationEndpoint resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionNotificationEndpoints.get": + +type RegionNotificationEndpointsGetCall struct { + s *Service + project string + region string + notificationEndpoint string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified NotificationEndpoint resource in the given +// region. +func (r *RegionNotificationEndpointsService) Get(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsGetCall { + c := &RegionNotificationEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.notificationEndpoint = notificationEndpoint + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionNotificationEndpointsGetCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionNotificationEndpointsGetCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionNotificationEndpointsGetCall) Context(ctx context.Context) *RegionNotificationEndpointsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionNotificationEndpointsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionNotificationEndpointsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "notificationEndpoint": c.notificationEndpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionNotificationEndpoints.get" call. +// Exactly one of *NotificationEndpoint or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NotificationEndpoint.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionNotificationEndpointsGetCall) Do(opts ...googleapi.CallOption) (*NotificationEndpoint, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NotificationEndpoint{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified NotificationEndpoint resource in the given region.", + // "httpMethod": "GET", + // "id": "compute.regionNotificationEndpoints.get", + // "parameterOrder": [ + // "project", + // "region", + // "notificationEndpoint" + // ], + // "parameters": { + // "notificationEndpoint": { + // "description": "Name of the NotificationEndpoint resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", + // "response": { + // "$ref": "NotificationEndpoint" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionNotificationEndpoints.insert": + +type RegionNotificationEndpointsInsertCall struct { + s *Service + project string + region string + notificationendpoint *NotificationEndpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Create a NotificationEndpoint in the specified project in the +// given region using the parameters that are included in the request. +func (r *RegionNotificationEndpointsService) Insert(project string, region string, notificationendpoint *NotificationEndpoint) *RegionNotificationEndpointsInsertCall { + c := &RegionNotificationEndpointsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.notificationendpoint = notificationendpoint + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionNotificationEndpointsInsertCall) RequestId(requestId string) *RegionNotificationEndpointsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionNotificationEndpointsInsertCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionNotificationEndpointsInsertCall) Context(ctx context.Context) *RegionNotificationEndpointsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionNotificationEndpointsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionNotificationEndpointsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationendpoint) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/notificationEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionNotificationEndpoints.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionNotificationEndpointsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.", + // "httpMethod": "POST", + // "id": "compute.regionNotificationEndpoints.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/notificationEndpoints", + // "request": { + // "$ref": "NotificationEndpoint" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionNotificationEndpoints.list": + +type RegionNotificationEndpointsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the NotificationEndpoints for a project in the given +// region. +func (r *RegionNotificationEndpointsService) List(project string, region string) *RegionNotificationEndpointsListCall { + c := &RegionNotificationEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either `=`, `!=`, `>`, or +// `<`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. +// +// You can also filter nested fields. For example, you could specify +// `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example: ``` (scheduling.automaticRestart = +// true) (cpuPlatform = "Intel Skylake") ``` By default, each expression +// is an `AND` expression. However, you can include `AND` and `OR` +// expressions explicitly. For example: ``` (cpuPlatform = "Intel +// Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` +func (c *RegionNotificationEndpointsListCall) Filter(filter string) *RegionNotificationEndpointsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionNotificationEndpointsListCall) MaxResults(maxResults int64) *RegionNotificationEndpointsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using `orderBy="creationTimestamp desc". This sorts +// results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources +// like operations so that the newest operation is returned +// first. +// +// Currently, only sorting by `name` or `creationTimestamp desc` is +// supported. +func (c *RegionNotificationEndpointsListCall) OrderBy(orderBy string) *RegionNotificationEndpointsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionNotificationEndpointsListCall) PageToken(pageToken string) *RegionNotificationEndpointsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionNotificationEndpointsListCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionNotificationEndpointsListCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionNotificationEndpointsListCall) Context(ctx context.Context) *RegionNotificationEndpointsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionNotificationEndpointsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionNotificationEndpointsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/notificationEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionNotificationEndpoints.list" call. +// Exactly one of *NotificationEndpointList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *NotificationEndpointList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionNotificationEndpointsListCall) Do(opts ...googleapi.CallOption) (*NotificationEndpointList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NotificationEndpointList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the NotificationEndpoints for a project in the given region.", + // "httpMethod": "GET", + // "id": "compute.regionNotificationEndpoints.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\u003e`, or `\u003c`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/notificationEndpoints", + // "response": { + // "$ref": "NotificationEndpointList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionNotificationEndpointsListCall) Pages(ctx context.Context, f func(*NotificationEndpointList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.regionOperations.delete": type RegionOperationsDeleteCall struct { @@ -105789,7 +108735,7 @@ func (c *RegionOperationsDeleteCall) Header() http.Header { func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105925,7 +108871,7 @@ func (c *RegionOperationsGetCall) Header() http.Header { func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106157,7 +109103,7 @@ func (c *RegionOperationsListCall) Header() http.Header { func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106361,7 +109307,7 @@ func (c *RegionOperationsWaitCall) Header() http.Header { func (c *RegionOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106533,7 +109479,7 @@ func (c *RegionSslCertificatesDeleteCall) Header() http.Header { func (c *RegionSslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106703,7 +109649,7 @@ func (c *RegionSslCertificatesGetCall) Header() http.Header { func (c *RegionSslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106879,7 +109825,7 @@ func (c *RegionSslCertificatesInsertCall) Header() http.Header { func (c *RegionSslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107110,7 +110056,7 @@ func (c *RegionSslCertificatesListCall) Header() http.Header { func (c *RegionSslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107320,7 +110266,7 @@ func (c *RegionTargetHttpProxiesDeleteCall) Header() http.Header { func (c *RegionTargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107490,7 +110436,7 @@ func (c *RegionTargetHttpProxiesGetCall) Header() http.Header { func (c *RegionTargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107666,7 +110612,7 @@ func (c *RegionTargetHttpProxiesInsertCall) Header() http.Header { func (c *RegionTargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107897,7 +110843,7 @@ func (c *RegionTargetHttpProxiesListCall) Header() http.Header { func (c *RegionTargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108109,7 +111055,7 @@ func (c *RegionTargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *RegionTargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108293,7 +111239,7 @@ func (c *RegionTargetHttpsProxiesDeleteCall) Header() http.Header { func (c *RegionTargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108463,7 +111409,7 @@ func (c *RegionTargetHttpsProxiesGetCall) Header() http.Header { func (c *RegionTargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108639,7 +111585,7 @@ func (c *RegionTargetHttpsProxiesInsertCall) Header() http.Header { func (c *RegionTargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108870,7 +111816,7 @@ func (c *RegionTargetHttpsProxiesListCall) Header() http.Header { func (c *RegionTargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109082,7 +112028,7 @@ func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109268,7 +112214,7 @@ func (c *RegionTargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *RegionTargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109440,7 +112386,7 @@ func (c *RegionUrlMapsDeleteCall) Header() http.Header { func (c *RegionUrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109609,7 +112555,7 @@ func (c *RegionUrlMapsGetCall) Header() http.Header { func (c *RegionUrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109773,7 +112719,7 @@ func (c *RegionUrlMapsInsertCall) Header() http.Header { func (c *RegionUrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110004,7 +112950,7 @@ func (c *RegionUrlMapsListCall) Header() http.Header { func (c *RegionUrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110206,7 +113152,7 @@ func (c *RegionUrlMapsPatchCall) Header() http.Header { func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110381,7 +113327,7 @@ func (c *RegionUrlMapsUpdateCall) Header() http.Header { func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110550,7 +113496,7 @@ func (c *RegionUrlMapsValidateCall) Header() http.Header { func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110721,7 +113667,7 @@ func (c *RegionsGetCall) Header() http.Header { func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110942,7 +113888,7 @@ func (c *RegionsListCall) Header() http.Header { func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111209,7 +114155,7 @@ func (c *ReservationsAggregatedListCall) Header() http.Header { func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111415,7 +114361,7 @@ func (c *ReservationsDeleteCall) Header() http.Header { func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111583,7 +114529,7 @@ func (c *ReservationsGetCall) Header() http.Header { func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111751,7 +114697,7 @@ func (c *ReservationsGetIamPolicyCall) Header() http.Header { func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111927,7 +114873,7 @@ func (c *ReservationsInsertCall) Header() http.Header { func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112158,7 +115104,7 @@ func (c *ReservationsListCall) Header() http.Header { func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112372,7 +115318,7 @@ func (c *ReservationsResizeCall) Header() http.Header { func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112540,7 +115486,7 @@ func (c *ReservationsSetIamPolicyCall) Header() http.Header { func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112703,7 +115649,7 @@ func (c *ReservationsTestIamPermissionsCall) Header() http.Header { func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112949,7 +115895,7 @@ func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113155,7 +116101,7 @@ func (c *ResourcePoliciesDeleteCall) Header() http.Header { func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113323,7 +116269,7 @@ func (c *ResourcePoliciesGetCall) Header() http.Header { func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113491,7 +116437,7 @@ func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113666,7 +116612,7 @@ func (c *ResourcePoliciesInsertCall) Header() http.Header { func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113897,7 +116843,7 @@ func (c *ResourcePoliciesListCall) Header() http.Header { func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114091,7 +117037,7 @@ func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114254,7 +117200,7 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114500,7 +117446,7 @@ func (c *RoutersAggregatedListCall) Header() http.Header { func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114706,7 +117652,7 @@ func (c *RoutersDeleteCall) Header() http.Header { func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114875,7 +117821,7 @@ func (c *RoutersGetCall) Header() http.Header { func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115108,7 +118054,7 @@ func (c *RoutersGetNatMappingInfoCall) Header() http.Header { func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115320,7 +118266,7 @@ func (c *RoutersGetRouterStatusCall) Header() http.Header { func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115496,7 +118442,7 @@ func (c *RoutersInsertCall) Header() http.Header { func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115727,7 +118673,7 @@ func (c *RoutersListCall) Header() http.Header { func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115941,7 +118887,7 @@ func (c *RoutersPatchCall) Header() http.Header { func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116110,7 +119056,7 @@ func (c *RoutersPreviewCall) Header() http.Header { func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116296,7 +119242,7 @@ func (c *RoutersUpdateCall) Header() http.Header { func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116479,7 +119425,7 @@ func (c *RoutesDeleteCall) Header() http.Header { func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116638,7 +119584,7 @@ func (c *RoutesGetCall) Header() http.Header { func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116804,7 +119750,7 @@ func (c *RoutesInsertCall) Header() http.Header { func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117025,7 +119971,7 @@ func (c *RoutesListCall) Header() http.Header { func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117207,7 +120153,7 @@ func (c *SecurityPoliciesAddRuleCall) Header() http.Header { func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117375,7 +120321,7 @@ func (c *SecurityPoliciesDeleteCall) Header() http.Header { func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117533,7 +120479,7 @@ func (c *SecurityPoliciesGetCall) Header() http.Header { func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117696,7 +120642,7 @@ func (c *SecurityPoliciesGetRuleCall) Header() http.Header { func (c *SecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117867,7 +120813,7 @@ func (c *SecurityPoliciesInsertCall) Header() http.Header { func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118087,7 +121033,7 @@ func (c *SecurityPoliciesListCall) Header() http.Header { func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118342,7 +121288,7 @@ func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Head func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118525,7 +121471,7 @@ func (c *SecurityPoliciesPatchCall) Header() http.Header { func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118688,7 +121634,7 @@ func (c *SecurityPoliciesPatchRuleCall) Header() http.Header { func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118850,7 +121796,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Header() http.Header { func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119023,7 +121969,7 @@ func (c *SnapshotsDeleteCall) Header() http.Header { func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119182,7 +122128,7 @@ func (c *SnapshotsGetCall) Header() http.Header { func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119339,7 +122285,7 @@ func (c *SnapshotsGetIamPolicyCall) Header() http.Header { func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119560,7 +122506,7 @@ func (c *SnapshotsListCall) Header() http.Header { func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119743,7 +122689,7 @@ func (c *SnapshotsSetIamPolicyCall) Header() http.Header { func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119895,7 +122841,7 @@ func (c *SnapshotsSetLabelsCall) Header() http.Header { func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120047,7 +122993,7 @@ func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120285,7 +123231,7 @@ func (c *SslCertificatesAggregatedListCall) Header() http.Header { func (c *SslCertificatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120489,7 +123435,7 @@ func (c *SslCertificatesDeleteCall) Header() http.Header { func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120647,7 +123593,7 @@ func (c *SslCertificatesGetCall) Header() http.Header { func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120812,7 +123758,7 @@ func (c *SslCertificatesInsertCall) Header() http.Header { func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121032,7 +123978,7 @@ func (c *SslCertificatesListCall) Header() http.Header { func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121233,7 +124179,7 @@ func (c *SslPoliciesDeleteCall) Header() http.Header { func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121390,7 +124336,7 @@ func (c *SslPoliciesGetCall) Header() http.Header { func (c *SslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121554,7 +124500,7 @@ func (c *SslPoliciesInsertCall) Header() http.Header { func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121774,7 +124720,7 @@ func (c *SslPoliciesListCall) Header() http.Header { func (c *SslPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122029,7 +124975,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Header() http.Header { func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122212,7 +125158,7 @@ func (c *SslPoliciesPatchCall) Header() http.Header { func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122452,7 +125398,7 @@ func (c *SubnetworksAggregatedListCall) Header() http.Header { func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122658,7 +125604,7 @@ func (c *SubnetworksDeleteCall) Header() http.Header { func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122837,7 +125783,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123014,7 +125960,7 @@ func (c *SubnetworksGetCall) Header() http.Header { func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123182,7 +126128,7 @@ func (c *SubnetworksGetIamPolicyCall) Header() http.Header { func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123358,7 +126304,7 @@ func (c *SubnetworksInsertCall) Header() http.Header { func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123589,7 +126535,7 @@ func (c *SubnetworksListCall) Header() http.Header { func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123744,8 +126690,7 @@ type SubnetworksListUsableCall struct { } // ListUsable: Retrieves an aggregated list of all usable subnetworks in -// the project. The list contains all of the subnetworks in the project -// and the subnetworks that were shared by a Shared VPC host project. +// the project. func (r *SubnetworksService) ListUsable(project string) *SubnetworksListUsableCall { c := &SubnetworksListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123854,7 +126799,7 @@ func (c *SubnetworksListUsableCall) Header() http.Header { func (c *SubnetworksListUsableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123916,7 +126861,7 @@ func (c *SubnetworksListUsableCall) Do(opts ...googleapi.CallOption) (*UsableSub } return ret, nil // { - // "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project.", + // "description": "Retrieves an aggregated list of all usable subnetworks in the project.", // "httpMethod": "GET", // "id": "compute.subnetworks.listUsable", // "parameterOrder": [ @@ -124075,7 +127020,7 @@ func (c *SubnetworksPatchCall) Header() http.Header { func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124249,7 +127194,7 @@ func (c *SubnetworksSetIamPolicyCall) Header() http.Header { func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124432,7 +127377,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124600,7 +127545,7 @@ func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124847,7 +127792,7 @@ func (c *TargetHttpProxiesAggregatedListCall) Header() http.Header { func (c *TargetHttpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125052,7 +127997,7 @@ func (c *TargetHttpProxiesDeleteCall) Header() http.Header { func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125211,7 +128156,7 @@ func (c *TargetHttpProxiesGetCall) Header() http.Header { func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125377,7 +128322,7 @@ func (c *TargetHttpProxiesInsertCall) Header() http.Header { func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125598,7 +128543,7 @@ func (c *TargetHttpProxiesListCall) Header() http.Header { func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125800,7 +128745,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126042,7 +128987,7 @@ func (c *TargetHttpsProxiesAggregatedListCall) Header() http.Header { func (c *TargetHttpsProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126246,7 +129191,7 @@ func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126404,7 +129349,7 @@ func (c *TargetHttpsProxiesGetCall) Header() http.Header { func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126569,7 +129514,7 @@ func (c *TargetHttpsProxiesInsertCall) Header() http.Header { func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126789,7 +129734,7 @@ func (c *TargetHttpsProxiesListCall) Header() http.Header { func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126990,7 +129935,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127164,7 +130109,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127343,7 +130288,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127517,7 +130462,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127759,7 +130704,7 @@ func (c *TargetInstancesAggregatedListCall) Header() http.Header { func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127966,7 +130911,7 @@ func (c *TargetInstancesDeleteCall) Header() http.Header { func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128136,7 +131081,7 @@ func (c *TargetInstancesGetCall) Header() http.Header { func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128313,7 +131258,7 @@ func (c *TargetInstancesInsertCall) Header() http.Header { func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128545,7 +131490,7 @@ func (c *TargetInstancesListCall) Header() http.Header { func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128758,7 +131703,7 @@ func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128945,7 +131890,7 @@ func (c *TargetPoolsAddInstanceCall) Header() http.Header { func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129196,7 +132141,7 @@ func (c *TargetPoolsAggregatedListCall) Header() http.Header { func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129403,7 +132348,7 @@ func (c *TargetPoolsDeleteCall) Header() http.Header { func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129573,7 +132518,7 @@ func (c *TargetPoolsGetCall) Header() http.Header { func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129733,7 +132678,7 @@ func (c *TargetPoolsGetHealthCall) Header() http.Header { func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129915,7 +132860,7 @@ func (c *TargetPoolsInsertCall) Header() http.Header { func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130147,7 +133092,7 @@ func (c *TargetPoolsListCall) Header() http.Header { func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130360,7 +133305,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130547,7 +133492,7 @@ func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130741,7 +133686,7 @@ func (c *TargetPoolsSetBackupCall) Header() http.Header { func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130929,7 +133874,7 @@ func (c *TargetSslProxiesDeleteCall) Header() http.Header { func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131087,7 +134032,7 @@ func (c *TargetSslProxiesGetCall) Header() http.Header { func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131252,7 +134197,7 @@ func (c *TargetSslProxiesInsertCall) Header() http.Header { func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131472,7 +134417,7 @@ func (c *TargetSslProxiesListCall) Header() http.Header { func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131673,7 +134618,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131848,7 +134793,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132023,7 +134968,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132201,7 +135146,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132373,7 +135318,7 @@ func (c *TargetTcpProxiesDeleteCall) Header() http.Header { func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132531,7 +135476,7 @@ func (c *TargetTcpProxiesGetCall) Header() http.Header { func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132696,7 +135641,7 @@ func (c *TargetTcpProxiesInsertCall) Header() http.Header { func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132916,7 +135861,7 @@ func (c *TargetTcpProxiesListCall) Header() http.Header { func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133117,7 +136062,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133292,7 +136237,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133533,7 +136478,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133739,7 +136684,7 @@ func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133908,7 +136853,7 @@ func (c *TargetVpnGatewaysGetCall) Header() http.Header { func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134084,7 +137029,7 @@ func (c *TargetVpnGatewaysInsertCall) Header() http.Header { func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134315,7 +137260,7 @@ func (c *TargetVpnGatewaysListCall) Header() http.Header { func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134592,7 +137537,7 @@ func (c *UrlMapsAggregatedListCall) Header() http.Header { func (c *UrlMapsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134797,7 +137742,7 @@ func (c *UrlMapsDeleteCall) Header() http.Header { func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134956,7 +137901,7 @@ func (c *UrlMapsGetCall) Header() http.Header { func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135122,7 +138067,7 @@ func (c *UrlMapsInsertCall) Header() http.Header { func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135289,7 +138234,7 @@ func (c *UrlMapsInvalidateCacheCall) Header() http.Header { func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135519,7 +138464,7 @@ func (c *UrlMapsListCall) Header() http.Header { func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135723,7 +138668,7 @@ func (c *UrlMapsPatchCall) Header() http.Header { func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135900,7 +138845,7 @@ func (c *UrlMapsUpdateCall) Header() http.Header { func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136059,7 +139004,7 @@ func (c *UrlMapsValidateCall) Header() http.Header { func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136295,7 +139240,7 @@ func (c *VpnGatewaysAggregatedListCall) Header() http.Header { func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136501,7 +139446,7 @@ func (c *VpnGatewaysDeleteCall) Header() http.Header { func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136670,7 +139615,7 @@ func (c *VpnGatewaysGetCall) Header() http.Header { func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136837,7 +139782,7 @@ func (c *VpnGatewaysGetStatusCall) Header() http.Header { func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137013,7 +139958,7 @@ func (c *VpnGatewaysInsertCall) Header() http.Header { func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137244,7 +140189,7 @@ func (c *VpnGatewaysListCall) Header() http.Header { func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137457,7 +140402,7 @@ func (c *VpnGatewaysSetLabelsCall) Header() http.Header { func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137625,7 +140570,7 @@ func (c *VpnGatewaysTestIamPermissionsCall) Header() http.Header { func (c *VpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137871,7 +140816,7 @@ func (c *VpnTunnelsAggregatedListCall) Header() http.Header { func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138077,7 +141022,7 @@ func (c *VpnTunnelsDeleteCall) Header() http.Header { func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138246,7 +141191,7 @@ func (c *VpnTunnelsGetCall) Header() http.Header { func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138422,7 +141367,7 @@ func (c *VpnTunnelsInsertCall) Header() http.Header { func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138653,7 +141598,7 @@ func (c *VpnTunnelsListCall) Header() http.Header { func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138845,7 +141790,7 @@ func (c *ZoneOperationsDeleteCall) Header() http.Header { func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138981,7 +141926,7 @@ func (c *ZoneOperationsGetCall) Header() http.Header { func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139213,7 +142158,7 @@ func (c *ZoneOperationsListCall) Header() http.Header { func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139417,7 +142362,7 @@ func (c *ZoneOperationsWaitCall) Header() http.Header { func (c *ZoneOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139581,7 +142526,7 @@ func (c *ZonesGetCall) Header() http.Header { func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139802,7 +142747,7 @@ func (c *ZonesListCall) Header() http.Header { func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/iam/v1/iam-api.json b/vendor/google.golang.org/api/iam/v1/iam-api.json index f26a190fa..d9a220813 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-api.json +++ b/vendor/google.golang.org/api/iam/v1/iam-api.json @@ -108,7 +108,7 @@ "iamPolicies": { "methods": { "lintPolicy": { - "description": "Lints a Cloud IAM policy object or its sub fields. Currently supports\ngoogle.iam.v1.Binding.condition.\n\nEach lint operation consists of multiple lint validation units.\nEach unit inspects the input object in regard to a particular linting\naspect and issues a google.iam.admin.v1.LintResult disclosing the\nresult.\n\nThe set of applicable validation units is determined by the Cloud IAM\nserver and is not configurable.\n\nRegardless of any lint issues or their severities, successful calls to\n`lintPolicy` return an HTTP 200 OK status code.", + "description": "Lints, or validates, an IAM policy. Currently checks the\ngoogle.iam.v1.Binding.condition field, which contains a condition\nexpression for a role binding.\n\nSuccessful calls to this method always return an HTTP `200 OK` status code,\neven if the linter detects an issue in the IAM policy.", "flatPath": "v1/iamPolicies:lintPolicy", "httpMethod": "POST", "id": "iam.iamPolicies.lintPolicy", @@ -126,7 +126,7 @@ ] }, "queryAuditableServices": { - "description": "Returns a list of services that support service level audit logging\nconfiguration for the given resource.", + "description": "Returns a list of services that allow you to opt into audit logs that are\nnot generated by default.\n\nTo learn more about audit logs, see the [Logging\ndocumentation](https://cloud.google.com/logging/docs/audit).", "flatPath": "v1/iamPolicies:queryAuditableServices", "httpMethod": "POST", "id": "iam.iamPolicies.queryAuditableServices", @@ -150,7 +150,7 @@ "roles": { "methods": { "create": { - "description": "Creates a new Role.", + "description": "Creates a new custom Role.", "flatPath": "v1/organizations/{organizationsId}/roles", "httpMethod": "POST", "id": "iam.organizations.roles.create", @@ -178,7 +178,7 @@ ] }, "delete": { - "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed.", + "description": "Deletes a custom Role.\n\nWhen you delete a custom role, the following changes occur immediately:\n\n* You cannot bind a member to the custom role in an IAM\nPolicy.\n* Existing bindings to the custom role are not changed, but they have no\neffect.\n* By default, the response from ListRoles does not include the custom\nrole.\n\nYou have 7 days to undelete the custom role. After 7 days, the following\nchanges occur:\n\n* The custom role is permanently deleted and cannot be recovered.\n* If an IAM policy contains a binding to the custom role, the binding is\npermanently removed.", "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", "httpMethod": "DELETE", "id": "iam.organizations.roles.delete", @@ -209,7 +209,7 @@ ] }, "get": { - "description": "Gets a Role definition.", + "description": "Gets the definition of a Role.", "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", "httpMethod": "GET", "id": "iam.organizations.roles.get", @@ -234,7 +234,7 @@ ] }, "list": { - "description": "Lists the Roles defined on a resource.", + "description": "Lists every predefined Role that IAM supports, or every custom role\nthat is defined for an organization or project.", "flatPath": "v1/organizations/{organizationsId}/roles", "httpMethod": "GET", "id": "iam.organizations.roles.list", @@ -243,7 +243,7 @@ ], "parameters": { "pageSize": { - "description": "Optional limit on the number of roles to include in the response.", + "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", "format": "int32", "location": "query", "type": "integer" @@ -284,7 +284,7 @@ ] }, "patch": { - "description": "Updates a Role definition.", + "description": "Updates the definition of a custom Role.", "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", "httpMethod": "PATCH", "id": "iam.organizations.roles.patch", @@ -318,7 +318,7 @@ ] }, "undelete": { - "description": "Undelete a Role, bringing it back in its previous state.", + "description": "Undeletes a custom Role.", "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}:undelete", "httpMethod": "POST", "id": "iam.organizations.roles.undelete", @@ -352,7 +352,7 @@ "permissions": { "methods": { "queryTestablePermissions": { - "description": "Lists the permissions testable on a resource.\nA permission is testable if it can be tested for an identity on a resource.", + "description": "Lists every permission that you can test on a resource. A permission is\ntestable if you can check whether a member has that permission on the\nresource.", "flatPath": "v1/permissions:queryTestablePermissions", "httpMethod": "POST", "id": "iam.permissions.queryTestablePermissions", @@ -376,7 +376,7 @@ "roles": { "methods": { "create": { - "description": "Creates a new Role.", + "description": "Creates a new custom Role.", "flatPath": "v1/projects/{projectsId}/roles", "httpMethod": "POST", "id": "iam.projects.roles.create", @@ -404,7 +404,7 @@ ] }, "delete": { - "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed.", + "description": "Deletes a custom Role.\n\nWhen you delete a custom role, the following changes occur immediately:\n\n* You cannot bind a member to the custom role in an IAM\nPolicy.\n* Existing bindings to the custom role are not changed, but they have no\neffect.\n* By default, the response from ListRoles does not include the custom\nrole.\n\nYou have 7 days to undelete the custom role. After 7 days, the following\nchanges occur:\n\n* The custom role is permanently deleted and cannot be recovered.\n* If an IAM policy contains a binding to the custom role, the binding is\npermanently removed.", "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", "httpMethod": "DELETE", "id": "iam.projects.roles.delete", @@ -435,7 +435,7 @@ ] }, "get": { - "description": "Gets a Role definition.", + "description": "Gets the definition of a Role.", "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", "httpMethod": "GET", "id": "iam.projects.roles.get", @@ -460,7 +460,7 @@ ] }, "list": { - "description": "Lists the Roles defined on a resource.", + "description": "Lists every predefined Role that IAM supports, or every custom role\nthat is defined for an organization or project.", "flatPath": "v1/projects/{projectsId}/roles", "httpMethod": "GET", "id": "iam.projects.roles.list", @@ -469,7 +469,7 @@ ], "parameters": { "pageSize": { - "description": "Optional limit on the number of roles to include in the response.", + "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", "format": "int32", "location": "query", "type": "integer" @@ -510,7 +510,7 @@ ] }, "patch": { - "description": "Updates a Role definition.", + "description": "Updates the definition of a custom Role.", "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", "httpMethod": "PATCH", "id": "iam.projects.roles.patch", @@ -544,7 +544,7 @@ ] }, "undelete": { - "description": "Undelete a Role, bringing it back in its previous state.", + "description": "Undeletes a custom Role.", "flatPath": "v1/projects/{projectsId}/roles/{rolesId}:undelete", "httpMethod": "POST", "id": "iam.projects.roles.undelete", @@ -576,7 +576,7 @@ "serviceAccounts": { "methods": { "create": { - "description": "Creates a ServiceAccount\nand returns it.", + "description": "Creates a ServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.create", @@ -604,7 +604,7 @@ ] }, "delete": { - "description": "Deletes a ServiceAccount.", + "description": "Deletes a ServiceAccount.\n\n**Warning:** After you delete a service account, you might not be able to\nundelete it. If you know that you need to re-enable the service account in\nthe future, use DisableServiceAccount instead.\n\nIf you delete a service account, IAM permanently removes the service\naccount 30 days later. Google Cloud cannot recover the service account\nafter it is permanently removed, even if you file a support request.\n\nTo help avoid unplanned outages, we recommend that you disable the service\naccount before you delete it. Use DisableServiceAccount to disable the\nservice account, then wait at least 24 hours and watch for unintended\nconsequences. If there are no unintended consequences, you can delete the\nservice account.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", "httpMethod": "DELETE", "id": "iam.projects.serviceAccounts.delete", @@ -629,7 +629,7 @@ ] }, "disable": { - "description": "DisableServiceAccount is currently in the alpha launch stage.\n\nDisables a ServiceAccount,\nwhich immediately prevents the service account from authenticating and\ngaining access to APIs.\n\nDisabled service accounts can be safely restored by using\nEnableServiceAccount at any point. Deleted service accounts cannot be\nrestored using this method.\n\nDisabling a service account that is bound to VMs, Apps, Functions, or\nother jobs will cause those jobs to lose access to resources if they are\nusing the disabled service account.\n\nTo improve reliability of your services and avoid unexpected outages, it\nis recommended to first disable a service account rather than delete it.\nAfter disabling the service account, wait at least 24 hours to verify there\nare no unintended consequences, and then delete the service account.", + "description": "Disables a ServiceAccount immediately.\n\nIf an application uses the service account to authenticate, that\napplication can no longer call Google APIs or access Google Cloud\nresources. Existing access tokens for the service account are rejected, and\nrequests for new access tokens will fail.\n\nTo re-enable the service account, use EnableServiceAccount. After you\nre-enable the service account, its existing access tokens will be accepted,\nand you can request new access tokens.\n\nTo help avoid unplanned outages, we recommend that you disable the service\naccount before you delete it. Use this method to disable the service\naccount, then wait at least 24 hours and watch for unintended consequences.\nIf there are no unintended consequences, you can delete the service account\nwith DeleteServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:disable", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.disable", @@ -657,7 +657,7 @@ ] }, "enable": { - "description": "EnableServiceAccount is currently in the alpha launch stage.\n\n Restores a disabled ServiceAccount\n that has been manually disabled by using DisableServiceAccount. Service\n accounts that have been disabled by other means or for other reasons,\n such as abuse, cannot be restored using this method.\n\n EnableServiceAccount will have no effect on a service account that is\n not disabled. Enabling an already enabled service account will have no\n effect.", + "description": "Enables a ServiceAccount that was disabled by\nDisableServiceAccount.\n\nIf the service account is already enabled, then this method has no effect.\n\nIf the service account was disabled by other means—for example, if Google\ndisabled the service account because it was compromised—you cannot use this\nmethod to enable the service account.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:enable", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.enable", @@ -710,7 +710,7 @@ ] }, "getIamPolicy": { - "description": "Returns the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. It returns the Cloud IAM\npolicy that reflects what members have access to the service account.\n\nThis method does not return what resources the service account has access\nto. To see if a service account has access to a resource, call the\n`getIamPolicy` method on the target resource. For example, to view grants\nfor a project, call the\n[projects.getIamPolicy](/resource-manager/reference/rest/v1/projects/getIamPolicy)\nmethod.", + "description": "Gets the IAM policy that is attached to a ServiceAccount. This IAM\npolicy specifies which members have access to the service account.\n\nThis method does not tell you whether the service account has been granted\nany roles on other resources. To check whether a service account has role\ngrants on a resource, use the `getIamPolicy` method for that resource. For\nexample, to view the role grants for a project, call the Resource Manager\nAPI's\n[`projects.getIamPolicy`](https://cloud.google.com/resource-manager/reference/rest/v1/projects/getIamPolicy)\nmethod.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.getIamPolicy", @@ -719,7 +719,7 @@ ], "parameters": { "options.requestedPolicyVersion": { - "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.", + "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies).", "format": "int32", "location": "query", "type": "integer" @@ -741,7 +741,7 @@ ] }, "list": { - "description": "Lists ServiceAccounts for a project.", + "description": "Lists every ServiceAccount that belongs to a specific project.", "flatPath": "v1/projects/{projectsId}/serviceAccounts", "httpMethod": "GET", "id": "iam.projects.serviceAccounts.list", @@ -757,7 +757,7 @@ "type": "string" }, "pageSize": { - "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request.", + "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request.\n\nThe default is 20, and the maximum is 100.", "format": "int32", "location": "query", "type": "integer" @@ -777,7 +777,7 @@ ] }, "patch": { - "description": "Patches a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` and `description`.\n\nOnly fields specified in the request are guaranteed to be returned in\nthe response. Other fields in the response may be empty.\n\nNote: The field mask is required.", + "description": "Patches a ServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", "httpMethod": "PATCH", "id": "iam.projects.serviceAccounts.patch", @@ -786,7 +786,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + "description": "The resource name of the service account.\n\nUse one of the following formats:\n\n* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`\n\nAs an alternative, you can use the `-` wildcard character instead of the\nproject ID:\n\n* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/-/serviceAccounts/{UNIQUE_ID}`\n\nWhen possible, avoid using the `-` wildcard character, because it can cause\nresponse messages to contain misleading error codes. For example, if you\ntry to get the service account\n`projects/-/serviceAccounts/fake@example.com`, which does not exist, the\nresponse contains an HTTP `403 Forbidden` error instead of a `404 Not\nFound` error.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -805,7 +805,7 @@ ] }, "setIamPolicy": { - "description": "Sets the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. Use it to grant members\naccess to the service account, such as when they need to impersonate it.\n\nThis method does not grant the service account access to other resources,\nsuch as projects. To grant a service account access to resources, include\nthe service account in the Cloud IAM policy for the desired resource, then\ncall the appropriate `setIamPolicy` method on the target resource. For\nexample, to grant a service account access to a project, call the\n[projects.setIamPolicy](/resource-manager/reference/rest/v1/projects/setIamPolicy)\nmethod.", + "description": "Sets the IAM policy that is attached to a ServiceAccount.\n\nUse this method to grant or revoke access to the service account. For\nexample, you could grant a member the ability to impersonate the service\naccount.\n\nThis method does not enable the service account to access other resources.\nTo grant roles to a service account on a resource, follow these steps:\n\n1. Call the resource's `getIamPolicy` method to get its current IAM policy.\n2. Edit the policy so that it binds the service account to an IAM role for\nthe resource.\n3. Call the resource's `setIamPolicy` method to update its IAM policy.\n\nFor detailed instructions, see\n[Granting roles to a service account for specific\nresources](https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts).", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.setIamPolicy", @@ -833,7 +833,7 @@ ] }, "signBlob": { - "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signBlob()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a blob using a service account's system-managed private key.", + "description": "**Note:** We are in the process of deprecating this method. Use the\n[`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob)\nmethod in the IAM Service Account Credentials API instead.\n\nSigns a blob using the system-managed private key for a ServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.signBlob", @@ -861,7 +861,7 @@ ] }, "signJwt": { - "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signJwt()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signJwt)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", + "description": "**Note:** We are in the process of deprecating this method. Use the\n[`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt)\nmethod in the IAM Service Account Credentials API instead.\n\nSigns a JSON Web Token (JWT) using the system-managed private key for a\nServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.signJwt", @@ -889,7 +889,7 @@ ] }, "testIamPermissions": { - "description": "Tests the specified permissions against the IAM access control policy\nfor a ServiceAccount.", + "description": "Tests whether the caller has the specified permissions on a\nServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:testIamPermissions", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.testIamPermissions", @@ -917,7 +917,7 @@ ] }, "undelete": { - "description": "Restores a deleted ServiceAccount.\nThis is to be used as an action of last resort. A service account may\nnot always be restorable.", + "description": "Restores a deleted ServiceAccount.\n\n**Important:** It is not always possible to restore a deleted service\naccount. Use this method only as a last resort.\n\nAfter you delete a service account, IAM permanently removes the service\naccount 30 days later. There is no way to restore a deleted service account\nthat has been permanently removed.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:undelete", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.undelete", @@ -945,7 +945,7 @@ ] }, "update": { - "description": "Note: This method is in the process of being deprecated. Use\nPatchServiceAccount instead.\n\nUpdates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` and `description`.", + "description": "**Note:** We are in the process of deprecating this method. Use\nPatchServiceAccount instead.\n\nUpdates a ServiceAccount.\n\nYou can update only the `display_name` and `description` fields.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", "httpMethod": "PUT", "id": "iam.projects.serviceAccounts.update", @@ -954,7 +954,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + "description": "The resource name of the service account.\n\nUse one of the following formats:\n\n* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`\n\nAs an alternative, you can use the `-` wildcard character instead of the\nproject ID:\n\n* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/-/serviceAccounts/{UNIQUE_ID}`\n\nWhen possible, avoid using the `-` wildcard character, because it can cause\nresponse messages to contain misleading error codes. For example, if you\ntry to get the service account\n`projects/-/serviceAccounts/fake@example.com`, which does not exist, the\nresponse contains an HTTP `403 Forbidden` error instead of a `404 Not\nFound` error.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -977,7 +977,7 @@ "keys": { "methods": { "create": { - "description": "Creates a ServiceAccountKey\nand returns it.", + "description": "Creates a ServiceAccountKey.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.keys.create", @@ -1030,7 +1030,7 @@ ] }, "get": { - "description": "Gets the ServiceAccountKey\nby key id.", + "description": "Gets a ServiceAccountKey.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", "httpMethod": "GET", "id": "iam.projects.serviceAccounts.keys.get", @@ -1065,7 +1065,7 @@ ] }, "list": { - "description": "Lists ServiceAccountKeys.", + "description": "Lists every ServiceAccountKey for a service account.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", "httpMethod": "GET", "id": "iam.projects.serviceAccounts.keys.list", @@ -1101,7 +1101,7 @@ ] }, "upload": { - "description": "Upload public key for a given service account.\nThis rpc will create a\nServiceAccountKey that has the\nprovided public key and returns it.", + "description": "Creates a ServiceAccountKey, using a public key that you provide.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys:upload", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.keys.upload", @@ -1137,7 +1137,7 @@ "roles": { "methods": { "get": { - "description": "Gets a Role definition.", + "description": "Gets the definition of a Role.", "flatPath": "v1/roles/{rolesId}", "httpMethod": "GET", "id": "iam.roles.get", @@ -1162,14 +1162,14 @@ ] }, "list": { - "description": "Lists the Roles defined on a resource.", + "description": "Lists every predefined Role that IAM supports, or every custom role\nthat is defined for an organization or project.", "flatPath": "v1/roles", "httpMethod": "GET", "id": "iam.roles.list", "parameterOrder": [], "parameters": { "pageSize": { - "description": "Optional limit on the number of roles to include in the response.", + "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", "format": "int32", "location": "query", "type": "integer" @@ -1208,7 +1208,7 @@ ] }, "queryGrantableRoles": { - "description": "Queries roles that can be granted on a particular resource.\nA role is grantable if it can be used as the role in a binding for a policy\nfor that resource.", + "description": "Lists roles that can be granted on a Google Cloud resource. A role is\ngrantable if the IAM policy for the resource can contain bindings to the\nrole.", "flatPath": "v1/roles:queryGrantableRoles", "httpMethod": "POST", "id": "iam.roles.queryGrantableRoles", @@ -1228,7 +1228,7 @@ } } }, - "revision": "20200221", + "revision": "20200611", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { @@ -1243,7 +1243,7 @@ "type": "object" }, "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"sampleservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:aliya@example.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts jose@example.com from DATA_READ logging, and\naliya@example.com from DATA_WRITE logging.", + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n },\n {\n \"log_type\": \"ADMIN_READ\"\n }\n ]\n },\n {\n \"service\": \"sampleservice.googleapis.com\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\"\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:aliya@example.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts jose@example.com from DATA_READ logging, and\naliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", "properties": { "auditLogConfigs": { @@ -1272,7 +1272,7 @@ "type": "object" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\njose@example.com from DATA_READ logging.", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\njose@example.com from DATA_READ logging.", "id": "AuditLogConfig", "properties": { "exemptedMembers": { @@ -1318,7 +1318,7 @@ "properties": { "condition": { "$ref": "Expr", - "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\n\nIf the condition evaluates to `true`, then this binding applies to the\ncurrent request.\n\nIf the condition evaluates to `false`, then this binding does not apply to\nthe current request. However, a different role binding might grant the same\nrole to one or more of the members in this binding.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@example.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a user that has been recently deleted. For\n example, `alice@example.com?uid=123456789012345678901`. If the user is\n recovered, this value reverts to `user:{emailid}` and the recovered user\n retains the role in the binding.\n\n* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus\n unique identifier) representing a service account that has been recently\n deleted. For example,\n `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.\n If the service account is undeleted, this value reverts to\n `serviceAccount:{emailid}` and the undeleted service account retains the\n role in the binding.\n\n* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a Google group that has been recently\n deleted. For example, `admins@example.com?uid=123456789012345678901`. If\n the group is recovered, this value reverts to `group:{emailid}` and the\n recovered group retains the role in the binding.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", @@ -1376,7 +1376,7 @@ "description": "The Role resource to create." }, "roleId": { - "description": "The role ID to use for this role.", + "description": "The role ID to use for this role.\n\nA role ID may contain alphanumeric characters, underscores (`_`), and\nperiods (`.`). It must contain a minimum of 3 characters and a maximum of\n64 characters.", "type": "string" } }, @@ -1609,7 +1609,7 @@ "type": "object" }, "PatchServiceAccountRequest": { - "description": "The patch service account request.", + "description": "The request for\nPatchServiceAccount.\n\nYou can patch only the `display_name` and `description` fields. You must use\nthe `update_mask` field to specify which of these fields you want to patch.\n\nOnly the fields specified in the request are guaranteed to be returned in\nthe response. Other fields may be empty in the response.", "id": "PatchServiceAccountRequest", "properties": { "serviceAccount": { @@ -1704,7 +1704,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members` to a single `role`. Members can be user accounts, service accounts,\nGoogle groups, and domains (such as G Suite). A `role` is a named list of\npermissions; each `role` can be an IAM predefined role or a user-created\ncustom role.\n\nOptionally, a `binding` can specify a `condition`, which is a logical\nexpression that allows access to a resource only if the expression evaluates\nto `true`. A condition can add constraints based on attributes of the\nrequest, the resource, or both.\n\n**JSON example:**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\"user:eve@example.com\"],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n\n**YAML example:**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n - etag: BwWWja0YfJA=\n - version: 3\n\nFor a description of IAM and its features, see the\n[IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members` to a single `role`. Members can be user accounts, service accounts,\nGoogle groups, and domains (such as G Suite). A `role` is a named list of\npermissions; each `role` can be an IAM predefined role or a user-created\ncustom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a\n`condition`, which is a logical expression that allows access to a resource\nonly if the expression evaluates to `true`. A condition can add constraints\nbased on attributes of the request, the resource, or both. To learn which\nresources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\n \"user:eve@example.com\"\n ],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n\n**YAML example:**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n - etag: BwWWja0YfJA=\n - version: 3\n\nFor a description of IAM and its features, see the\n[IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -1727,7 +1727,7 @@ "type": "string" }, "version": { - "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.", + "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", "format": "int32", "type": "integer" } @@ -1782,7 +1782,7 @@ "type": "string" }, "pageSize": { - "description": "Optional limit on the number of roles to include in the response.", + "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", "format": "int32", "type": "integer" }, @@ -1831,7 +1831,7 @@ "type": "string" }, "pageSize": { - "description": "Optional limit on the number of permissions to include in the response.", + "description": "Optional limit on the number of permissions to include in the response.\n\nThe default is 100, and the maximum is 1,000.", "format": "int32", "type": "integer" }, @@ -1916,44 +1916,44 @@ "type": "object" }, "ServiceAccount": { - "description": "A service account in the Identity and Access Management API.\n\nTo create a service account, specify the `project_id` and the `account_id`\nfor the account. The `account_id` is unique within the project, and is used\nto generate the service account email address and a stable\n`unique_id`.\n\nIf the account already exists, the account's resource name is returned\nin the format of projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. The caller\ncan use the name in other methods to access the account.\n\nAll other methods can identify the service account using the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account. The `ACCOUNT` value can be the `email` address or the\n`unique_id` of the service account.", + "description": "An IAM service account.\n\nA service account is an account for an application or a virtual machine (VM)\ninstance, not a person. You can use a service account to call Google APIs. To\nlearn more, read the [overview of service\naccounts](https://cloud.google.com/iam/help/service-accounts/overview).\n\nWhen you create a service account, you specify the project ID that owns the\nservice account, as well as a name that must be unique within the project.\nIAM uses these values to create an email address that identifies the service\naccount.", "id": "ServiceAccount", "properties": { "description": { - "description": "Optional. A user-specified opaque description of the service account.\nMust be less than or equal to 256 UTF-8 bytes.", + "description": "Optional. A user-specified, human-readable description of the service account. The\nmaximum length is 256 UTF-8 bytes.", "type": "string" }, "disabled": { - "description": "@OutputOnly A bool indicate if the service account is disabled.\nThe field is currently in alpha phase.", + "description": "Output only. Whether the service account is disabled.", "type": "boolean" }, "displayName": { - "description": "Optional. A user-specified name for the service account.\nMust be less than or equal to 100 UTF-8 bytes.", + "description": "Optional. A user-specified, human-readable name for the service account. The maximum\nlength is 100 UTF-8 bytes.", "type": "string" }, "email": { - "description": "@OutputOnly The email address of the service account.", + "description": "Output only. The email address of the service account.", "type": "string" }, "etag": { - "description": "Optional. Note: `etag` is an inoperable legacy field that is only returned\nfor backwards compatibility.", + "description": "Deprecated. Do not use.", "format": "byte", "type": "string" }, "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + "description": "The resource name of the service account.\n\nUse one of the following formats:\n\n* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`\n\nAs an alternative, you can use the `-` wildcard character instead of the\nproject ID:\n\n* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/-/serviceAccounts/{UNIQUE_ID}`\n\nWhen possible, avoid using the `-` wildcard character, because it can cause\nresponse messages to contain misleading error codes. For example, if you\ntry to get the service account\n`projects/-/serviceAccounts/fake@example.com`, which does not exist, the\nresponse contains an HTTP `403 Forbidden` error instead of a `404 Not\nFound` error.", "type": "string" }, "oauth2ClientId": { - "description": "@OutputOnly The OAuth2 client id for the service account.\nThis is used in conjunction with the OAuth2 clientconfig API to make\nthree legged OAuth2 (3LO) flows to access the data of Google users.", + "description": "Output only. The OAuth 2.0 client ID for the service account.", "type": "string" }, "projectId": { - "description": "@OutputOnly The id of the project that owns the service account.", + "description": "Output only. The ID of the project that owns the service account.", "type": "string" }, "uniqueId": { - "description": "@OutputOnly The unique and stable id of the service account.", + "description": "Output only. The unique, stable numeric ID for the service account.\n\nEach service account retains its unique ID even if you delete the service\naccount. For example, if you delete a service account, then create a new\nservice account with the same name, the new service account has a different\nunique ID than the deleted service account.", "type": "string" } }, @@ -2055,7 +2055,7 @@ "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." }, "updateMask": { - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\n\n`paths: \"bindings, etag\"`", "format": "google-fieldmask", "type": "string" } @@ -2095,7 +2095,7 @@ "id": "SignJwtRequest", "properties": { "payload": { - "description": "Required. The JWT payload to sign, a JSON JWT Claim set.", + "description": "Required. The JWT payload to sign. Must be a serialized JSON object that contains a\nJWT Claims Set. For example: `{\"sub\": \"user@example.com\", \"iat\": 313435}`\n\nIf the JWT Claims Set contains an expiration time (`exp`) claim, it must be\nan integer timestamp that is not in the past and no more than 1 hour in the\nfuture.\n\nIf the JWT Claims Set does not contain an expiration time (`exp`) claim,\nthis claim is added automatically, with a timestamp that is 1 hour in the\nfuture.", "type": "string" } }, diff --git a/vendor/google.golang.org/api/iam/v1/iam-gen.go b/vendor/google.golang.org/api/iam/v1/iam-gen.go index e62e07553..a6b456a16 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-gen.go +++ b/vendor/google.golang.org/api/iam/v1/iam-gen.go @@ -75,6 +75,7 @@ const apiId = "iam:v1" const apiName = "iam" const apiVersion = "v1" const basePath = "https://iam.googleapis.com/" +const mtlsBasePath = "https://iam.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( @@ -90,6 +91,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) client, endpoint, err := htransport.NewClient(ctx, opts...) if err != nil { return nil, err @@ -291,7 +293,7 @@ func (s *AdminAuditData) MarshalJSON() ([]byte, error) { // { // "audit_configs": [ // { -// "service": "allServices" +// "service": "allServices", // "audit_log_configs": [ // { // "log_type": "DATA_READ", @@ -300,18 +302,18 @@ func (s *AdminAuditData) MarshalJSON() ([]byte, error) { // ] // }, // { -// "log_type": "DATA_WRITE", +// "log_type": "DATA_WRITE" // }, // { -// "log_type": "ADMIN_READ", +// "log_type": "ADMIN_READ" // } // ] // }, // { -// "service": "sampleservice.googleapis.com" +// "service": "sampleservice.googleapis.com", // "audit_log_configs": [ // { -// "log_type": "DATA_READ", +// "log_type": "DATA_READ" // }, // { // "log_type": "DATA_WRITE", @@ -410,7 +412,7 @@ func (s *AuditData) MarshalJSON() ([]byte, error) { // ] // }, // { -// "log_type": "DATA_WRITE", +// "log_type": "DATA_WRITE" // } // ] // } @@ -490,11 +492,23 @@ func (s *AuditableService) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. - // NOTE: An unsatisfied condition will not allow user access via - // current - // binding. Different bindings, including their conditions, are - // examined - // independently. + // + // If the condition evaluates to `true`, then this binding applies to + // the + // current request. + // + // If the condition evaluates to `false`, then this binding does not + // apply to + // the current request. However, a different role binding might grant + // the same + // role to one or more of the members in this binding. + // + // To learn which resources support conditions in their IAM policies, + // see + // the + // [IAM + // documentation](https://cloud.google.com/iam/help/conditions/r + // esource-policies). Condition *Expr `json:"condition,omitempty"` // Members: Specifies the identities requesting access for a Cloud @@ -648,6 +662,12 @@ type CreateRoleRequest struct { Role *Role `json:"role,omitempty"` // RoleId: The role ID to use for this role. + // + // A role ID may contain alphanumeric characters, underscores (`_`), + // and + // periods (`.`). It must contain a minimum of 3 characters and a + // maximum of + // 64 characters. RoleId string `json:"roleId,omitempty"` // ForceSendFields is a list of field names (e.g. "Role") to @@ -1165,7 +1185,17 @@ func (s *ListServiceAccountsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PatchServiceAccountRequest: The patch service account request. +// PatchServiceAccountRequest: The request for +// PatchServiceAccount. +// +// You can patch only the `display_name` and `description` fields. You +// must use +// the `update_mask` field to specify which of these fields you want to +// patch. +// +// Only the fields specified in the request are guaranteed to be +// returned in +// the response. Other fields may be empty in the response. type PatchServiceAccountRequest struct { ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` @@ -1309,13 +1339,18 @@ func (s *PermissionDelta) MarshalJSON() ([]byte, error) { // user-created // custom role. // -// Optionally, a `binding` can specify a `condition`, which is a -// logical -// expression that allows access to a resource only if the expression -// evaluates -// to `true`. A condition can add constraints based on attributes of -// the -// request, the resource, or both. +// For some types of Google Cloud resources, a `binding` can also +// specify a +// `condition`, which is a logical expression that allows access to a +// resource +// only if the expression evaluates to `true`. A condition can add +// constraints +// based on attributes of the request, the resource, or both. To learn +// which +// resources support conditions in their IAM policies, see the +// [IAM +// documentation](https://cloud.google.com/iam/help/conditions/resource-p +// olicies). // // **JSON example:** // @@ -1333,7 +1368,9 @@ func (s *PermissionDelta) MarshalJSON() ([]byte, error) { // }, // { // "role": "roles/resourcemanager.organizationViewer", -// "members": ["user:eve@example.com"], +// "members": [ +// "user:eve@example.com" +// ], // "condition": { // "title": "expirable access", // "description": "Does not grant access after Sep 2020", @@ -1432,6 +1469,12 @@ type Policy struct { // If a policy does not include any conditions, operations on that // policy may // specify any valid version or leave the field unset. + // + // To learn which resources support conditions in their IAM policies, + // see the + // [IAM + // documentation](https://cloud.google.com/iam/help/conditions/resource-p + // olicies). Version int64 `json:"version,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1572,6 +1615,8 @@ type QueryGrantableRolesRequest struct { // PageSize: Optional limit on the number of roles to include in the // response. + // + // The default is 300, and the maximum is 1,000. PageSize int64 `json:"pageSize,omitempty"` // PageToken: Optional pagination token returned in an @@ -1661,6 +1706,8 @@ type QueryTestablePermissionsRequest struct { // PageSize: Optional limit on the number of permissions to include in // the response. + // + // The default is 100, and the maximum is 1,000. PageSize int64 `json:"pageSize,omitempty"` // PageToken: Optional pagination token returned in an @@ -1815,83 +1862,89 @@ func (s *Role) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAccount: A service account in the Identity and Access -// Management API. +// ServiceAccount: An IAM service account. // -// To create a service account, specify the `project_id` and the -// `account_id` -// for the account. The `account_id` is unique within the project, and -// is used -// to generate the service account email address and a -// stable -// `unique_id`. +// A service account is an account for an application or a virtual +// machine (VM) +// instance, not a person. You can use a service account to call Google +// APIs. To +// learn more, read the [overview of +// service +// accounts](https://cloud.google.com/iam/help/service-accounts/o +// verview). // -// If the account already exists, the account's resource name is -// returned -// in the format of projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. The -// caller -// can use the name in other methods to access the account. -// -// All other methods can identify the service account using the -// format -// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. -// Using `-` as a wildcard for the `PROJECT_ID` will infer the project -// from -// the account. The `ACCOUNT` value can be the `email` address or -// the -// `unique_id` of the service account. +// When you create a service account, you specify the project ID that +// owns the +// service account, as well as a name that must be unique within the +// project. +// IAM uses these values to create an email address that identifies the +// service +// account. type ServiceAccount struct { - // Description: Optional. A user-specified opaque description of the - // service account. - // Must be less than or equal to 256 UTF-8 bytes. + // Description: Optional. A user-specified, human-readable description + // of the service account. The + // maximum length is 256 UTF-8 bytes. Description string `json:"description,omitempty"` - // Disabled: @OutputOnly A bool indicate if the service account is - // disabled. - // The field is currently in alpha phase. + // Disabled: Output only. Whether the service account is disabled. Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A user-specified name for the service - // account. - // Must be less than or equal to 100 UTF-8 bytes. + // DisplayName: Optional. A user-specified, human-readable name for the + // service account. The maximum + // length is 100 UTF-8 bytes. DisplayName string `json:"displayName,omitempty"` - // Email: @OutputOnly The email address of the service account. + // Email: Output only. The email address of the service account. Email string `json:"email,omitempty"` - // Etag: Optional. Note: `etag` is an inoperable legacy field that is - // only returned - // for backwards compatibility. + // Etag: Deprecated. Do not use. Etag string `json:"etag,omitempty"` - // Name: The resource name of the service account in the following - // format: - // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // Name: The resource name of the service account. // - // Requests using `-` as a wildcard for the `PROJECT_ID` will infer + // Use one of the following formats: + // + // * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` + // * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` + // + // As an alternative, you can use the `-` wildcard character instead of // the - // project from the `account` and the `ACCOUNT` value can be the - // `email` - // address or the `unique_id` of the service account. + // project ID: // - // In responses the resource name will always be in the - // format - // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` + // * `projects/-/serviceAccounts/{UNIQUE_ID}` + // + // When possible, avoid using the `-` wildcard character, because it can + // cause + // response messages to contain misleading error codes. For example, if + // you + // try to get the service + // account + // `projects/-/serviceAccounts/fake@example.com`, which does not exist, + // the + // response contains an HTTP `403 Forbidden` error instead of a `404 + // Not + // Found` error. Name string `json:"name,omitempty"` - // Oauth2ClientId: @OutputOnly The OAuth2 client id for the service + // Oauth2ClientId: Output only. The OAuth 2.0 client ID for the service // account. - // This is used in conjunction with the OAuth2 clientconfig API to - // make - // three legged OAuth2 (3LO) flows to access the data of Google users. Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - // ProjectId: @OutputOnly The id of the project that owns the service + // ProjectId: Output only. The ID of the project that owns the service // account. ProjectId string `json:"projectId,omitempty"` - // UniqueId: @OutputOnly The unique and stable id of the service + // UniqueId: Output only. The unique, stable numeric ID for the service // account. + // + // Each service account retains its unique ID even if you delete the + // service + // account. For example, if you delete a service account, then create a + // new + // service account with the same name, the new service account has a + // different + // unique ID than the deleted service account. UniqueId string `json:"uniqueId,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2072,8 +2125,8 @@ type SetIamPolicyRequest struct { // the fields in the mask will be modified. If no mask is provided, // the // following default mask is used: - // paths: "bindings, etag" - // This field is only used by Cloud IAM. + // + // `paths: "bindings, etag" UpdateMask string `json:"updateMask,omitempty"` // ForceSendFields is a list of field names (e.g. "Policy") to @@ -2164,7 +2217,22 @@ func (s *SignBlobResponse) MarshalJSON() ([]byte, error) { // SignJwtRequest: The service account sign JWT request. type SignJwtRequest struct { - // Payload: Required. The JWT payload to sign, a JSON JWT Claim set. + // Payload: Required. The JWT payload to sign. Must be a serialized JSON + // object that contains a + // JWT Claims Set. For example: `{"sub": "user@example.com", "iat": + // 313435}` + // + // If the JWT Claims Set contains an expiration time (`exp`) claim, it + // must be + // an integer timestamp that is not in the past and no more than 1 hour + // in the + // future. + // + // If the JWT Claims Set does not contain an expiration time (`exp`) + // claim, + // this claim is added automatically, with a timestamp that is 1 hour in + // the + // future. Payload string `json:"payload,omitempty"` // ForceSendFields is a list of field names (e.g. "Payload") to @@ -2403,24 +2471,15 @@ type IamPoliciesLintPolicyCall struct { header_ http.Header } -// LintPolicy: Lints a Cloud IAM policy object or its sub fields. -// Currently supports -// google.iam.v1.Binding.condition. -// -// Each lint operation consists of multiple lint validation units. -// Each unit inspects the input object in regard to a particular -// linting -// aspect and issues a google.iam.admin.v1.LintResult disclosing +// LintPolicy: Lints, or validates, an IAM policy. Currently checks // the -// result. +// google.iam.v1.Binding.condition field, which contains a +// condition +// expression for a role binding. // -// The set of applicable validation units is determined by the Cloud -// IAM -// server and is not configurable. -// -// Regardless of any lint issues or their severities, successful calls -// to -// `lintPolicy` return an HTTP 200 OK status code. +// Successful calls to this method always return an HTTP `200 OK` status +// code, +// even if the linter detects an issue in the IAM policy. func (r *IamPoliciesService) LintPolicy(lintpolicyrequest *LintPolicyRequest) *IamPoliciesLintPolicyCall { c := &IamPoliciesLintPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.lintpolicyrequest = lintpolicyrequest @@ -2454,7 +2513,7 @@ func (c *IamPoliciesLintPolicyCall) Header() http.Header { func (c *IamPoliciesLintPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2515,7 +2574,7 @@ func (c *IamPoliciesLintPolicyCall) Do(opts ...googleapi.CallOption) (*LintPolic } return ret, nil // { - // "description": "Lints a Cloud IAM policy object or its sub fields. Currently supports\ngoogle.iam.v1.Binding.condition.\n\nEach lint operation consists of multiple lint validation units.\nEach unit inspects the input object in regard to a particular linting\naspect and issues a google.iam.admin.v1.LintResult disclosing the\nresult.\n\nThe set of applicable validation units is determined by the Cloud IAM\nserver and is not configurable.\n\nRegardless of any lint issues or their severities, successful calls to\n`lintPolicy` return an HTTP 200 OK status code.", + // "description": "Lints, or validates, an IAM policy. Currently checks the\ngoogle.iam.v1.Binding.condition field, which contains a condition\nexpression for a role binding.\n\nSuccessful calls to this method always return an HTTP `200 OK` status code,\neven if the linter detects an issue in the IAM policy.", // "flatPath": "v1/iamPolicies:lintPolicy", // "httpMethod": "POST", // "id": "iam.iamPolicies.lintPolicy", @@ -2545,9 +2604,13 @@ type IamPoliciesQueryAuditableServicesCall struct { header_ http.Header } -// QueryAuditableServices: Returns a list of services that support -// service level audit logging -// configuration for the given resource. +// QueryAuditableServices: Returns a list of services that allow you to +// opt into audit logs that are +// not generated by default. +// +// To learn more about audit logs, see the +// [Logging +// documentation](https://cloud.google.com/logging/docs/audit). func (r *IamPoliciesService) QueryAuditableServices(queryauditableservicesrequest *QueryAuditableServicesRequest) *IamPoliciesQueryAuditableServicesCall { c := &IamPoliciesQueryAuditableServicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.queryauditableservicesrequest = queryauditableservicesrequest @@ -2581,7 +2644,7 @@ func (c *IamPoliciesQueryAuditableServicesCall) Header() http.Header { func (c *IamPoliciesQueryAuditableServicesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2642,7 +2705,7 @@ func (c *IamPoliciesQueryAuditableServicesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns a list of services that support service level audit logging\nconfiguration for the given resource.", + // "description": "Returns a list of services that allow you to opt into audit logs that are\nnot generated by default.\n\nTo learn more about audit logs, see the [Logging\ndocumentation](https://cloud.google.com/logging/docs/audit).", // "flatPath": "v1/iamPolicies:queryAuditableServices", // "httpMethod": "POST", // "id": "iam.iamPolicies.queryAuditableServices", @@ -2673,7 +2736,7 @@ type OrganizationsRolesCreateCall struct { header_ http.Header } -// Create: Creates a new Role. +// Create: Creates a new custom Role. func (r *OrganizationsRolesService) Create(parent string, createrolerequest *CreateRoleRequest) *OrganizationsRolesCreateCall { c := &OrganizationsRolesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2708,7 +2771,7 @@ func (c *OrganizationsRolesCreateCall) Header() http.Header { func (c *OrganizationsRolesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2772,7 +2835,7 @@ func (c *OrganizationsRolesCreateCall) Do(opts ...googleapi.CallOption) (*Role, } return ret, nil // { - // "description": "Creates a new Role.", + // "description": "Creates a new custom Role.", // "flatPath": "v1/organizations/{organizationsId}/roles", // "httpMethod": "POST", // "id": "iam.organizations.roles.create", @@ -2812,18 +2875,28 @@ type OrganizationsRolesDeleteCall struct { header_ http.Header } -// Delete: Soft deletes a role. The role is suspended and cannot be used -// to create new -// IAM Policy Bindings. -// The Role will not be included in `ListRoles()` unless `show_deleted` -// is set -// in the `ListRolesRequest`. The Role contains the deleted boolean -// set. -// Existing Bindings remains, but are inactive. The Role can be -// undeleted -// within 7 days. After 7 days the Role is deleted and all Bindings -// associated -// with the role are removed. +// Delete: Deletes a custom Role. +// +// When you delete a custom role, the following changes occur +// immediately: +// +// * You cannot bind a member to the custom role in an IAM +// Policy. +// * Existing bindings to the custom role are not changed, but they have +// no +// effect. +// * By default, the response from ListRoles does not include the +// custom +// role. +// +// You have 7 days to undelete the custom role. After 7 days, the +// following +// changes occur: +// +// * The custom role is permanently deleted and cannot be recovered. +// * If an IAM policy contains a binding to the custom role, the binding +// is +// permanently removed. func (r *OrganizationsRolesService) Delete(name string) *OrganizationsRolesDeleteCall { c := &OrganizationsRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2864,7 +2937,7 @@ func (c *OrganizationsRolesDeleteCall) Header() http.Header { func (c *OrganizationsRolesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2923,7 +2996,7 @@ func (c *OrganizationsRolesDeleteCall) Do(opts ...googleapi.CallOption) (*Role, } return ret, nil // { - // "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed.", + // "description": "Deletes a custom Role.\n\nWhen you delete a custom role, the following changes occur immediately:\n\n* You cannot bind a member to the custom role in an IAM\nPolicy.\n* Existing bindings to the custom role are not changed, but they have no\neffect.\n* By default, the response from ListRoles does not include the custom\nrole.\n\nYou have 7 days to undelete the custom role. After 7 days, the following\nchanges occur:\n\n* The custom role is permanently deleted and cannot be recovered.\n* If an IAM policy contains a binding to the custom role, the binding is\npermanently removed.", // "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", // "httpMethod": "DELETE", // "id": "iam.organizations.roles.delete", @@ -2967,7 +3040,7 @@ type OrganizationsRolesGetCall struct { header_ http.Header } -// Get: Gets a Role definition. +// Get: Gets the definition of a Role. func (r *OrganizationsRolesService) Get(name string) *OrganizationsRolesGetCall { c := &OrganizationsRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3011,7 +3084,7 @@ func (c *OrganizationsRolesGetCall) Header() http.Header { func (c *OrganizationsRolesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3073,7 +3146,7 @@ func (c *OrganizationsRolesGetCall) Do(opts ...googleapi.CallOption) (*Role, err } return ret, nil // { - // "description": "Gets a Role definition.", + // "description": "Gets the definition of a Role.", // "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", // "httpMethod": "GET", // "id": "iam.organizations.roles.get", @@ -3111,7 +3184,9 @@ type OrganizationsRolesListCall struct { header_ http.Header } -// List: Lists the Roles defined on a resource. +// List: Lists every predefined Role that IAM supports, or every custom +// role +// that is defined for an organization or project. func (r *OrganizationsRolesService) List(parent string) *OrganizationsRolesListCall { c := &OrganizationsRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3120,6 +3195,8 @@ func (r *OrganizationsRolesService) List(parent string) *OrganizationsRolesListC // PageSize sets the optional parameter "pageSize": Optional limit on // the number of roles to include in the response. +// +// The default is 300, and the maximum is 1,000. func (c *OrganizationsRolesListCall) PageSize(pageSize int64) *OrganizationsRolesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3192,7 +3269,7 @@ func (c *OrganizationsRolesListCall) Header() http.Header { func (c *OrganizationsRolesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3254,7 +3331,7 @@ func (c *OrganizationsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRole } return ret, nil // { - // "description": "Lists the Roles defined on a resource.", + // "description": "Lists every predefined Role that IAM supports, or every custom role\nthat is defined for an organization or project.", // "flatPath": "v1/organizations/{organizationsId}/roles", // "httpMethod": "GET", // "id": "iam.organizations.roles.list", @@ -3263,7 +3340,7 @@ func (c *OrganizationsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRole // ], // "parameters": { // "pageSize": { - // "description": "Optional limit on the number of roles to include in the response.", + // "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", // "format": "int32", // "location": "query", // "type": "integer" @@ -3338,7 +3415,7 @@ type OrganizationsRolesPatchCall struct { header_ http.Header } -// Patch: Updates a Role definition. +// Patch: Updates the definition of a custom Role. func (r *OrganizationsRolesService) Patch(name string, role *Role) *OrganizationsRolesPatchCall { c := &OrganizationsRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3380,7 +3457,7 @@ func (c *OrganizationsRolesPatchCall) Header() http.Header { func (c *OrganizationsRolesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3444,7 +3521,7 @@ func (c *OrganizationsRolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, e } return ret, nil // { - // "description": "Updates a Role definition.", + // "description": "Updates the definition of a custom Role.", // "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", // "httpMethod": "PATCH", // "id": "iam.organizations.roles.patch", @@ -3491,7 +3568,7 @@ type OrganizationsRolesUndeleteCall struct { header_ http.Header } -// Undelete: Undelete a Role, bringing it back in its previous state. +// Undelete: Undeletes a custom Role. func (r *OrganizationsRolesService) Undelete(name string, undeleterolerequest *UndeleteRoleRequest) *OrganizationsRolesUndeleteCall { c := &OrganizationsRolesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3526,7 +3603,7 @@ func (c *OrganizationsRolesUndeleteCall) Header() http.Header { func (c *OrganizationsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3590,7 +3667,7 @@ func (c *OrganizationsRolesUndeleteCall) Do(opts ...googleapi.CallOption) (*Role } return ret, nil // { - // "description": "Undelete a Role, bringing it back in its previous state.", + // "description": "Undeletes a custom Role.", // "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}:undelete", // "httpMethod": "POST", // "id": "iam.organizations.roles.undelete", @@ -3630,9 +3707,10 @@ type PermissionsQueryTestablePermissionsCall struct { header_ http.Header } -// QueryTestablePermissions: Lists the permissions testable on a -// resource. -// A permission is testable if it can be tested for an identity on a +// QueryTestablePermissions: Lists every permission that you can test on +// a resource. A permission is +// testable if you can check whether a member has that permission on +// the // resource. func (r *PermissionsService) QueryTestablePermissions(querytestablepermissionsrequest *QueryTestablePermissionsRequest) *PermissionsQueryTestablePermissionsCall { c := &PermissionsQueryTestablePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3667,7 +3745,7 @@ func (c *PermissionsQueryTestablePermissionsCall) Header() http.Header { func (c *PermissionsQueryTestablePermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3728,7 +3806,7 @@ func (c *PermissionsQueryTestablePermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Lists the permissions testable on a resource.\nA permission is testable if it can be tested for an identity on a resource.", + // "description": "Lists every permission that you can test on a resource. A permission is\ntestable if you can check whether a member has that permission on the\nresource.", // "flatPath": "v1/permissions:queryTestablePermissions", // "httpMethod": "POST", // "id": "iam.permissions.queryTestablePermissions", @@ -3780,7 +3858,7 @@ type ProjectsRolesCreateCall struct { header_ http.Header } -// Create: Creates a new Role. +// Create: Creates a new custom Role. func (r *ProjectsRolesService) Create(parent string, createrolerequest *CreateRoleRequest) *ProjectsRolesCreateCall { c := &ProjectsRolesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3815,7 +3893,7 @@ func (c *ProjectsRolesCreateCall) Header() http.Header { func (c *ProjectsRolesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3879,7 +3957,7 @@ func (c *ProjectsRolesCreateCall) Do(opts ...googleapi.CallOption) (*Role, error } return ret, nil // { - // "description": "Creates a new Role.", + // "description": "Creates a new custom Role.", // "flatPath": "v1/projects/{projectsId}/roles", // "httpMethod": "POST", // "id": "iam.projects.roles.create", @@ -3919,18 +3997,28 @@ type ProjectsRolesDeleteCall struct { header_ http.Header } -// Delete: Soft deletes a role. The role is suspended and cannot be used -// to create new -// IAM Policy Bindings. -// The Role will not be included in `ListRoles()` unless `show_deleted` -// is set -// in the `ListRolesRequest`. The Role contains the deleted boolean -// set. -// Existing Bindings remains, but are inactive. The Role can be -// undeleted -// within 7 days. After 7 days the Role is deleted and all Bindings -// associated -// with the role are removed. +// Delete: Deletes a custom Role. +// +// When you delete a custom role, the following changes occur +// immediately: +// +// * You cannot bind a member to the custom role in an IAM +// Policy. +// * Existing bindings to the custom role are not changed, but they have +// no +// effect. +// * By default, the response from ListRoles does not include the +// custom +// role. +// +// You have 7 days to undelete the custom role. After 7 days, the +// following +// changes occur: +// +// * The custom role is permanently deleted and cannot be recovered. +// * If an IAM policy contains a binding to the custom role, the binding +// is +// permanently removed. func (r *ProjectsRolesService) Delete(name string) *ProjectsRolesDeleteCall { c := &ProjectsRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3971,7 +4059,7 @@ func (c *ProjectsRolesDeleteCall) Header() http.Header { func (c *ProjectsRolesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4030,7 +4118,7 @@ func (c *ProjectsRolesDeleteCall) Do(opts ...googleapi.CallOption) (*Role, error } return ret, nil // { - // "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed.", + // "description": "Deletes a custom Role.\n\nWhen you delete a custom role, the following changes occur immediately:\n\n* You cannot bind a member to the custom role in an IAM\nPolicy.\n* Existing bindings to the custom role are not changed, but they have no\neffect.\n* By default, the response from ListRoles does not include the custom\nrole.\n\nYou have 7 days to undelete the custom role. After 7 days, the following\nchanges occur:\n\n* The custom role is permanently deleted and cannot be recovered.\n* If an IAM policy contains a binding to the custom role, the binding is\npermanently removed.", // "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", // "httpMethod": "DELETE", // "id": "iam.projects.roles.delete", @@ -4074,7 +4162,7 @@ type ProjectsRolesGetCall struct { header_ http.Header } -// Get: Gets a Role definition. +// Get: Gets the definition of a Role. func (r *ProjectsRolesService) Get(name string) *ProjectsRolesGetCall { c := &ProjectsRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4118,7 +4206,7 @@ func (c *ProjectsRolesGetCall) Header() http.Header { func (c *ProjectsRolesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4180,7 +4268,7 @@ func (c *ProjectsRolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) { } return ret, nil // { - // "description": "Gets a Role definition.", + // "description": "Gets the definition of a Role.", // "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", // "httpMethod": "GET", // "id": "iam.projects.roles.get", @@ -4218,7 +4306,9 @@ type ProjectsRolesListCall struct { header_ http.Header } -// List: Lists the Roles defined on a resource. +// List: Lists every predefined Role that IAM supports, or every custom +// role +// that is defined for an organization or project. func (r *ProjectsRolesService) List(parent string) *ProjectsRolesListCall { c := &ProjectsRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4227,6 +4317,8 @@ func (r *ProjectsRolesService) List(parent string) *ProjectsRolesListCall { // PageSize sets the optional parameter "pageSize": Optional limit on // the number of roles to include in the response. +// +// The default is 300, and the maximum is 1,000. func (c *ProjectsRolesListCall) PageSize(pageSize int64) *ProjectsRolesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -4299,7 +4391,7 @@ func (c *ProjectsRolesListCall) Header() http.Header { func (c *ProjectsRolesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4361,7 +4453,7 @@ func (c *ProjectsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResp } return ret, nil // { - // "description": "Lists the Roles defined on a resource.", + // "description": "Lists every predefined Role that IAM supports, or every custom role\nthat is defined for an organization or project.", // "flatPath": "v1/projects/{projectsId}/roles", // "httpMethod": "GET", // "id": "iam.projects.roles.list", @@ -4370,7 +4462,7 @@ func (c *ProjectsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResp // ], // "parameters": { // "pageSize": { - // "description": "Optional limit on the number of roles to include in the response.", + // "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", // "format": "int32", // "location": "query", // "type": "integer" @@ -4445,7 +4537,7 @@ type ProjectsRolesPatchCall struct { header_ http.Header } -// Patch: Updates a Role definition. +// Patch: Updates the definition of a custom Role. func (r *ProjectsRolesService) Patch(name string, role *Role) *ProjectsRolesPatchCall { c := &ProjectsRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4487,7 +4579,7 @@ func (c *ProjectsRolesPatchCall) Header() http.Header { func (c *ProjectsRolesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4551,7 +4643,7 @@ func (c *ProjectsRolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) } return ret, nil // { - // "description": "Updates a Role definition.", + // "description": "Updates the definition of a custom Role.", // "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", // "httpMethod": "PATCH", // "id": "iam.projects.roles.patch", @@ -4598,7 +4690,7 @@ type ProjectsRolesUndeleteCall struct { header_ http.Header } -// Undelete: Undelete a Role, bringing it back in its previous state. +// Undelete: Undeletes a custom Role. func (r *ProjectsRolesService) Undelete(name string, undeleterolerequest *UndeleteRoleRequest) *ProjectsRolesUndeleteCall { c := &ProjectsRolesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4633,7 +4725,7 @@ func (c *ProjectsRolesUndeleteCall) Header() http.Header { func (c *ProjectsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4697,7 +4789,7 @@ func (c *ProjectsRolesUndeleteCall) Do(opts ...googleapi.CallOption) (*Role, err } return ret, nil // { - // "description": "Undelete a Role, bringing it back in its previous state.", + // "description": "Undeletes a custom Role.", // "flatPath": "v1/projects/{projectsId}/roles/{rolesId}:undelete", // "httpMethod": "POST", // "id": "iam.projects.roles.undelete", @@ -4738,8 +4830,7 @@ type ProjectsServiceAccountsCreateCall struct { header_ http.Header } -// Create: Creates a ServiceAccount -// and returns it. +// Create: Creates a ServiceAccount. func (r *ProjectsServiceAccountsService) Create(name string, createserviceaccountrequest *CreateServiceAccountRequest) *ProjectsServiceAccountsCreateCall { c := &ProjectsServiceAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4774,7 +4865,7 @@ func (c *ProjectsServiceAccountsCreateCall) Header() http.Header { func (c *ProjectsServiceAccountsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4838,7 +4929,7 @@ func (c *ProjectsServiceAccountsCreateCall) Do(opts ...googleapi.CallOption) (*S } return ret, nil // { - // "description": "Creates a ServiceAccount\nand returns it.", + // "description": "Creates a ServiceAccount.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.create", @@ -4879,6 +4970,29 @@ type ProjectsServiceAccountsDeleteCall struct { } // Delete: Deletes a ServiceAccount. +// +// **Warning:** After you delete a service account, you might not be +// able to +// undelete it. If you know that you need to re-enable the service +// account in +// the future, use DisableServiceAccount instead. +// +// If you delete a service account, IAM permanently removes the +// service +// account 30 days later. Google Cloud cannot recover the service +// account +// after it is permanently removed, even if you file a support +// request. +// +// To help avoid unplanned outages, we recommend that you disable the +// service +// account before you delete it. Use DisableServiceAccount to disable +// the +// service account, then wait at least 24 hours and watch for +// unintended +// consequences. If there are no unintended consequences, you can delete +// the +// service account. func (r *ProjectsServiceAccountsService) Delete(name string) *ProjectsServiceAccountsDeleteCall { c := &ProjectsServiceAccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4912,7 +5026,7 @@ func (c *ProjectsServiceAccountsDeleteCall) Header() http.Header { func (c *ProjectsServiceAccountsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4971,7 +5085,7 @@ func (c *ProjectsServiceAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "Deletes a ServiceAccount.", + // "description": "Deletes a ServiceAccount.\n\n**Warning:** After you delete a service account, you might not be able to\nundelete it. If you know that you need to re-enable the service account in\nthe future, use DisableServiceAccount instead.\n\nIf you delete a service account, IAM permanently removes the service\naccount 30 days later. Google Cloud cannot recover the service account\nafter it is permanently removed, even if you file a support request.\n\nTo help avoid unplanned outages, we recommend that you disable the service\naccount before you delete it. Use DisableServiceAccount to disable the\nservice account, then wait at least 24 hours and watch for unintended\nconsequences. If there are no unintended consequences, you can delete the\nservice account.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", // "httpMethod": "DELETE", // "id": "iam.projects.serviceAccounts.delete", @@ -5009,33 +5123,31 @@ type ProjectsServiceAccountsDisableCall struct { header_ http.Header } -// Disable: DisableServiceAccount is currently in the alpha launch -// stage. +// Disable: Disables a ServiceAccount immediately. // -// Disables a ServiceAccount, -// which immediately prevents the service account from authenticating -// and -// gaining access to APIs. +// If an application uses the service account to authenticate, +// that +// application can no longer call Google APIs or access Google +// Cloud +// resources. Existing access tokens for the service account are +// rejected, and +// requests for new access tokens will fail. // -// Disabled service accounts can be safely restored by -// using -// EnableServiceAccount at any point. Deleted service accounts cannot -// be -// restored using this method. +// To re-enable the service account, use EnableServiceAccount. After +// you +// re-enable the service account, its existing access tokens will be +// accepted, +// and you can request new access tokens. // -// Disabling a service account that is bound to VMs, Apps, Functions, -// or -// other jobs will cause those jobs to lose access to resources if they -// are -// using the disabled service account. -// -// To improve reliability of your services and avoid unexpected outages, -// it -// is recommended to first disable a service account rather than delete -// it. -// After disabling the service account, wait at least 24 hours to verify -// there -// are no unintended consequences, and then delete the service account. +// To help avoid unplanned outages, we recommend that you disable the +// service +// account before you delete it. Use this method to disable the +// service +// account, then wait at least 24 hours and watch for unintended +// consequences. +// If there are no unintended consequences, you can delete the service +// account +// with DeleteServiceAccount. func (r *ProjectsServiceAccountsService) Disable(name string, disableserviceaccountrequest *DisableServiceAccountRequest) *ProjectsServiceAccountsDisableCall { c := &ProjectsServiceAccountsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5070,7 +5182,7 @@ func (c *ProjectsServiceAccountsDisableCall) Header() http.Header { func (c *ProjectsServiceAccountsDisableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5134,7 +5246,7 @@ func (c *ProjectsServiceAccountsDisableCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "DisableServiceAccount is currently in the alpha launch stage.\n\nDisables a ServiceAccount,\nwhich immediately prevents the service account from authenticating and\ngaining access to APIs.\n\nDisabled service accounts can be safely restored by using\nEnableServiceAccount at any point. Deleted service accounts cannot be\nrestored using this method.\n\nDisabling a service account that is bound to VMs, Apps, Functions, or\nother jobs will cause those jobs to lose access to resources if they are\nusing the disabled service account.\n\nTo improve reliability of your services and avoid unexpected outages, it\nis recommended to first disable a service account rather than delete it.\nAfter disabling the service account, wait at least 24 hours to verify there\nare no unintended consequences, and then delete the service account.", + // "description": "Disables a ServiceAccount immediately.\n\nIf an application uses the service account to authenticate, that\napplication can no longer call Google APIs or access Google Cloud\nresources. Existing access tokens for the service account are rejected, and\nrequests for new access tokens will fail.\n\nTo re-enable the service account, use EnableServiceAccount. After you\nre-enable the service account, its existing access tokens will be accepted,\nand you can request new access tokens.\n\nTo help avoid unplanned outages, we recommend that you disable the service\naccount before you delete it. Use this method to disable the service\naccount, then wait at least 24 hours and watch for unintended consequences.\nIf there are no unintended consequences, you can delete the service account\nwith DeleteServiceAccount.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:disable", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.disable", @@ -5175,21 +5287,18 @@ type ProjectsServiceAccountsEnableCall struct { header_ http.Header } -// Enable: EnableServiceAccount is currently in the alpha launch -// stage. +// Enable: Enables a ServiceAccount that was disabled +// by +// DisableServiceAccount. // -// Restores a disabled ServiceAccount -// that has been manually disabled by using DisableServiceAccount. -// Service -// accounts that have been disabled by other means or for other -// reasons, -// such as abuse, cannot be restored using this method. +// If the service account is already enabled, then this method has no +// effect. // -// EnableServiceAccount will have no effect on a service account that -// is -// not disabled. Enabling an already enabled service account will have -// no -// effect. +// If the service account was disabled by other means—for example, if +// Google +// disabled the service account because it was compromised—you cannot +// use this +// method to enable the service account. func (r *ProjectsServiceAccountsService) Enable(name string, enableserviceaccountrequest *EnableServiceAccountRequest) *ProjectsServiceAccountsEnableCall { c := &ProjectsServiceAccountsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5224,7 +5333,7 @@ func (c *ProjectsServiceAccountsEnableCall) Header() http.Header { func (c *ProjectsServiceAccountsEnableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5288,7 +5397,7 @@ func (c *ProjectsServiceAccountsEnableCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "EnableServiceAccount is currently in the alpha launch stage.\n\n Restores a disabled ServiceAccount\n that has been manually disabled by using DisableServiceAccount. Service\n accounts that have been disabled by other means or for other reasons,\n such as abuse, cannot be restored using this method.\n\n EnableServiceAccount will have no effect on a service account that is\n not disabled. Enabling an already enabled service account will have no\n effect.", + // "description": "Enables a ServiceAccount that was disabled by\nDisableServiceAccount.\n\nIf the service account is already enabled, then this method has no effect.\n\nIf the service account was disabled by other means—for example, if Google\ndisabled the service account because it was compromised—you cannot use this\nmethod to enable the service account.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:enable", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.enable", @@ -5373,7 +5482,7 @@ func (c *ProjectsServiceAccountsGetCall) Header() http.Header { func (c *ProjectsServiceAccountsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5472,30 +5581,22 @@ type ProjectsServiceAccountsGetIamPolicyCall struct { header_ http.Header } -// GetIamPolicy: Returns the Cloud IAM access control policy for -// a -// ServiceAccount. -// -// Note: Service accounts are both -// [resources -// and -// identities](/iam/docs/service-accounts#service_account_permissions -// ). This -// method treats the service account as a resource. It returns the Cloud -// IAM -// policy that reflects what members have access to the service +// GetIamPolicy: Gets the IAM policy that is attached to a +// ServiceAccount. This IAM +// policy specifies which members have access to the service // account. // -// This method does not return what resources the service account has -// access -// to. To see if a service account has access to a resource, call -// the -// `getIamPolicy` method on the target resource. For example, to view -// grants -// for a project, call -// the -// [projects.getIamPolicy](/resource-manager/reference/rest/v1/projec -// ts/getIamPolicy) +// This method does not tell you whether the service account has been +// granted +// any roles on other resources. To check whether a service account has +// role +// grants on a resource, use the `getIamPolicy` method for that +// resource. For +// example, to view the role grants for a project, call the Resource +// Manager +// API's +// [`projects.getIamPolicy`](https://cloud.google.com/resou +// rce-manager/reference/rest/v1/projects/getIamPolicy) // method. func (r *ProjectsServiceAccountsService) GetIamPolicy(resource string) *ProjectsServiceAccountsGetIamPolicyCall { c := &ProjectsServiceAccountsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -5516,6 +5617,13 @@ func (r *ProjectsServiceAccountsService) GetIamPolicy(resource string) *Projects // Policies without any conditional bindings may specify any valid value // or // leave the field unset. +// +// To learn which resources support conditions in their IAM policies, +// see +// the +// [IAM +// documentation](https://cloud.google.com/iam/help/conditions/r +// esource-policies). func (c *ProjectsServiceAccountsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsServiceAccountsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c @@ -5548,7 +5656,7 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Header() http.Header { func (c *ProjectsServiceAccountsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5607,7 +5715,7 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. It returns the Cloud IAM\npolicy that reflects what members have access to the service account.\n\nThis method does not return what resources the service account has access\nto. To see if a service account has access to a resource, call the\n`getIamPolicy` method on the target resource. For example, to view grants\nfor a project, call the\n[projects.getIamPolicy](/resource-manager/reference/rest/v1/projects/getIamPolicy)\nmethod.", + // "description": "Gets the IAM policy that is attached to a ServiceAccount. This IAM\npolicy specifies which members have access to the service account.\n\nThis method does not tell you whether the service account has been granted\nany roles on other resources. To check whether a service account has role\ngrants on a resource, use the `getIamPolicy` method for that resource. For\nexample, to view the role grants for a project, call the Resource Manager\nAPI's\n[`projects.getIamPolicy`](https://cloud.google.com/resource-manager/reference/rest/v1/projects/getIamPolicy)\nmethod.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.getIamPolicy", @@ -5616,7 +5724,7 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "options.requestedPolicyVersion": { - // "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.", + // "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies).", // "format": "int32", // "location": "query", // "type": "integer" @@ -5651,7 +5759,7 @@ type ProjectsServiceAccountsListCall struct { header_ http.Header } -// List: Lists ServiceAccounts for a project. +// List: Lists every ServiceAccount that belongs to a specific project. func (r *ProjectsServiceAccountsService) List(name string) *ProjectsServiceAccountsListCall { c := &ProjectsServiceAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5664,6 +5772,8 @@ func (r *ProjectsServiceAccountsService) List(name string) *ProjectsServiceAccou // the // ListServiceAccountsResponse.next_page_token // in a subsequent request. +// +// The default is 20, and the maximum is 100. func (c *ProjectsServiceAccountsListCall) PageSize(pageSize int64) *ProjectsServiceAccountsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -5715,7 +5825,7 @@ func (c *ProjectsServiceAccountsListCall) Header() http.Header { func (c *ProjectsServiceAccountsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5777,7 +5887,7 @@ func (c *ProjectsServiceAccountsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists ServiceAccounts for a project.", + // "description": "Lists every ServiceAccount that belongs to a specific project.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts", // "httpMethod": "GET", // "id": "iam.projects.serviceAccounts.list", @@ -5793,7 +5903,7 @@ func (c *ProjectsServiceAccountsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "pageSize": { - // "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request.", + // "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request.\n\nThe default is 20, and the maximum is 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -5848,15 +5958,6 @@ type ProjectsServiceAccountsPatchCall struct { } // Patch: Patches a ServiceAccount. -// -// Currently, only the following fields are updatable: -// `display_name` and `description`. -// -// Only fields specified in the request are guaranteed to be returned -// in -// the response. Other fields in the response may be empty. -// -// Note: The field mask is required. func (r *ProjectsServiceAccountsService) Patch(name string, patchserviceaccountrequest *PatchServiceAccountRequest) *ProjectsServiceAccountsPatchCall { c := &ProjectsServiceAccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5891,7 +5992,7 @@ func (c *ProjectsServiceAccountsPatchCall) Header() http.Header { func (c *ProjectsServiceAccountsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5955,7 +6056,7 @@ func (c *ProjectsServiceAccountsPatchCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Patches a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` and `description`.\n\nOnly fields specified in the request are guaranteed to be returned in\nthe response. Other fields in the response may be empty.\n\nNote: The field mask is required.", + // "description": "Patches a ServiceAccount.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", // "httpMethod": "PATCH", // "id": "iam.projects.serviceAccounts.patch", @@ -5964,7 +6065,7 @@ func (c *ProjectsServiceAccountsPatchCall) Do(opts ...googleapi.CallOption) (*Se // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + // "description": "The resource name of the service account.\n\nUse one of the following formats:\n\n* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`\n\nAs an alternative, you can use the `-` wildcard character instead of the\nproject ID:\n\n* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/-/serviceAccounts/{UNIQUE_ID}`\n\nWhen possible, avoid using the `-` wildcard character, because it can cause\nresponse messages to contain misleading error codes. For example, if you\ntry to get the service account\n`projects/-/serviceAccounts/fake@example.com`, which does not exist, the\nresponse contains an HTTP `403 Forbidden` error instead of a `404 Not\nFound` error.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, @@ -5996,33 +6097,33 @@ type ProjectsServiceAccountsSetIamPolicyCall struct { header_ http.Header } -// SetIamPolicy: Sets the Cloud IAM access control policy for -// a +// SetIamPolicy: Sets the IAM policy that is attached to a // ServiceAccount. // -// Note: Service accounts are both -// [resources -// and -// identities](/iam/docs/service-accounts#service_account_permissions -// ). This -// method treats the service account as a resource. Use it to grant -// members -// access to the service account, such as when they need to impersonate -// it. -// -// This method does not grant the service account access to other -// resources, -// such as projects. To grant a service account access to resources, -// include -// the service account in the Cloud IAM policy for the desired resource, -// then -// call the appropriate `setIamPolicy` method on the target resource. +// Use this method to grant or revoke access to the service account. // For -// example, to grant a service account access to a project, call -// the -// [projects.setIamPolicy](/resource-manager/reference/rest/v1/projec -// ts/setIamPolicy) -// method. +// example, you could grant a member the ability to impersonate the +// service +// account. +// +// This method does not enable the service account to access other +// resources. +// To grant roles to a service account on a resource, follow these +// steps: +// +// 1. Call the resource's `getIamPolicy` method to get its current IAM +// policy. +// 2. Edit the policy so that it binds the service account to an IAM +// role for +// the resource. +// 3. Call the resource's `setIamPolicy` method to update its IAM +// policy. +// +// For detailed instructions, see +// [Granting roles to a service account for +// specific +// resources](https://cloud.google.com/iam/help/service-accounts +// /granting-access-to-service-accounts). func (r *ProjectsServiceAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsServiceAccountsSetIamPolicyCall { c := &ProjectsServiceAccountsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -6057,7 +6158,7 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Header() http.Header { func (c *ProjectsServiceAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6121,7 +6222,7 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. Use it to grant members\naccess to the service account, such as when they need to impersonate it.\n\nThis method does not grant the service account access to other resources,\nsuch as projects. To grant a service account access to resources, include\nthe service account in the Cloud IAM policy for the desired resource, then\ncall the appropriate `setIamPolicy` method on the target resource. For\nexample, to grant a service account access to a project, call the\n[projects.setIamPolicy](/resource-manager/reference/rest/v1/projects/setIamPolicy)\nmethod.", + // "description": "Sets the IAM policy that is attached to a ServiceAccount.\n\nUse this method to grant or revoke access to the service account. For\nexample, you could grant a member the ability to impersonate the service\naccount.\n\nThis method does not enable the service account to access other resources.\nTo grant roles to a service account on a resource, follow these steps:\n\n1. Call the resource's `getIamPolicy` method to get its current IAM policy.\n2. Edit the policy so that it binds the service account to an IAM role for\nthe resource.\n3. Call the resource's `setIamPolicy` method to update its IAM policy.\n\nFor detailed instructions, see\n[Granting roles to a service account for specific\nresources](https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts).", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.setIamPolicy", @@ -6162,15 +6263,15 @@ type ProjectsServiceAccountsSignBlobCall struct { header_ http.Header } -// SignBlob: **Note**: This method is in the process of being -// deprecated. Call +// SignBlob: **Note:** We are in the process of deprecating this method. +// Use // the -// [`signBlob()`](/iam/credentials/reference/rest/v1/projects.service -// Accounts/signBlob) -// method of the Cloud IAM Service Account Credentials API -// instead. +// [`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1 +// /projects.serviceAccounts/signBlob) +// method in the IAM Service Account Credentials API instead. // -// Signs a blob using a service account's system-managed private key. +// Signs a blob using the system-managed private key for a +// ServiceAccount. func (r *ProjectsServiceAccountsService) SignBlob(name string, signblobrequest *SignBlobRequest) *ProjectsServiceAccountsSignBlobCall { c := &ProjectsServiceAccountsSignBlobCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6205,7 +6306,7 @@ func (c *ProjectsServiceAccountsSignBlobCall) Header() http.Header { func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6269,7 +6370,7 @@ func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signBlob()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a blob using a service account's system-managed private key.", + // "description": "**Note:** We are in the process of deprecating this method. Use the\n[`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob)\nmethod in the IAM Service Account Credentials API instead.\n\nSigns a blob using the system-managed private key for a ServiceAccount.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.signBlob", @@ -6310,21 +6411,16 @@ type ProjectsServiceAccountsSignJwtCall struct { header_ http.Header } -// SignJwt: **Note**: This method is in the process of being deprecated. -// Call +// SignJwt: **Note:** We are in the process of deprecating this method. +// Use // the -// [`signJwt()`](/iam/credentials/reference/rest/v1/projects.serviceA -// ccounts/signJwt) -// method of the Cloud IAM Service Account Credentials API -// instead. +// [`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/ +// projects.serviceAccounts/signJwt) +// method in the IAM Service Account Credentials API instead. // -// Signs a JWT using a service account's system-managed private key. -// -// If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM -// sets an -// an expiry time of one hour by default. If you request an expiry time -// of -// more than one hour, the request will fail. +// Signs a JSON Web Token (JWT) using the system-managed private key for +// a +// ServiceAccount. func (r *ProjectsServiceAccountsService) SignJwt(name string, signjwtrequest *SignJwtRequest) *ProjectsServiceAccountsSignJwtCall { c := &ProjectsServiceAccountsSignJwtCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6359,7 +6455,7 @@ func (c *ProjectsServiceAccountsSignJwtCall) Header() http.Header { func (c *ProjectsServiceAccountsSignJwtCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6423,7 +6519,7 @@ func (c *ProjectsServiceAccountsSignJwtCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signJwt()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signJwt)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", + // "description": "**Note:** We are in the process of deprecating this method. Use the\n[`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt)\nmethod in the IAM Service Account Credentials API instead.\n\nSigns a JSON Web Token (JWT) using the system-managed private key for a\nServiceAccount.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.signJwt", @@ -6464,9 +6560,9 @@ type ProjectsServiceAccountsTestIamPermissionsCall struct { header_ http.Header } -// TestIamPermissions: Tests the specified permissions against the IAM -// access control policy -// for a ServiceAccount. +// TestIamPermissions: Tests whether the caller has the specified +// permissions on a +// ServiceAccount. func (r *ProjectsServiceAccountsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsServiceAccountsTestIamPermissionsCall { c := &ProjectsServiceAccountsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -6501,7 +6597,7 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Header() http.Header { func (c *ProjectsServiceAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6565,7 +6661,7 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Tests the specified permissions against the IAM access control policy\nfor a ServiceAccount.", + // "description": "Tests whether the caller has the specified permissions on a\nServiceAccount.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:testIamPermissions", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.testIamPermissions", @@ -6607,9 +6703,16 @@ type ProjectsServiceAccountsUndeleteCall struct { } // Undelete: Restores a deleted ServiceAccount. -// This is to be used as an action of last resort. A service account -// may -// not always be restorable. +// +// **Important:** It is not always possible to restore a deleted +// service +// account. Use this method only as a last resort. +// +// After you delete a service account, IAM permanently removes the +// service +// account 30 days later. There is no way to restore a deleted service +// account +// that has been permanently removed. func (r *ProjectsServiceAccountsService) Undelete(name string, undeleteserviceaccountrequest *UndeleteServiceAccountRequest) *ProjectsServiceAccountsUndeleteCall { c := &ProjectsServiceAccountsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6644,7 +6747,7 @@ func (c *ProjectsServiceAccountsUndeleteCall) Header() http.Header { func (c *ProjectsServiceAccountsUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6708,7 +6811,7 @@ func (c *ProjectsServiceAccountsUndeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Restores a deleted ServiceAccount.\nThis is to be used as an action of last resort. A service account may\nnot always be restorable.", + // "description": "Restores a deleted ServiceAccount.\n\n**Important:** It is not always possible to restore a deleted service\naccount. Use this method only as a last resort.\n\nAfter you delete a service account, IAM permanently removes the service\naccount 30 days later. There is no way to restore a deleted service account\nthat has been permanently removed.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:undelete", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.undelete", @@ -6749,14 +6852,13 @@ type ProjectsServiceAccountsUpdateCall struct { header_ http.Header } -// Update: Note: This method is in the process of being deprecated. +// Update: **Note:** We are in the process of deprecating this method. // Use // PatchServiceAccount instead. // // Updates a ServiceAccount. // -// Currently, only the following fields are updatable: -// `display_name` and `description`. +// You can update only the `display_name` and `description` fields. func (r *ProjectsServiceAccountsService) Update(name string, serviceaccount *ServiceAccount) *ProjectsServiceAccountsUpdateCall { c := &ProjectsServiceAccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6791,7 +6893,7 @@ func (c *ProjectsServiceAccountsUpdateCall) Header() http.Header { func (c *ProjectsServiceAccountsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6855,7 +6957,7 @@ func (c *ProjectsServiceAccountsUpdateCall) Do(opts ...googleapi.CallOption) (*S } return ret, nil // { - // "description": "Note: This method is in the process of being deprecated. Use\nPatchServiceAccount instead.\n\nUpdates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` and `description`.", + // "description": "**Note:** We are in the process of deprecating this method. Use\nPatchServiceAccount instead.\n\nUpdates a ServiceAccount.\n\nYou can update only the `display_name` and `description` fields.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", // "httpMethod": "PUT", // "id": "iam.projects.serviceAccounts.update", @@ -6864,7 +6966,7 @@ func (c *ProjectsServiceAccountsUpdateCall) Do(opts ...googleapi.CallOption) (*S // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + // "description": "The resource name of the service account.\n\nUse one of the following formats:\n\n* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`\n\nAs an alternative, you can use the `-` wildcard character instead of the\nproject ID:\n\n* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`\n* `projects/-/serviceAccounts/{UNIQUE_ID}`\n\nWhen possible, avoid using the `-` wildcard character, because it can cause\nresponse messages to contain misleading error codes. For example, if you\ntry to get the service account\n`projects/-/serviceAccounts/fake@example.com`, which does not exist, the\nresponse contains an HTTP `403 Forbidden` error instead of a `404 Not\nFound` error.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, @@ -6896,8 +6998,7 @@ type ProjectsServiceAccountsKeysCreateCall struct { header_ http.Header } -// Create: Creates a ServiceAccountKey -// and returns it. +// Create: Creates a ServiceAccountKey. func (r *ProjectsServiceAccountsKeysService) Create(name string, createserviceaccountkeyrequest *CreateServiceAccountKeyRequest) *ProjectsServiceAccountsKeysCreateCall { c := &ProjectsServiceAccountsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6932,7 +7033,7 @@ func (c *ProjectsServiceAccountsKeysCreateCall) Header() http.Header { func (c *ProjectsServiceAccountsKeysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6996,7 +7097,7 @@ func (c *ProjectsServiceAccountsKeysCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a ServiceAccountKey\nand returns it.", + // "description": "Creates a ServiceAccountKey.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.keys.create", @@ -7070,7 +7171,7 @@ func (c *ProjectsServiceAccountsKeysDeleteCall) Header() http.Header { func (c *ProjectsServiceAccountsKeysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7167,8 +7268,7 @@ type ProjectsServiceAccountsKeysGetCall struct { header_ http.Header } -// Get: Gets the ServiceAccountKey -// by key id. +// Get: Gets a ServiceAccountKey. func (r *ProjectsServiceAccountsKeysService) Get(name string) *ProjectsServiceAccountsKeysGetCall { c := &ProjectsServiceAccountsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7225,7 +7325,7 @@ func (c *ProjectsServiceAccountsKeysGetCall) Header() http.Header { func (c *ProjectsServiceAccountsKeysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7287,7 +7387,7 @@ func (c *ProjectsServiceAccountsKeysGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the ServiceAccountKey\nby key id.", + // "description": "Gets a ServiceAccountKey.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", // "httpMethod": "GET", // "id": "iam.projects.serviceAccounts.keys.get", @@ -7335,7 +7435,7 @@ type ProjectsServiceAccountsKeysListCall struct { header_ http.Header } -// List: Lists ServiceAccountKeys. +// List: Lists every ServiceAccountKey for a service account. func (r *ProjectsServiceAccountsKeysService) List(name string) *ProjectsServiceAccountsKeysListCall { c := &ProjectsServiceAccountsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7393,7 +7493,7 @@ func (c *ProjectsServiceAccountsKeysListCall) Header() http.Header { func (c *ProjectsServiceAccountsKeysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7455,7 +7555,7 @@ func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists ServiceAccountKeys.", + // "description": "Lists every ServiceAccountKey for a service account.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", // "httpMethod": "GET", // "id": "iam.projects.serviceAccounts.keys.list", @@ -7504,10 +7604,8 @@ type ProjectsServiceAccountsKeysUploadCall struct { header_ http.Header } -// Upload: Upload public key for a given service account. -// This rpc will create a -// ServiceAccountKey that has the -// provided public key and returns it. +// Upload: Creates a ServiceAccountKey, using a public key that you +// provide. func (r *ProjectsServiceAccountsKeysService) Upload(name string, uploadserviceaccountkeyrequest *UploadServiceAccountKeyRequest) *ProjectsServiceAccountsKeysUploadCall { c := &ProjectsServiceAccountsKeysUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7542,7 +7640,7 @@ func (c *ProjectsServiceAccountsKeysUploadCall) Header() http.Header { func (c *ProjectsServiceAccountsKeysUploadCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7606,7 +7704,7 @@ func (c *ProjectsServiceAccountsKeysUploadCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Upload public key for a given service account.\nThis rpc will create a\nServiceAccountKey that has the\nprovided public key and returns it.", + // "description": "Creates a ServiceAccountKey, using a public key that you provide.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys:upload", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.keys.upload", @@ -7647,7 +7745,7 @@ type RolesGetCall struct { header_ http.Header } -// Get: Gets a Role definition. +// Get: Gets the definition of a Role. func (r *RolesService) Get(name string) *RolesGetCall { c := &RolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7691,7 +7789,7 @@ func (c *RolesGetCall) Header() http.Header { func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7753,7 +7851,7 @@ func (c *RolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) { } return ret, nil // { - // "description": "Gets a Role definition.", + // "description": "Gets the definition of a Role.", // "flatPath": "v1/roles/{rolesId}", // "httpMethod": "GET", // "id": "iam.roles.get", @@ -7790,7 +7888,9 @@ type RolesListCall struct { header_ http.Header } -// List: Lists the Roles defined on a resource. +// List: Lists every predefined Role that IAM supports, or every custom +// role +// that is defined for an organization or project. func (r *RolesService) List() *RolesListCall { c := &RolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -7798,6 +7898,8 @@ func (r *RolesService) List() *RolesListCall { // PageSize sets the optional parameter "pageSize": Optional limit on // the number of roles to include in the response. +// +// The default is 300, and the maximum is 1,000. func (c *RolesListCall) PageSize(pageSize int64) *RolesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -7917,7 +8019,7 @@ func (c *RolesListCall) Header() http.Header { func (c *RolesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7976,14 +8078,14 @@ func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResponse, er } return ret, nil // { - // "description": "Lists the Roles defined on a resource.", + // "description": "Lists every predefined Role that IAM supports, or every custom role\nthat is defined for an organization or project.", // "flatPath": "v1/roles", // "httpMethod": "GET", // "id": "iam.roles.list", // "parameterOrder": [], // "parameters": { // "pageSize": { - // "description": "Optional limit on the number of roles to include in the response.", + // "description": "Optional limit on the number of roles to include in the response.\n\nThe default is 300, and the maximum is 1,000.", // "format": "int32", // "location": "query", // "type": "integer" @@ -8055,11 +8157,11 @@ type RolesQueryGrantableRolesCall struct { header_ http.Header } -// QueryGrantableRoles: Queries roles that can be granted on a -// particular resource. -// A role is grantable if it can be used as the role in a binding for a -// policy -// for that resource. +// QueryGrantableRoles: Lists roles that can be granted on a Google +// Cloud resource. A role is +// grantable if the IAM policy for the resource can contain bindings to +// the +// role. func (r *RolesService) QueryGrantableRoles(querygrantablerolesrequest *QueryGrantableRolesRequest) *RolesQueryGrantableRolesCall { c := &RolesQueryGrantableRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.querygrantablerolesrequest = querygrantablerolesrequest @@ -8093,7 +8195,7 @@ func (c *RolesQueryGrantableRolesCall) Header() http.Header { func (c *RolesQueryGrantableRolesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8154,7 +8256,7 @@ func (c *RolesQueryGrantableRolesCall) Do(opts ...googleapi.CallOption) (*QueryG } return ret, nil // { - // "description": "Queries roles that can be granted on a particular resource.\nA role is grantable if it can be used as the role in a binding for a policy\nfor that resource.", + // "description": "Lists roles that can be granted on a Google Cloud resource. A role is\ngrantable if the IAM policy for the resource can contain bindings to the\nrole.", // "flatPath": "v1/roles:queryGrantableRoles", // "httpMethod": "POST", // "id": "iam.roles.queryGrantableRoles", diff --git a/vendor/google.golang.org/api/internal/gensupport/resumable.go b/vendor/google.golang.org/api/internal/gensupport/resumable.go index e67ccd9a6..edc87ec24 100644 --- a/vendor/google.golang.org/api/internal/gensupport/resumable.go +++ b/vendor/google.golang.org/api/internal/gensupport/resumable.go @@ -28,6 +28,8 @@ var ( backoff = func() Backoff { return &gax.Backoff{Initial: 100 * time.Millisecond} } + // isRetryable is a platform-specific hook, specified in retryable_linux.go + syscallRetryable func(error) bool = func(err error) bool { return false } ) const ( @@ -160,21 +162,6 @@ func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, e // rx is private to the auto-generated API code. // Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { - var shouldRetry = func(status int, err error) bool { - if 500 <= status && status <= 599 { - return true - } - if status == statusTooManyRequests { - return true - } - if err == io.ErrUnexpectedEOF { - return true - } - if err, ok := err.(interface{ Temporary() bool }); ok { - return err.Temporary() - } - return false - } // There are a couple of cases where it's possible for err and resp to both // be non-nil. However, we expose a simpler contract to our callers: exactly @@ -239,3 +226,33 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err return prepareReturn(resp, err) } } + +// shouldRetry indicates whether an error is retryable for the purposes of this +// package, following guidance from +// https://cloud.google.com/storage/docs/exponential-backoff . +func shouldRetry(status int, err error) bool { + if 500 <= status && status <= 599 { + return true + } + if status == statusTooManyRequests { + return true + } + if err == io.ErrUnexpectedEOF { + return true + } + // Transient network errors should be retried. + if syscallRetryable(err) { + return true + } + if err, ok := err.(interface{ Temporary() bool }); ok { + if err.Temporary() { + return true + } + } + // If Go 1.13 error unwrapping is available, use this to examine wrapped + // errors. + if err, ok := err.(interface{ Unwrap() error }); ok { + return shouldRetry(status, err.Unwrap()) + } + return false +} diff --git a/vendor/google.golang.org/api/internal/gensupport/retryable_linux.go b/vendor/google.golang.org/api/internal/gensupport/retryable_linux.go new file mode 100644 index 000000000..fed998b5d --- /dev/null +++ b/vendor/google.golang.org/api/internal/gensupport/retryable_linux.go @@ -0,0 +1,15 @@ +// Copyright 2020 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package gensupport + +import "syscall" + +func init() { + // Initialize syscallRetryable to return true on transient socket-level + // errors. These errors are specific to Linux. + syscallRetryable = func(err error) bool { return err == syscall.ECONNRESET || err == syscall.ECONNREFUSED } +} diff --git a/vendor/google.golang.org/api/internal/gensupport/send.go b/vendor/google.golang.org/api/internal/gensupport/send.go index 579939309..3338c8d19 100644 --- a/vendor/google.golang.org/api/internal/gensupport/send.go +++ b/vendor/google.golang.org/api/internal/gensupport/send.go @@ -9,6 +9,7 @@ import ( "encoding/json" "errors" "net/http" + "time" ) // Hook is the type of a function that is called once before each HTTP request @@ -77,6 +78,90 @@ func send(ctx context.Context, client *http.Client, req *http.Request) (*http.Re return resp, err } +// SendRequestWithRetry sends a single HTTP request using the given client, +// with retries if a retryable error is returned. +// If ctx is non-nil, it calls all hooks, then sends the request with +// req.WithContext, then calls any functions returned by the hooks in +// reverse order. +func SendRequestWithRetry(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { + // Disallow Accept-Encoding because it interferes with the automatic gzip handling + // done by the default http.Transport. See https://github.com/google/google-api-go-client/issues/219. + if _, ok := req.Header["Accept-Encoding"]; ok { + return nil, errors.New("google api: custom Accept-Encoding headers not allowed") + } + if ctx == nil { + return client.Do(req) + } + // Call hooks in order of registration, store returned funcs. + post := make([]func(resp *http.Response), len(hooks)) + for i, h := range hooks { + fn := h(ctx, req) + post[i] = fn + } + + // Send request with retry. + resp, err := sendAndRetry(ctx, client, req) + + // Call returned funcs in reverse order. + for i := len(post) - 1; i >= 0; i-- { + if fn := post[i]; fn != nil { + fn(resp) + } + } + return resp, err +} + +func sendAndRetry(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { + if client == nil { + client = http.DefaultClient + } + + var resp *http.Response + var err error + + // Loop to retry the request, up to the context deadline. + var pause time.Duration + bo := backoff() + + for { + select { + case <-ctx.Done(): + // If we got an error, and the context has been canceled, + // the context's error is probably more useful. + if err == nil { + err = ctx.Err() + } + return resp, err + case <-time.After(pause): + } + + resp, err = client.Do(req.WithContext(ctx)) + + var status int + if resp != nil { + status = resp.StatusCode + } + + // Check if we can retry the request. A retry can only be done if the error + // is retryable and the request body can be re-created using GetBody (this + // will not be possible if the body was unbuffered). + if req.GetBody == nil || !shouldRetry(status, err) { + break + } + var errBody error + req.Body, errBody = req.GetBody() + if errBody != nil { + break + } + + pause = bo.Pause() + if resp != nil && resp.Body != nil { + resp.Body.Close() + } + } + return resp, err +} + // DecodeResponse decodes the body of res into target. If there is no body, // target is unchanged. func DecodeResponse(target interface{}, res *http.Response) error { diff --git a/vendor/google.golang.org/api/internal/settings.go b/vendor/google.golang.org/api/internal/settings.go index 0d8210baa..f435519de 100644 --- a/vendor/google.golang.org/api/internal/settings.go +++ b/vendor/google.golang.org/api/internal/settings.go @@ -18,25 +18,26 @@ import ( // DialSettings holds information needed to establish a connection with a // Google API service. type DialSettings struct { - Endpoint string - DefaultEndpoint string - Scopes []string - TokenSource oauth2.TokenSource - Credentials *google.Credentials - CredentialsFile string // if set, Token Source is ignored. - CredentialsJSON []byte - UserAgent string - APIKey string - Audiences []string - HTTPClient *http.Client - GRPCDialOpts []grpc.DialOption - GRPCConn *grpc.ClientConn - GRPCConnPool ConnPool - GRPCConnPoolSize int - NoAuth bool - TelemetryDisabled bool - ClientCertSource func(*tls.CertificateRequestInfo) (*tls.Certificate, error) - CustomClaims map[string]interface{} + Endpoint string + DefaultEndpoint string + DefaultMTLSEndpoint string + Scopes []string + TokenSource oauth2.TokenSource + Credentials *google.Credentials + CredentialsFile string // if set, Token Source is ignored. + CredentialsJSON []byte + UserAgent string + APIKey string + Audiences []string + HTTPClient *http.Client + GRPCDialOpts []grpc.DialOption + GRPCConn *grpc.ClientConn + GRPCConnPool ConnPool + GRPCConnPoolSize int + NoAuth bool + TelemetryDisabled bool + ClientCertSource func(*tls.CertificateRequestInfo) (*tls.Certificate, error) + CustomClaims map[string]interface{} // Google API system parameters. For more information please read: // https://cloud.google.com/apis/docs/system-parameters diff --git a/vendor/google.golang.org/api/option/internaloption/internaloption.go b/vendor/google.golang.org/api/option/internaloption/internaloption.go index 48121e42f..ff5b530cf 100644 --- a/vendor/google.golang.org/api/option/internaloption/internaloption.go +++ b/vendor/google.golang.org/api/option/internaloption/internaloption.go @@ -24,3 +24,17 @@ func (o defaultEndpointOption) Apply(settings *internal.DialSettings) { func WithDefaultEndpoint(url string) option.ClientOption { return defaultEndpointOption(url) } + +type defaultMTLSEndpointOption string + +func (o defaultMTLSEndpointOption) Apply(settings *internal.DialSettings) { + settings.DefaultMTLSEndpoint = string(o) +} + +// WithDefaultMTLSEndpoint is an option that indicates the default mTLS endpoint. +// +// It should only be used internally by generated clients. +// +func WithDefaultMTLSEndpoint(url string) option.ClientOption { + return defaultMTLSEndpointOption(url) +} diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 3a551b130..e78776b2b 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -26,7 +26,7 @@ "description": "Stores and retrieves potentially large, immutable data objects.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/storage/docs/json_api/", - "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/ZrOuv2jlHS6Z6zwtpAqNzM6FbAU\"", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/5Ir-e9ddNPcr5skzvRsSnJlvTYg\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -1781,7 +1781,7 @@ "type": "string" }, "kmsKeyName": { - "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.", "location": "query", "type": "string" }, @@ -3229,7 +3229,7 @@ } } }, - "revision": "20200410", + "revision": "20200611", "rootUrl": "https://storage.googleapis.com/", "schemas": { "Bucket": { @@ -3415,6 +3415,11 @@ "format": "int32", "type": "integer" }, + "daysSinceNoncurrentTime": { + "description": "Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.", + "format": "int32", + "type": "integer" + }, "isLive": { "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.", "type": "boolean" @@ -3430,6 +3435,11 @@ }, "type": "array" }, + "noncurrentTimeBefore": { + "description": "A timestamp in RFC 3339 format. This condition is satisfied when the noncurrent time on an object is before this timestamp. This condition is relevant only for versioned objects.", + "format": "date-time", + "type": "string" + }, "numNewerVersions": { "description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.", "format": "int32", diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index aa596a96b..dc51a22ed 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -766,6 +766,14 @@ type BucketLifecycleRuleCondition struct { // on an object, the condition does not apply. DaysSinceCustomTime int64 `json:"daysSinceCustomTime,omitempty"` + // DaysSinceNoncurrentTime: Number of days elapsed since the noncurrent + // timestamp of an object. The condition is satisfied if the days + // elapsed is at least this number. This condition is relevant only for + // versioned objects. The value of the field must be a nonnegative + // integer. If it's zero, the object version will become eligible for + // Lifecycle action as soon as it becomes noncurrent. + DaysSinceNoncurrentTime int64 `json:"daysSinceNoncurrentTime,omitempty"` + // IsLive: Relevant only for versioned objects. If the value is true, // this condition matches live objects; if the value is false, it // matches archived objects. @@ -785,6 +793,11 @@ type BucketLifecycleRuleCondition struct { // DURABLE_REDUCED_AVAILABILITY. MatchesStorageClass []string `json:"matchesStorageClass,omitempty"` + // NoncurrentTimeBefore: A timestamp in RFC 3339 format. This condition + // is satisfied when the noncurrent time on an object is before this + // timestamp. This condition is relevant only for versioned objects. + NoncurrentTimeBefore string `json:"noncurrentTimeBefore,omitempty"` + // NumNewerVersions: Relevant only for versioned objects. If the value // is N, this condition is satisfied when there are at least N versions // (including the live version) newer than this version of the object. @@ -2429,7 +2442,7 @@ func (c *BucketAccessControlsDeleteCall) Header() http.Header { func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2577,7 +2590,7 @@ func (c *BucketAccessControlsGetCall) Header() http.Header { func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2744,7 +2757,7 @@ func (c *BucketAccessControlsInsertCall) Header() http.Header { func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2917,7 +2930,7 @@ func (c *BucketAccessControlsListCall) Header() http.Header { func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3078,7 +3091,7 @@ func (c *BucketAccessControlsPatchCall) Header() http.Header { func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3252,7 +3265,7 @@ func (c *BucketAccessControlsUpdateCall) Header() http.Header { func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3438,7 +3451,7 @@ func (c *BucketsDeleteCall) Header() http.Header { func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3617,7 +3630,7 @@ func (c *BucketsGetCall) Header() http.Header { func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3823,7 +3836,7 @@ func (c *BucketsGetIamPolicyCall) Header() http.Header { func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4040,7 +4053,7 @@ func (c *BucketsInsertCall) Header() http.Header { func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4297,7 +4310,7 @@ func (c *BucketsListCall) Header() http.Header { func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4507,7 +4520,7 @@ func (c *BucketsLockRetentionPolicyCall) Header() http.Header { func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4742,7 +4755,7 @@ func (c *BucketsPatchCall) Header() http.Header { func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4971,7 +4984,7 @@ func (c *BucketsSetIamPolicyCall) Header() http.Header { func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5146,7 +5159,7 @@ func (c *BucketsTestIamPermissionsCall) Header() http.Header { func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5386,7 +5399,7 @@ func (c *BucketsUpdateCall) Header() http.Header { func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5598,7 +5611,7 @@ func (c *ChannelsStopCall) Header() http.Header { func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5715,7 +5728,7 @@ func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header { func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5863,7 +5876,7 @@ func (c *DefaultObjectAccessControlsGetCall) Header() http.Header { func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6031,7 +6044,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header { func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6221,7 +6234,7 @@ func (c *DefaultObjectAccessControlsListCall) Header() http.Header { func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6394,7 +6407,7 @@ func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header { func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6568,7 +6581,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header { func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6740,7 +6753,7 @@ func (c *NotificationsDeleteCall) Header() http.Header { func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6888,7 +6901,7 @@ func (c *NotificationsGetCall) Header() http.Header { func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7058,7 +7071,7 @@ func (c *NotificationsInsertCall) Header() http.Header { func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7233,7 +7246,7 @@ func (c *NotificationsListCall) Header() http.Header { func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7406,7 +7419,7 @@ func (c *ObjectAccessControlsDeleteCall) Header() http.Header { func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7578,7 +7591,7 @@ func (c *ObjectAccessControlsGetCall) Header() http.Header { func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7769,7 +7782,7 @@ func (c *ObjectAccessControlsInsertCall) Header() http.Header { func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7966,7 +7979,7 @@ func (c *ObjectAccessControlsListCall) Header() http.Header { func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8151,7 +8164,7 @@ func (c *ObjectAccessControlsPatchCall) Header() http.Header { func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8349,7 +8362,7 @@ func (c *ObjectAccessControlsUpdateCall) Header() http.Header { func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8534,11 +8547,9 @@ func (c *ObjectsComposeCall) IfMetagenerationMatch(ifMetagenerationMatch int64) return c } -// KmsKeyName sets the optional parameter "kmsKeyName": Resource name of -// the Cloud KMS key, of the form -// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, -// that will be used to encrypt the object. Overrides the object -// metadata's kms_key_name value, if any. +// KmsKeyName sets the optional parameter "kmsKeyName": Not currently +// supported. Specifying the parameter causes the request to fail with +// status code 400 - Bad Request. func (c *ObjectsComposeCall) KmsKeyName(kmsKeyName string) *ObjectsComposeCall { c.urlParams_.Set("kmsKeyName", kmsKeyName) return c @@ -8586,7 +8597,7 @@ func (c *ObjectsComposeCall) Header() http.Header { func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8705,7 +8716,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "kmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + // "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.", // "location": "query", // "type": "string" // }, @@ -8929,7 +8940,7 @@ func (c *ObjectsCopyCall) Header() http.Header { func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9257,7 +9268,7 @@ func (c *ObjectsDeleteCall) Header() http.Header { func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9490,7 +9501,7 @@ func (c *ObjectsGetCall) Header() http.Header { func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9740,7 +9751,7 @@ func (c *ObjectsGetIamPolicyCall) Header() http.Header { func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10057,7 +10068,7 @@ func (c *ObjectsInsertCall) Header() http.Header { func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10091,7 +10102,7 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) + return gensupport.SendRequestWithRetry(c.ctx_, c.s.client, req) } // Do executes the "storage.objects.insert" call. @@ -10430,7 +10441,7 @@ func (c *ObjectsListCall) Header() http.Header { func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10747,7 +10758,7 @@ func (c *ObjectsPatchCall) Header() http.Header { func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11139,7 +11150,7 @@ func (c *ObjectsRewriteCall) Header() http.Header { func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11442,7 +11453,7 @@ func (c *ObjectsSetIamPolicyCall) Header() http.Header { func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11642,7 +11653,7 @@ func (c *ObjectsTestIamPermissionsCall) Header() http.Header { func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11903,7 +11914,7 @@ func (c *ObjectsUpdateCall) Header() http.Header { func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12221,7 +12232,7 @@ func (c *ObjectsWatchAllCall) Header() http.Header { func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12437,7 +12448,7 @@ func (c *ProjectsHmacKeysCreateCall) Header() http.Header { func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12587,7 +12598,7 @@ func (c *ProjectsHmacKeysDeleteCall) Header() http.Header { func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12722,7 +12733,7 @@ func (c *ProjectsHmacKeysGetCall) Header() http.Header { func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12922,7 +12933,7 @@ func (c *ProjectsHmacKeysListCall) Header() http.Header { func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13117,7 +13128,7 @@ func (c *ProjectsHmacKeysUpdateCall) Header() http.Header { func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13294,7 +13305,7 @@ func (c *ProjectsServiceAccountGetCall) Header() http.Header { func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200510") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/transport/grpc/dial.go b/vendor/google.golang.org/api/transport/grpc/dial.go index 0131a2cfa..77ee798e0 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial.go +++ b/vendor/google.golang.org/api/transport/grpc/dial.go @@ -187,6 +187,29 @@ func dial(ctx context.Context, insecure bool, o *internal.DialSettings) (*grpc.C return grpc.DialContext(ctx, o.Endpoint, grpcOpts...) } +// generateDefaultMtlsEndpoint attempts to derive the mTLS version of the +// defaultEndpoint via regex, and returns defaultEndpoint if unsuccessful. +// +// We need to applying the following 2 transformations: +// 1. pubsub.googleapis.com to pubsub.mtls.googleapis.com +// 2. pubsub.sandbox.googleapis.com to pubsub.mtls.sandbox.googleapis.com +// +// TODO(cbro): In the future, the mTLS endpoint will be read from Service Config +// and passed in as defaultMtlsEndpoint instead of generated from defaultEndpoint, +// and this function will be removed. +func generateDefaultMtlsEndpoint(defaultEndpoint string) string { + var domains = []string{ + ".sandbox.googleapis.com", // must come first because .googleapis.com is a substring + ".googleapis.com", + } + for _, domain := range domains { + if strings.Contains(defaultEndpoint, domain) { + return strings.Replace(defaultEndpoint, domain, ".mtls"+domain, -1) + } + } + return defaultEndpoint +} + func addOCStatsHandler(opts []grpc.DialOption, settings *internal.DialSettings) []grpc.DialOption { if settings.TelemetryDisabled { return opts @@ -271,6 +294,13 @@ func processAndValidateOpts(opts []option.ClientOption) (*internal.DialSettings, if err := o.Validate(); err != nil { return nil, err } + + // NOTE(cbro): this is used only by the nightly mtls_smoketest and should + // not otherwise be used. It will be removed or renamed at some point. + if os.Getenv("GOOGLE_API_USE_MTLS") == "always" { + o.Endpoint = generateDefaultMtlsEndpoint(o.Endpoint) + } + return &o, nil } diff --git a/vendor/google.golang.org/api/transport/http/default_transport_go113.go b/vendor/google.golang.org/api/transport/http/default_transport_go113.go new file mode 100644 index 000000000..924f2704d --- /dev/null +++ b/vendor/google.golang.org/api/transport/http/default_transport_go113.go @@ -0,0 +1,20 @@ +// Copyright 2020 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.13 + +package http + +import "net/http" + +// clonedTransport returns the given RoundTripper as a cloned *http.Transport. +// It returns nil if the RoundTripper can't be cloned or coerced to +// *http.Transport. +func clonedTransport(rt http.RoundTripper) *http.Transport { + t, ok := rt.(*http.Transport) + if !ok { + return nil + } + return t.Clone() +} diff --git a/vendor/google.golang.org/api/transport/http/default_transport_not_go113.go b/vendor/google.golang.org/api/transport/http/default_transport_not_go113.go new file mode 100644 index 000000000..3cb16c6cb --- /dev/null +++ b/vendor/google.golang.org/api/transport/http/default_transport_not_go113.go @@ -0,0 +1,15 @@ +// Copyright 2020 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.13 + +package http + +import "net/http" + +// clonedTransport returns the given RoundTripper as a cloned *http.Transport. +// For versions of Go <1.13, this is not supported, so return nil. +func clonedTransport(rt http.RoundTripper) *http.Transport { + return nil +} diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index 075ef8754..445030141 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -11,9 +11,12 @@ import ( "context" "crypto/tls" "errors" + "net" "net/http" "net/url" + "os" "strings" + "time" "go.opencensus.io/plugin/ochttp" "golang.org/x/oauth2" @@ -24,6 +27,12 @@ import ( "google.golang.org/api/transport/http/internal/propagation" ) +const ( + mTLSModeAlways = "always" + mTLSModeNever = "never" + mTLSModeAuto = "auto" +) + // NewClient returns an HTTP client for use communicating with a Google cloud // service, configured with the given ClientOptions. It also returns the endpoint // for the service as specified in the options. @@ -155,23 +164,49 @@ var appengineUrlfetchHook func(context.Context) http.RoundTripper // defaultBaseTransport returns the base HTTP transport. // On App Engine, this is urlfetch.Transport. -// If TLSCertificate is available, return a custom Transport with TLSClientConfig. -// Otherwise, return http.DefaultTransport. +// Otherwise, use a default transport, taking most defaults from +// http.DefaultTransport. +// If TLSCertificate is available, set TLSClientConfig as well. func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source) http.RoundTripper { if appengineUrlfetchHook != nil { return appengineUrlfetchHook(ctx) } + // Copy http.DefaultTransport except for MaxIdleConnsPerHost setting, + // which is increased due to reported performance issues under load in the GCS + // client. Transport.Clone is only available in Go 1.13 and up. + trans := clonedTransport(http.DefaultTransport) + if trans == nil { + trans = fallbackBaseTransport() + } + trans.MaxIdleConnsPerHost = 100 + if clientCertSource != nil { - // TODO (cbro): copy default transport settings from http.DefaultTransport - return &http.Transport{ - TLSClientConfig: &tls.Config{ - GetClientCertificate: clientCertSource, - }, + trans.TLSClientConfig = &tls.Config{ + GetClientCertificate: clientCertSource, } } - return http.DefaultTransport + return trans +} + +// fallbackBaseTransport is used in