From a395e4f7e0370a5781148a8a4cd0cbc3eb4c37be Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 9 Nov 2022 11:46:44 -0500 Subject: [PATCH 001/123] Update Jackson to 2.14.0 (#258) (#259) Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9534bde8ab..293aee3724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 +- Update Jackson to 2.14.0 ([#259](https://github.com/opensearch-project/opensearch-java/pull/259)) ### Changed - Update literature around changelog contributions in CONTRIBUTING.md ([#242](https://github.com/opensearch-project/opensearch-java/pull/242)) diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 307c75393b..b5fbe4390a 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -138,8 +138,8 @@ val integrationTest = task("integrationTest") { dependencies { val opensearchVersion = "2.3.0" - val jacksonVersion = "2.13.4" - val jacksonDatabindVersion = "2.13.4.2" + val jacksonVersion = "2.14.0" + val jacksonDatabindVersion = "2.14.0" // Apache 2.0 implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) From bfe19982c4e5eb18d1a4afbc03509fde52c27f2e Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Thu, 5 Jan 2023 09:38:26 -0500 Subject: [PATCH 002/123] Update Gradle to 7.6 (#309) (#311) Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko --- CHANGELOG.md | 1 + gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 61574 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- gradlew | 299 +++++++++++++---------- gradlew.bat | 34 +-- 5 files changed, 178 insertions(+), 160 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 293aee3724..c1db5c195c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add support to parse sub-aggregations from filter/nested aggregations ([#234](https://github.com/opensearch-project/opensearch-java/pull/234)) - Add timeout and throttle to the jenkins workflows ([#231](https://github.com/opensearch-project/opensearch-java/pull/231)) - Updating maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) +- Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) ### Deprecated diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..943f0cbfa754578e88a3dae77fce6e3dea56edbf 100644 GIT binary patch delta 36900 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

yHlr~Qj z%`kgh<2P>C>fTYE?E#Zh!{+2Qw=75K)1B;8ZJ3zCdDjI$qG`W%*$ojvA?sB=lZvgK zCFeTxA=XpCI{8fHWVEwdoN>)8KI3>wS1$ku!D@vDi!H##`d8bvA;7sf3*MOzNT&#^ z6;g_U-7z1Ji^{Am0x$ju^_X3VOn#pQQ_u;Ery^^ukw>}3FKln<4!Fg-PrZajr)_E1<>}I=v!q+(^ic#+0V+3yx3Z0nrya_ z9ic5(Ikj|7NP?0XaV4ST+E6HsCdv`M=q3j>e)^RmxA|<+tdj)5`<9`iZFSU6^%l5* zuUeaN*&D0)#-8)Fe8S>ey88ImsV>hoi8l7tzto01!b%xWUi?smIhTFWrN(* z72BPsG2KQLsTev>OM7u4F?%B<)XaC6+c>m+gLJt14bLXKdsoBql`8Ch7U`e5&WtBI z{7_XNoZW&^y+%(!etb)eRFCFwWNp11VzQfYOez$uKK4HTM0Tqzw##t8%t{NA6gj9W zKr&BClpUjOKiNRO!TZ#1dGtT= zB`TCkrZO!<(Z~t%LVQWIwqm8~$~fG4edEMFghmK%DbN7NvY2B^SOBG4jSsoeU9}I8 z@8tTrx#)0!Xk0e)MZ`Fi?_`7re_2^HlZb*ubafpShf`3ZQHVytq3Y_Yy!VIl$x_mk z4=1NlMp^cA)$r!Ekfy3uHS+39uf5rJpqII8@)&kPvu8s|XKlfWi*nPacSu_ocf{qc z+xaIq-h_5~osS{9#FPQ&ab=Z9DCd27WKnP7`JEqNIt4Mih~u8SY>LJssztE)gH8&1 zo7?yh*HL<>%aIbkUB;2UVY6-5xHtskHxzkB=KL#I`rI|7FOR8h83?)nmh`T}qu5h% zQWjOGpb_k!((<5@6aw=PODD3#6s27RkYmVFX7bHtkAD_PHnK>4bo@4=f40un2ISaZ zT*dnU7O4-Dn}eO`yK#}wA`O{eMAJn8;TFq&{Vj>EwfS1;EX%&RCIj(z_&GnYOCG*= zwdURH4UVPWsV0Lc#x`s1unv=`3@^@^dnq>ruZX5Nx190n~xHjIs1bmta%p3XQ;HW;dWus-?1PTxQh) zTo&#LVZXaVb-7~QO>QaTsjo9s|JE5c@9J1V{ndcBAc|v8VreFNW38yh^~0^ z0b;Cn#MZ0x-y<`c!rvJ&GLS)L$Mi~j!FC?X^IYlY~!7^!u=K`S0asx?9WJ`VOnME#>b-Xb@JrQG- zr5(}9i1&C=%^H_Ir3HO~9k{JaV}g?f_~p{Avg8mkb53wO!3WfW>>Wz1=%~{p^gcbW zKS!c|wH)MPm1XM06~_X-U>V7%5x}_>GOUo5M0~&DJ&YVY1tkdWOzZo_G^87HWV^JUE$HO3acF-XQ z+MH^-f^k$^xO}KuQ=&*qC}otWrr=C6BX_8~NKU4eX}OjoV4!&HCUn?2Bv4W`bMK@xJVgK%Up<|o zBI0#8S^-@%7*f5za7q*^w2;)zZmZru;SI7)F(0tJL5+UVAZg=|vfGSk$631oW1Ut^ z1_L6E*=(dzpt-5w0=T$QdW{hNfA|H7-D2&%m-u0XU)OVLJ&a5?T|?A!4O2Ucm%5Q9Qea6=O|vm?(voLlGudNwwm}k{+C`LbTmF=T z5rS3bW*+k13AaxniDC5b;o$6Rk=33KK+@qxqhe|?zt%m1$`}STyM7B z21-TZyt3Ga)$UF!(yzp{>Eps~TVLqdG1#n=M6lV0(P~-8o`^^y@=&2rLAn#nVm05f zaY~j-$-G$RtY3~A{LO&9Km@;LC*E5l@FrYm{^ zKJAg#f$PL%jYUBr)Hir5sGn@)={bU`+9f(d)>5!kp?iSJ25sX;KKaYZP$%Zn-;o1N z7;s0u&geOrpsh$p8QBw*A;N~N(pucAB1R7zW}POLuaIgf<@Ep*VCs`>W9Elsw`f%_ zk%{y$3mGxospU5L;HOsQI<7D$T3hZG^lM=`-#YbXg4t(pVt@h&J$w7NE7M+6eqof~ zDc!?A3%@=~jpoWA85f3mg#AW=s7u-qAf1MCP+JNKRdNTIZBe0WyQN97 zUtvi7c!Os|Rv_yPpq#vZ0UJ7`S;RH{d+HAtoL+JM#w^-owJ!-YvHZXmtJIbw4C+Kq z6jyD#gP8qhnPn5UEPPGeQcgj~S$0tFV8ML>^23b4x4n@>@VD!cNUpccQAU3*2Z3j# z+8+KxiX;S7f+bp%6hkBjXf7w@*8mNmaqy2M9u>VIB1Myn7xyq~Y_{O)xyraKctQH0 z?~NBFTNp<88^%1VKj*ZV2x5|XF*`l`Wp3_n_kO?DMgU~)xal9O1Y#BKn#5XLWJwqy z1)@^#BKt4hXk4}1D<|sr1QPp@;zSZ#6}jh1OHJfIO@$7d^_3D|Kpt4=GM)tImtJT> zgU9nNvxw6~6*6xbEY0SloDTm%7QL2yayPX5lwXp9tK%8JqSy63_6^)TkzL%3o} zc-?8@C?-^{(v{JP)I2^IH}&v*o5VO0I(I^@-Yw_!g*V8!%n(y&3r z_V%_g!9~|ZlYbCz%)}y)f8MQhMNp5!Cz%d*w6cwk=1D~2aYQg{F1eC13byfgd#)G< zEZz@&Y;tD3-*U4P0k6T~v7Q*oRCZvF-o`k`=vfVJn$9^3*kGB)?_)c?j}cG{U1-JO zyXb{>^n)efW_trzrdtwxS$Enxp4}g3lKV;0=o9npPXnMaaz zS3vrg8MfvefljB-XdU2Mwob`m%S_oOr_#1o`Mak!=}#fUxQB)as+A^>;-#>>1uZN{ zs+NoDCKaz6?9|~)u+hAZckk&uk&aH%tHgQR@6yW56xoFaxTeH^$+E8^*Y$Fkft7kl z%dYE1_7)v)qKR!c@RmB3o914w-S!^!A(g^QV@ex`XOM%CEv*1&3EvAp-B{wGS)2)) zZ$$I$Eg0S$q@ileW6b@YEtB{t^`TWt3sGTs_fuJzE41v9@Ia&Nz4ozqe)O{aJ72J@ zm*fK$Fftpa;g1*98=yQE+E=em`>XU-lqMPTT)qp*0j_8$RRbnc1owJl4Q#e;ms)|9 z2Xp*v>&$32XHtM3SxouMyghcezJH^W zIFx)fU|kyWBy}VOPVyC6DiNtA^qd5^Gs}Kw_~%XPBTWhcgNxh|b%gvDyoL;<3B$x=6@kASCN-9KVH$I;`3F?2+8j2rri z(6i_VCTT$HUTt}5V)PzJw!QWz46ZM0m3O@K1nQ>PuK2zLXl{|fBZ~(R1Ja~4$>MeT z<1j_9gbRWbmDHv~;6sXqHzuW+f^^@$Dpfi?zl1495W^E9U5P}ohPFMQGYGQcE=ii9 z3@A&KQtA+QYNI!E`@msN(Ts%37irtKZTr zcJTpy2?z06PMxVAXO3&Mf1AB7r-nWAqw+m_f4q$87#k) z6Tfl)mrG?cb(OZ<57m7A<6|wJWQ2y7gn$o`q&}>ndr&jcYTajGI zj0#HtKCeFWyGdRW7oOQvZGo{jZXxQ&+2l}zNDl}h z=t}ue@=MPpb{@pAWEi|wV4WvV&8J?AmmZU5HU=+xOOGY<1pbx} z<^0(d?6zBR10*GO%Q5$>S+2rI2J^wUt>>@A*qFCEfJ}2ls=3dj_0{^nwx!g~K>=6e zWs{OwSijrMBXLn3CI+x|A^tf)mF!mF${J6CzrURVzBimNA_xbU#eUqPinfVmORr4< z6qZjPf-*~ajJ^X|Obn(UuyUH1Vsm!uA0dut0B0@DQ3`%8A15y4G2KhPYWMC2#X~mx z#0Ri6&uda3+5G8*=n$(0bC*;TPqRnRjLVL;@fo}<->3AZjPwc{#0NA_Zn1#gfdT?1 zYq|6&GN6#^?(de2X<@tA7p;Uq8)zO)QmpB(~UT3Tfd@q&lr&dVTkzz z{ZB;lxlo>+|5+^{M*;%k`=7#_J-|(xqrn4IH;dJv)6m0C#KRY}xSB5p;#_rwM@lL= zh&W>KDp&vY+CumaJ$d2q;5_ePNh-Dlwt78Gd*0b{e|{tbeB3{_0cqccM0;(K75#FT zX_pYEVoyd9Juo9-aMVZcK8@~_5@rtk1r-`CwoY3Ftn-o_X;=?TPAiU`s1)V>x|9m| zJ6S&J07}AayiRR`b9IpQZnhN-fq6RsiEljq1icj)=IJRqSmg7GX&|5y}w+=U&V@wtyFqN1aaCU{7LusiK zW&i=rjQYp@D^Cq?RoSYwvC+DTy}G4Xk7Q-hjFWylUpaoSYI z&>g2q$0|K^liVTSFI1oAs$xGjBjXm%7q|ePMrbu>gp%)UAg0r|s+CDBzLFk5Q(N-J zy7~7S2-67y)=BLVdkLG#w}#yF`)(f^m7HvDB6Y)#VkxNe3|dzw?|LURBb2?+>{ack z2_;=D{FZL}kD}qWO>BsH7vGzDnktf}wtz`SQ&OjQ(D5NHRgHc75KAm&m@>C_#k369 zr0x{n{AG(!1*M2SCrh5^SrP`|l8}b9o6smM7z51j{rg1M@xn}BKh;KWa*A1B+f!?H z3c7a4%7HNKS=)-I*1+DuudI|%wbe1=enkeFe#8vA&{BOq zumn1_KyAQDxA3ocHBxwvc8)A^^&jlDpmKVI+AL+4x;H)L8lC;+3Md(XyXumYn#N{f zRc3{GVq1o`3ccr=-B$IOR8!h5bXA+oK-D^3edD(3;{cJnPO2>40T8N<7LCF zs1n%wZE0{DYIlq~YIhW18yfyEAK0}s>7ULesZzTTQ zL)SiCRG&fkZ`3@g7hOR*bzW%rz54zVi**z*?J}*Ir0`=@f3}%&I!M;p;!?2RWown? za3_`3ODncBEjHLMBQVXxSlInzu|fR_mI&{&##0LDGGk*r#K%Sd|{b3l))N z*=_TwbRdE(IpOQ@+~lpdpG>Wq<*VPp65tkF~I&r-rK2T ze5ag!qh}8VOin*$e^_&;jf^U(1-cGfUJ>nUo@*(I?D%_NBytL7_Qh#CBHHeYxJ1VB z!c_X6X~B5aL$4*-Rh{7qPk_Ok`G9bP*m8LM0g;i+WeshTV9FzlOLAt6)EZOVp3~<) znKvafZ+hK#R*e!-9Kpyn9I-%!)W6(=PVs+mfhukREY3zkiSP#aM4|Iwq{zWo? z0G6k3dANxSFaY?z+n~iS%bwiJ$r`A-Gzx)ix%%4&SZv@u zSypcZ;O=uCN7^Hz?5d~&`uX-HqQmp*Wj>;nZee;7{e~QGdHj$8e>EHj?=_Nr8l&!7 zv-Wi(4-Pxp`p?RpP;55My%=Db{8vl<4f3S}05C@QxVym#Eh&uM|jG8R1P&8hDniW$T*;Zu{xc3 zg>KJNcpGE?u=FB~95RgI2PBYuyVW}VO9p%@@hW@M+3%#`GOw@C4$Sy#66>)wuJNE8PNQ{8S^7ddoadRBf)RbmxSCU3#$; zL%W1hV++9DCkw-t9(zPhA#qdLE{AB+OytP@kbEeg1fFoUi?CDh{h!|?5>4znLJBwI zF2uIeHQuqIe=`ZUEPe#{O72X}2-Db2XmcNX2v)s5HwoM_HY^SD?19gsGd7>pZ){Sl@N%ey z2}Uag$*6e%_1qKU1co1Rr^xT%X`y4KyRAVWZ-gAF?1H9+eq0NwKn5z>qFt`&koghB zACn50u5e%Ld)7{b*6o3XKe%uwjsqw2slnM6sCmr&hF=hcU6_=z*TV09kk1oiX23)2 zc8tSRQWR9ecV^LHf4z+YrNByY55fxac${Qg3ntuRv2@{-&X)UuTqL20#s4a*|;( zJ%Z5~fu6ss4Wcblpc3Z1{4f4X6;y`5@~5JQe=7R_b#J?DWQ4_z`|YI3?7EX=#Z+?J zGJgcAdK{?G#Lx-|!NjQTamJEJ+35hoJ)Fqn74wYL?rW-E(G}w+x*@SpU`f=dvNV+C z;U?-rN&~K;!F#M(TeT^)o2KKbxJnGmV0CQMfeZD}3LOqJf6fV}kwuohtvWg~@K51& z-}B>7&8Awrd0-Ll2W|{sZ=pp@S1ObmrOwtZ*{VuCMyufNV3To!IH+|s7oPw*NE!4Z zZxgK+Tu+nm7`@sX2lyi`uAA&5zk|AJrP@RKX`OpAPW4pezFL1Ll6CvS4k`9NMD`tr zfVce%X{4a->Sg`PCYl!0Bi}+RPUUS!v~mm5J%!8!+IRCnLVHkd=L(X>_i zr5n|!=~Ql;r*q?<`1OsIi)Z$ayB#HT){Ow~FoI+rWG1hRdy-MQ9u2Op9jyUPJ0)&TwKk0O zi3M{d;slF`;72|n70KBicfm*nMA$$>SdG%bkV~116mA19PiREGP8fR%Ut058kxjI! z?17|HM&UkIkqcPbb0C*F%aBMXV6gAgQKmAgs(CMg<6$Dblp_Ooc)SZDxs>$#$Rk+v zBnS5w`E@bW=XprvmHYth4Gz&=q8VnWjIkY(j) z5s~e}I`5PxXyKwbRBC<54Yx%SPKhdcE7DU>cI3kJSQ@0)?*%5YaLyVQQl}!lsP+Fv zdZm;7o$mT6(#oGA<@lMF*gIJ;SU4G(+9cVcA^rC|cb5%3>6}vn?0dA_Af}0(D+U=zJF5eN_v=l|T*|8?+ZR8$Ems##)6X*iD%+gdgnlAIF!TchtaXlfs{i_e@McHfOjwmNinCu7t7Z0Gk%BiJKKQgc61+ zZP0d)r*5w{)EgEGe-*QFYV(7njrVG;x&^@L^7#i?L}5OByT5Fv@L$(0@{nrpcHOqJ zriCJn(25bJrkk&YSy}H{u>DKvNw{plOphymr?5TNipNw8X0%#HJ(S2f%&z-jR3q_sNTq1s%7&0Gt$P|xgVrQ~g9SOUti{HV&WvrH5L=c3Rtfw~*+qmFb27ivH= zfbRGyOrx9V%(8thJ~HUIAru0ZVNTWE-Op?T=V+-K(TwOA)5#*jN|Aa8wXINSK$E(I1wHAqAG!Fu~{$uvNxWtKljP z5?62fmwOZwlgnTrJ#-AV#QD~I`~xs#u)XDW@sfNtZe8e&a8`RF_WnqDY=qn6d_Wgk z0G~wHT}Cs912@ym)IT$|yg_Ag7>F;HJ!Am4-%F%0^`ylpiJi2iyuu z8)907bo$J<+}x4CMj;e_f)UN|!7DvbKUFZZ0+amRg9VnP9dh zQ4CL;xtnjE1abNr*g!DP4xfPhn_&Zs4r0E~_~A7FdU=3;go3mTKVXD)V#sp8)kC+W z58UjoMx210{7Nj!U#!YOHWPx;Ew0L%7>go4QLZ?;{6n0^Bjv6Vcq5x0UwDHDFLsxC z%cc{TLv%>AiU`|oGBjKdK8Z`xRJlE*g56y8%ueEz#2f`#TS$KrSp3Kb75foSH&C9X zz<~S_<3Ae}3n9nG~F~j_GCFNUAKv= z)R(&ciL5mJZo$Hcg(^T2Q}0GCC3?;6yr;l%)^qQ(t9hS~_cu~MvAWBHiFg=22AtQ1ul!T8?^=_u=ziBoscx#)IMjB~#4BzI$`c&p8+uK#8UVZD_*3W#jboPlb6h zN7^2BPwblV4VBZPb1dZU9KNJ0D&*hqAj=pRz!Ag+ zNw(C5qA_D)rklIcI_7xQNQG=P+^??H*L`iuCq74zV7ca{6U&+O_iDwMCjti*v~zTjmCt7 z;=T8z7`&v$Su@8#n{c9a2Y=5cUG2S^{;fnX{_9){ScC~36hNO`x@ENzFVmN#?8cyW zQ4>H$qKLXKc2QfyFgm@Pa$`_5v8Wy%ch4!f=Gr!7Msh0VA$5IJ^$b(Y3}*mIBSFLS zjqVmiUd8EQxs~GVjW;PHpi+qCnL!cWfngxTDj3y1f{m?59!JdzAuq^&(QwI|wqh>3 z+;=nwv}=hF#fJrSBffj>@XB0M#Z!&ra5dJ;tXt6@d#)}>*!uWMmwzK<8a@X(v$^bg zy)AQ?GuraWA)()aR^3wDT(#+-Yl~eJ*cj#2w@usd{^`5Kg`3?n66MtNyA1xbzgNpD z6B}re9&YJT*|&2}4Bj-^rw;$tXn2a|?+`=+2%~G5x%%?Ijllz97jWj5B12tgAO~u# z@}H1ajE$hSK}m$yz{>1YoA3#HeZ-#8mTgK9M9y6A3SmP;sXdUF^})!>rr7FIU5hm7 zt)tnLrYZ_a!xO;h%2O!I2=@DFp;VjC40lxxizzsa(#PG{G!Ibh!; zqJv{N`rq0JhZ#+{?H^>e{z+vN_#b3u6xV=C!7+g0u-iIiXo?rF0ER;>;)6i{323sR z`e7me??G??y@`#HvvZD?m7(rP!k2Vr28WkdtJy{)pP|hj$iGyk*7_qAejqFv_SA+1 zglSE$L~;DN@C>9@PT}@Jq*%mQLlocu!!Xdm4pW$b4Y~F~=&&MRx^vHCHv)m9-UxIy~ONLQl-w}Z^G5B}mm}VmcJ(Ck040Km z^ais%LteX4umg2>GT{YD6=L+rW`?M%Q|Qsa2us-{*T9LXK*uJ2WDb&BMPiqT3^`H& zWqrre>nw&Wr$8eg@-|ij#u})JBg<+sB)P2Is`Hq$LVc?c;~%p(U?C+DO8k@6r{8+j z+uDV6uC`Dt=5wQLR_M_!=CjZv`w^vAw#(KMjEmC0WM*0|r>8U5Oid<#x$*=tv6$@2 z1%5jW}YtyNbUY`3>G)EbTas9|0It=4F6QbJar!|EefU&#j#t}r!iZ>jZ= zr{}9Dyap;M>1>qnNnsT&mg5BK6;D`0w@3s=Tw&7bCUkW6e__Fk|EaS5b*~|2a=CKZ zU}(KwZ3h)riMOd9LR?yN@gbJX#f=Fs;m#iHmQfSi1v>f0wCXeJ>1a01iiXDo__uba z$lFe5vl!6}Rv<~)AQ`WtJn8&E8`YXA4Y*of?=i{3(kX)k3#lrk8@PEhq%HR2Ny-(K z2v02Y3F&NYs;F+0i2=1pwZXQrw`v8As$r9ZCp&C|{V3+5Hx8GgacfDRnBO2y*GUvt zo4Z$zM6l->QeMBUHhhW~m&ZW`oFwnFkkmxm;>+>{5oSiS9w}lxl9A5a6fRBRxIWFo zQA3$*%Nn7&n9*E25!->EqZcK)s)=N!S*^EE`=6dkgNI~|=?UwC-9SQHZ_J|BYqE7H z*8g6=7~&qD0HG2NcL1i;$H0P3Wcx;LM@guRi?26LU(rqi&WfNkVplloB-B;0}m<}+~i=cE-p+n|TXh3#Mm%z&Ug}vODE}%L+ zHA%v#J6ch<%NeHE11u3)70N?xHC;7wc(cJmICL%Q%Wk&kfpgt}00>ZeN|ju#3%dku z+)^b2o)VRe3J4wTX%C-2*%>TgOERJ20m}LdTwUhy4zp_67O-K?idqS%ObQV<41`&} zS^wk~t~6n+NkYaCz@;jconW^jbzryrap1P9#dilTMau)|W}!xT+GEJ+LYpJ4{(847 zDDt9Sz$XqgGZo7L{&WPnl!vzI&cv_9Si6?B^RR8$Nou-bA}5p+={YeWk-gu*MnDZQ zmNhQM2fM&fhix(S+^FK{39r{wZ@KIZ(jA3fB)1cF6_3Ts95IW~r_n&-kwqPpz>f@8 zGK=&QX;2s1V>_kj%6T-et~6?o*tUnLMYCvhlvGAL=7H-1CeCfdXwhS^oMM!{KK?dC zhUln`LSA;N*RmYyIQ0;5P)cl3YG67g`E15#9sL%u8@LSJqHe>w!y}`9-vS?LBx;*- z*V63hFOH1CV4ii=n`ZT_4O|M-LWkp}NVdLKoXH8@B6FvRaj9o%+_rHAj??0j-P?%6 z6zQdSHceLsU_|{y%rLW%Qb)pd2LTvO+jJTHiM$W>MS2;YEuHcLIF2AfxAI1EfvrXG z759!a@bmB|!ntvN!M*-$(TxY)AwFl=;Vr~rirwxTj~I>*QICvvnB3Uu zz$*=u8cEZ}iVyOQ&@D(3V@4`2)W#YH9}f%DjnLuoHlT-UX5UskHFnmpRQ56(UJk7t zI{qZ#(uk3#+UWbd9@kEt4<>t$lrEP${Y!0B7RimLI9nz%i6DDUB#H?2;h)1%9*)po z9Exy%c5gLYT?6F6LIf+^i085J(&9as64>!u2yB6&8Ju`B6UF6Bo&wGF_-Ana67(axgbJ{ET9OESa1Ez60$&?0iMij*+#C10&6I)I}3q1;r1d zu9|;A)$%Lm^!lu$UD#FRTYK%NaYuQ$|Dgo_ zfLdnPa?l@SBPjqI8Khh;GnwiLc$fLI2rNys8Yo1V~= zm0iOL`g%uq1{UvSgQfdgX#AftM!tV5X~1X}ETQthDTtc{Nj(2)S@YYeW55Hz8X5Uq zu;aa~;$|fc-n&BX)|^;&kYUIK{9G$2zH~8?!p=Z<-I~UP4--J5;DnA~>moS-o!j=l zw)K`DTYf#CaD!t%AVJ?XZclSMwbJeQZ3qMk?OJ$-H!bwMKH{+IQOc@4jdEq;cEfi$IlJ9ddzYtFQGcWZ83btpIhaB}+pK_;p}IEa8uR zIf`GqJJk^O`TRP@!HZTjzr|r`%s=Asmaw*k(9>~Yb@)JJ-~crGE86mOZ2Y(pn#*4) z=E#@wFU%my&4W?1VOw{tct~L1V7j)wS^s8KL)TG*e_MSy#(`T=KEXj2+P~mYUnhbx zkRDDe4tZj;ewqCwZ>EM-0LIPZJ}R=Ve4rG%kXpY^eLY5!wGX=)5>+Hx4f;Ir$5F@l zK3|HgMUqwIh)bo|zgzBNRGgbPWtXJ9;blHb;zw5HYau^@(tApI?*LlT%15dukY4`j z@q(^VDlL8s2^pU5qw(4mTIrdB?#f02GE`M<&DAI;G2NXg=oN)(z$3&*Px)5Npud0> zz1o1>@6O5vog|IqGF|mg!sA8iFJ(8hwet*OSBc_WWUUns+uRGDuYG>nQu@T&+NNHF zrLaXAq_fq88JjJ48*?)T`MPy`vGB+;3Z;Q3URgtASuvFJdUzT~{>?{7W02MZ;D>xH z4P%leLlhHR7W`3k0B;P;?b>>z!2xl%%;a-DTwW2_*a9_);iO0N1eIl)v5O=X_mQkk z8hNl8ikl=w;bI7V2QbEzT=<0k@R8D&A2`nu*TeW!yXwv`$DxQW6`-H(4y!gv;J}M3 z6vx>qJ(c>2V8rtLXb8bUV6%%6>qi!f%NMP*nk_y9>z&dGSa-p8&kBUNMRbWUVe%7= z<^A0dpR1H;fQib!W)>! z$Wb=={zAnzGh#B~(pK&_x^R%KtOAcavllH4T{C?T>ooObQ7~Vl`qj#cx`@jX zOjAp28XwL>xi61_q`}0V+aMO6_TwY9S$%U1WX_h%p^jg9d${Tm)h(6_kufQ@qt((I zX)2$a5X3({I}mE!6aBuc_Fxp7->?Wy6kX@SST0TkP!VI8-E#j3Y7EfK9aI7S+@m;_ z+pm~0H5h8=j63NLIO$EWD1FG0o1rL}=bE{HS(AZ%pyX50?8JhgqkUvSdAp&dlg};S zTbjdi4OQ9WnpJ$TI$gfW4n5g`-o6DZ#Zzi}M=&AIfZqe#B`lL%j&V}@{7?#esBh~7b9gkx}G zi}TJ2Orz~&E8dvGy>TQM5|)hV(hW}oLRW()lAf>WPZ>w&Ft)5b6QND{-3VSJsPS!4&eILoa8y> zF^rq?+#14qbZA2ADAAf^IW3_{LsA(@Lzd}wiX4wxztrw}ZSCx8dXP{#r@BOmN>tl( zjWJ9zCMIpt1N)mB+Pn9k-}n2Q&-Z)popbN~4c*<4qQA*Qwdpx=`=ar`MyjA)=TPVj(d-n08Z;$`OZaF0^yEZ&JDd+g%Zn=l$&+uh@K{Pw$6<)HL^Gt>_MJCo8fd|H80eCo5~iE+~0ScyWCJ* z!+v&WM_=34an9!x+DU;UjWraLi%E)4b$r$(3B9xtb^*Gg1;hEmqH>TE>f%mBYQN8g`;?eizdzJqapW8M zn0Iws_;WqzB4Jj?b(+qAo&8K$EMY)B#cE(R6LzE-A<+;D6;2>e6ILnQu+*CHdRJ6^ z`4q*gd{CBZ>JZ`lIfyrh3kTe=(gWvToJ1L^3-n+?Av^HRxS#0CfiG z7-h-VX;gjV!M>BQE({xF0p~DMEgD=3B%4UFzQG3S4za+E$VpWfh7UObtr${Ow$6vd z5FPuv)&klHyc#S}u`o*OI)yRX^@W)|+c$+5oxCRj@}&%Hx;+cARurBufTy)> zpjj6Svp-T84nJaaovD+G@cP5(M=RLg&A`+>VFBnNB2X7Tdx}7# z2tS)mLPumYXeYD5)ZHzoPzco)J#8)&kdrqFT4H2N0rHltjfz?*(8{AEq>|au$ns*i zu*V4ed<;$cL17Oaqm+J9EZ3eOE!%qRX=Kd|oIsX)O36u&UOS9Zc0jRAItd%x7ejHc zE%yJk?-VD(Q$z^zAg_Uv=A9zYD8dhy!w&W`Nc7TaWRe$_$&J7vG3j2N+m*|WX=I+P z;H443&rQzTVq{hV{b^UwyX;Ky$gd=C;Ki!BYOfe2KurOgsz}gjwK)k=0@M_6yas`m zFtN`GY;1;#@I~-W9}DpABheC?zFG>hAHbkjF(Bd*L>*Sf>jP*g1+M;bxN7*L*VE~- GTKgBj+ffbx diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 788d8e5179..bae4d14379 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -28,7 +28,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4 +distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b diff --git a/gradlew b/gradlew index e5053f218f..65dcd68d65 100755 --- a/gradlew +++ b/gradlew @@ -1,33 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# SPDX-License-Identifier: Apache-2.0 -# -# The OpenSearch Contributors require contributions made to -# this file be licensed under the Apache-2.0 license or a -# compatible open source license. -# -# -# Licensed to Elasticsearch B.V. under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch B.V. licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,72 +16,102 @@ # limitations under the License. # -# Modifications Copyright OpenSearch Contributors. See -# GitHub history for details. - - ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -117,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -128,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -136,80 +140,105 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index a9f778a7a9..6689b85bee 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +55,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,21 +65,6 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line @@ -86,17 +72,19 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal From d377766567810e173fb7f8d0f89c924704f72e69 Mon Sep 17 00:00:00 2001 From: Siva Date: Sat, 7 Jan 2023 04:13:31 +0530 Subject: [PATCH 003/123] [Backport] [2.x] Fix: Make ChildrenAggregate as a SingleBucketAggregate (#306) (#313) Signed-off-by: Siva Signed-off-by: Siva --- CHANGELOG.md | 1 + .../aggregations/ChildrenAggregate.java | 8 +- .../aggregations/ChildrenAggregateBucket.java | 103 ------------------ .../opensearch/integTest/RequestTest.java | 65 +++++++++++ 4 files changed, 69 insertions(+), 108 deletions(-) delete mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregateBucket.java diff --git a/CHANGELOG.md b/CHANGELOG.md index c1db5c195c..697cc763cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Removed ### Fixed +- Make ChildrenAggregate as a SingleBucketAggregate ([#306](https://github.com/opensearch-project/opensearch-java/pull/306)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java index 6c456b0ecd..d38c40004c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java @@ -47,7 +47,7 @@ // typedef: _types.aggregations.ChildrenAggregate @JsonpDeserializable -public class ChildrenAggregate extends MultiBucketAggregateBase implements AggregateVariant { +public class ChildrenAggregate extends SingleBucketAggregateBase implements AggregateVariant { // --------------------------------------------------------------------------------------------- private ChildrenAggregate(Builder builder) { @@ -73,7 +73,7 @@ public Aggregate.Kind _aggregateKind() { * Builder for {@link ChildrenAggregate}. */ - public static class Builder extends MultiBucketAggregateBase.AbstractBuilder + public static class Builder extends SingleBucketAggregateBase.AbstractBuilder implements ObjectBuilder { @Override @@ -89,7 +89,6 @@ protected Builder self() { */ public ChildrenAggregate build() { _checkSingleUse(); - super.tBucketSerializer(null); return new ChildrenAggregate(this); } @@ -104,8 +103,7 @@ public ChildrenAggregate build() { .lazy(Builder::new, ChildrenAggregate::setupChildrenAggregateDeserializer); protected static void setupChildrenAggregateDeserializer(ObjectDeserializer op) { - MultiBucketAggregateBase.setupMultiBucketAggregateBaseDeserializer(op, ChildrenAggregateBucket._DESERIALIZER); - + SingleBucketAggregateBase.setupSingleBucketAggregateBaseDeserializer(op); } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregateBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregateBucket.java deleted file mode 100644 index 65b75cd29d..0000000000 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregateBucket.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package org.opensearch.client.opensearch._types.aggregations; - -import org.opensearch.client.json.JsonpDeserializable; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.ObjectBuilderDeserializer; -import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ObjectBuilder; - -import java.util.function.Function; - -// typedef: _types.aggregations.ChildrenAggregateBucket - -@JsonpDeserializable -public class ChildrenAggregateBucket extends MultiBucketBase { - // --------------------------------------------------------------------------------------------- - - private ChildrenAggregateBucket(Builder builder) { - super(builder); - - } - - public static ChildrenAggregateBucket of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ChildrenAggregateBucket}. - */ - - public static class Builder extends MultiBucketBase.AbstractBuilder - implements - ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ChildrenAggregateBucket}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ChildrenAggregateBucket build() { - _checkSingleUse(); - - return new ChildrenAggregateBucket(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ChildrenAggregateBucket} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, ChildrenAggregateBucket::setupChildrenAggregateBucketDeserializer); - - protected static void setupChildrenAggregateBucketDeserializer( - ObjectDeserializer op) { - setupMultiBucketBaseDeserializer(op); - - } - -} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java index 4d6ae2d739..4196884453 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java @@ -374,6 +374,27 @@ public void testSubAggregation() throws IOException { } + @Test + public void testChildAggregation() throws IOException { + + String index = "test_child"; + String question = "question"; + String answer = "answer"; + + highLevelClient().indices().create(c -> c.index(index).mappings(m -> m.properties("join", p -> p + .join(j -> j.relations(Collections.singletonMap(question, Collections.singletonList(answer))))))); + highLevelClient().index(i -> i.index(index).id("1").document(new Question("exists")).refresh(Refresh.True)); + highLevelClient().index(i -> i.index(index).id("2").routing("1").document(new Answer("true", "1")).refresh(Refresh.True)); + highLevelClient().index(i -> i.index(index).id("3").routing("1").document(new Answer("false", "1")).refresh(Refresh.True)); + + SearchRequest searchRequest = SearchRequest.of(r -> r.index(index).size(0) + .aggregations(answer, a -> a.children(c -> c.type(answer)))); + + SearchResponse searchResponse = highLevelClient().search(searchRequest, Void.class); + + assertEquals(2, searchResponse.aggregations().get(answer).children().docCount()); + } + @Test public void testGetMapping() throws Exception { // See also VariantsTest.testNestedTaggedUnionWithDefaultTag() @@ -469,4 +490,48 @@ public void setPrice(double price) { this.price = price; } } + + public static class Join { + public String name; + public String parent; + + Join() {} + + Join(String name) { + this.name = name; + } + + Join(String name, String parent) { + this.name = name; + this.parent = parent; + } + } + + public static class Question { + public String title; + public Join join; + + Question() {} + + Question(String title) { + this.title = title; + this.join = new Join("question"); + } + } + + public static class Answer { + public String body; + public Join join; + + Answer() {} + + Answer(String body) { + this.body = body; + } + + Answer(String body, String parent) { + this.body = body; + this.join = new Join("answer", parent); + } + } } \ No newline at end of file From dcd5f589f903680abf8ce1ce5a13f5480043cd3e Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Thu, 12 Jan 2023 16:14:47 -0500 Subject: [PATCH 004/123] [BUG] /_nodes/stats throwing serialization error (#315) (#320) Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 10 +- .../client/opensearch/_types/PluginStats.java | 49 ---- .../opensearch/_types/SegmentsStats.java | 10 +- .../opensearch/nodes/AdaptiveSelection.java | 48 ---- .../opensearch/nodes/DataPathStats.java | 241 ------------------ .../opensearch/nodes/FileSystemTotal.java | 69 ----- .../nodes/GarbageCollectorTotal.java | 24 -- .../client/opensearch/nodes/IngestTotal.java | 52 ---- .../client/opensearch/nodes/Jvm.java | 24 -- .../client/opensearch/nodes/MemoryStats.java | 48 ++-- .../opensearch/nodes/NodeBufferPool.java | 48 ---- .../client/opensearch/nodes/Stats.java | 12 +- .../client/opensearch/nodes/Transport.java | 48 ---- .../opensearch/nodes/info/NodeInfo.java | 36 +-- .../nodes/info/NodeInfoDiscover.java | 35 ++- .../opensearch/nodes/info/NodeInfoPath.java | 7 +- .../opensearch/nodes/info/NodeInfoScript.java | 20 +- .../nodes/info/NodeInfoSettingsCluster.java | 45 ++-- .../nodes/info/NodeInfoSettingsNode.java | 9 +- .../opensearch/integTest/ClusterClientIT.java | 18 +- .../client/opensearch/integTest/CrudIT.java | 86 +++---- .../opensearch/integTest/IndicesClientIT.java | 17 +- .../client/opensearch/integTest/NodesIT.java | 25 ++ .../OpenSearchJavaClientTestCase.java | 176 +++++++++++++ ...OpenSearchRestHighLevelClientTestCase.java | 163 ------------ .../opensearch/integTest/PingAndInfoIT.java | 7 +- .../opensearch/integTest/RequestTest.java | 82 +++--- 28 files changed, 430 insertions(+), 980 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java delete mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchRestHighLevelClientTestCase.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 697cc763cf..914aaabce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Make ChildrenAggregate as a SingleBucketAggregate ([#306](https://github.com/opensearch-project/opensearch-java/pull/306)) +- Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) ### Security diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index b5fbe4390a..fc50f81adc 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -137,9 +137,9 @@ val integrationTest = task("integrationTest") { dependencies { - val opensearchVersion = "2.3.0" - val jacksonVersion = "2.14.0" - val jacksonDatabindVersion = "2.14.0" + val opensearchVersion = "2.4.1" + val jacksonVersion = "2.14.1" + val jacksonDatabindVersion = "2.14.1" // Apache 2.0 implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) @@ -172,7 +172,9 @@ dependencies { testImplementation("software.amazon.awssdk","aws-crt-client","[2.15,3.0)") testImplementation("software.amazon.awssdk","apache-client","[2.15,3.0)") testImplementation("software.amazon.awssdk","sts","[2.15,3.0)") - + testImplementation("org.apache.logging.log4j", "log4j-api","[2.17.1,3.0)") + testImplementation("org.apache.logging.log4j", "log4j-core","[2.17.1,3.0)") + // EPL-2.0 OR BSD-3-Clause // https://eclipse-ee4j.github.io/yasson/ implementation("org.eclipse", "yasson", "2.0.2") diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java index 0aca1805c0..9f9cbdc20c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java @@ -69,10 +69,6 @@ public class PluginStats implements JsonpSerializable { private final String version; - private final boolean licensed; - - private final String type; - // --------------------------------------------------------------------------------------------- private PluginStats(Builder builder) { @@ -87,8 +83,6 @@ private PluginStats(Builder builder) { this.javaVersion = ApiTypeHelper.requireNonNull(builder.javaVersion, this, "javaVersion"); this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version"); - this.licensed = ApiTypeHelper.requireNonNull(builder.licensed, this, "licensed"); - this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); } @@ -152,20 +146,6 @@ public final String version() { return this.version; } - /** - * Required - API name: {@code licensed} - */ - public final boolean licensed() { - return this.licensed; - } - - /** - * Required - API name: {@code type} - */ - public final String type() { - return this.type; - } - /** * Serialize this object to JSON. */ @@ -207,13 +187,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("version"); generator.write(this.version); - - generator.writeKey("licensed"); - generator.write(this.licensed); - - generator.writeKey("type"); - generator.write(this.type); - } // --------------------------------------------------------------------------------------------- @@ -239,10 +212,6 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder

{ private Long avgQueueSize; - private Long avgResponseTime; - private Long avgResponseTimeNs; - private String avgServiceTime; - private Long avgServiceTimeNs; private Long outgoingSearches; @@ -197,14 +167,6 @@ public final Builder avgQueueSize(long value) { return this; } - /** - * Required - API name: {@code avg_response_time} - */ - public final Builder avgResponseTime(long value) { - this.avgResponseTime = value; - return this; - } - /** * Required - API name: {@code avg_response_time_ns} */ @@ -213,14 +175,6 @@ public final Builder avgResponseTimeNs(long value) { return this; } - /** - * Required - API name: {@code avg_service_time} - */ - public final Builder avgServiceTime(String value) { - this.avgServiceTime = value; - return this; - } - /** * Required - API name: {@code avg_service_time_ns} */ @@ -269,9 +223,7 @@ public AdaptiveSelection build() { protected static void setupAdaptiveSelectionDeserializer(ObjectDeserializer op) { op.add(Builder::avgQueueSize, JsonpDeserializer.longDeserializer(), "avg_queue_size"); - op.add(Builder::avgResponseTime, JsonpDeserializer.longDeserializer(), "avg_response_time"); op.add(Builder::avgResponseTimeNs, JsonpDeserializer.longDeserializer(), "avg_response_time_ns"); - op.add(Builder::avgServiceTime, JsonpDeserializer.stringDeserializer(), "avg_service_time"); op.add(Builder::avgServiceTimeNs, JsonpDeserializer.longDeserializer(), "avg_service_time_ns"); op.add(Builder::outgoingSearches, JsonpDeserializer.longDeserializer(), "outgoing_searches"); op.add(Builder::rank, JsonpDeserializer.stringDeserializer(), "rank"); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java index 928113fc36..6e24932d03 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java @@ -53,34 +53,14 @@ @JsonpDeserializable public class DataPathStats implements JsonpSerializable { - private final String available; - private final long availableInBytes; - private final String diskQueue; - - private final long diskReads; - - private final String diskReadSize; - - private final long diskReadSizeInBytes; - - private final long diskWrites; - - private final String diskWriteSize; - - private final long diskWriteSizeInBytes; - - private final String free; - private final long freeInBytes; private final String mount; private final String path; - private final String total; - private final long totalInBytes; private final String type; @@ -89,22 +69,10 @@ public class DataPathStats implements JsonpSerializable { private DataPathStats(Builder builder) { - this.available = ApiTypeHelper.requireNonNull(builder.available, this, "available"); this.availableInBytes = ApiTypeHelper.requireNonNull(builder.availableInBytes, this, "availableInBytes"); - this.diskQueue = ApiTypeHelper.requireNonNull(builder.diskQueue, this, "diskQueue"); - this.diskReads = ApiTypeHelper.requireNonNull(builder.diskReads, this, "diskReads"); - this.diskReadSize = ApiTypeHelper.requireNonNull(builder.diskReadSize, this, "diskReadSize"); - this.diskReadSizeInBytes = ApiTypeHelper.requireNonNull(builder.diskReadSizeInBytes, this, - "diskReadSizeInBytes"); - this.diskWrites = ApiTypeHelper.requireNonNull(builder.diskWrites, this, "diskWrites"); - this.diskWriteSize = ApiTypeHelper.requireNonNull(builder.diskWriteSize, this, "diskWriteSize"); - this.diskWriteSizeInBytes = ApiTypeHelper.requireNonNull(builder.diskWriteSizeInBytes, this, - "diskWriteSizeInBytes"); - this.free = ApiTypeHelper.requireNonNull(builder.free, this, "free"); this.freeInBytes = ApiTypeHelper.requireNonNull(builder.freeInBytes, this, "freeInBytes"); this.mount = ApiTypeHelper.requireNonNull(builder.mount, this, "mount"); this.path = ApiTypeHelper.requireNonNull(builder.path, this, "path"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); this.totalInBytes = ApiTypeHelper.requireNonNull(builder.totalInBytes, this, "totalInBytes"); this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); @@ -114,13 +82,6 @@ public static DataPathStats of(Function> f return fn.apply(new Builder()).build(); } - /** - * Required - API name: {@code available} - */ - public final String available() { - return this.available; - } - /** * Required - API name: {@code available_in_bytes} */ @@ -128,62 +89,6 @@ public final long availableInBytes() { return this.availableInBytes; } - /** - * Required - API name: {@code disk_queue} - */ - public final String diskQueue() { - return this.diskQueue; - } - - /** - * Required - API name: {@code disk_reads} - */ - public final long diskReads() { - return this.diskReads; - } - - /** - * Required - API name: {@code disk_read_size} - */ - public final String diskReadSize() { - return this.diskReadSize; - } - - /** - * Required - API name: {@code disk_read_size_in_bytes} - */ - public final long diskReadSizeInBytes() { - return this.diskReadSizeInBytes; - } - - /** - * Required - API name: {@code disk_writes} - */ - public final long diskWrites() { - return this.diskWrites; - } - - /** - * Required - API name: {@code disk_write_size} - */ - public final String diskWriteSize() { - return this.diskWriteSize; - } - - /** - * Required - API name: {@code disk_write_size_in_bytes} - */ - public final long diskWriteSizeInBytes() { - return this.diskWriteSizeInBytes; - } - - /** - * Required - API name: {@code free} - */ - public final String free() { - return this.free; - } - /** * Required - API name: {@code free_in_bytes} */ @@ -205,13 +110,6 @@ public final String path() { return this.path; } - /** - * Required - API name: {@code total} - */ - public final String total() { - return this.total; - } - /** * Required - API name: {@code total_in_bytes} */ @@ -237,36 +135,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("available"); - generator.write(this.available); - generator.writeKey("available_in_bytes"); generator.write(this.availableInBytes); - generator.writeKey("disk_queue"); - generator.write(this.diskQueue); - - generator.writeKey("disk_reads"); - generator.write(this.diskReads); - - generator.writeKey("disk_read_size"); - generator.write(this.diskReadSize); - - generator.writeKey("disk_read_size_in_bytes"); - generator.write(this.diskReadSizeInBytes); - - generator.writeKey("disk_writes"); - generator.write(this.diskWrites); - - generator.writeKey("disk_write_size"); - generator.write(this.diskWriteSize); - - generator.writeKey("disk_write_size_in_bytes"); - generator.write(this.diskWriteSizeInBytes); - - generator.writeKey("free"); - generator.write(this.free); - generator.writeKey("free_in_bytes"); generator.write(this.freeInBytes); @@ -276,9 +147,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("path"); generator.write(this.path); - generator.writeKey("total"); - generator.write(this.total); - generator.writeKey("total_in_bytes"); generator.write(this.totalInBytes); @@ -294,46 +162,19 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String available; private Long availableInBytes; - private String diskQueue; - - private Long diskReads; - - private String diskReadSize; - - private Long diskReadSizeInBytes; - - private Long diskWrites; - - private String diskWriteSize; - - private Long diskWriteSizeInBytes; - - private String free; - private Long freeInBytes; private String mount; private String path; - private String total; - private Long totalInBytes; private String type; - /** - * Required - API name: {@code available} - */ - public final Builder available(String value) { - this.available = value; - return this; - } - /** * Required - API name: {@code available_in_bytes} */ @@ -342,70 +183,6 @@ public final Builder availableInBytes(long value) { return this; } - /** - * Required - API name: {@code disk_queue} - */ - public final Builder diskQueue(String value) { - this.diskQueue = value; - return this; - } - - /** - * Required - API name: {@code disk_reads} - */ - public final Builder diskReads(long value) { - this.diskReads = value; - return this; - } - - /** - * Required - API name: {@code disk_read_size} - */ - public final Builder diskReadSize(String value) { - this.diskReadSize = value; - return this; - } - - /** - * Required - API name: {@code disk_read_size_in_bytes} - */ - public final Builder diskReadSizeInBytes(long value) { - this.diskReadSizeInBytes = value; - return this; - } - - /** - * Required - API name: {@code disk_writes} - */ - public final Builder diskWrites(long value) { - this.diskWrites = value; - return this; - } - - /** - * Required - API name: {@code disk_write_size} - */ - public final Builder diskWriteSize(String value) { - this.diskWriteSize = value; - return this; - } - - /** - * Required - API name: {@code disk_write_size_in_bytes} - */ - public final Builder diskWriteSizeInBytes(long value) { - this.diskWriteSizeInBytes = value; - return this; - } - - /** - * Required - API name: {@code free} - */ - public final Builder free(String value) { - this.free = value; - return this; - } - /** * Required - API name: {@code free_in_bytes} */ @@ -430,14 +207,6 @@ public final Builder path(String value) { return this; } - /** - * Required - API name: {@code total} - */ - public final Builder total(String value) { - this.total = value; - return this; - } - /** * Required - API name: {@code total_in_bytes} */ @@ -477,20 +246,10 @@ public DataPathStats build() { protected static void setupDataPathStatsDeserializer(ObjectDeserializer op) { - op.add(Builder::available, JsonpDeserializer.stringDeserializer(), "available"); op.add(Builder::availableInBytes, JsonpDeserializer.longDeserializer(), "available_in_bytes"); - op.add(Builder::diskQueue, JsonpDeserializer.stringDeserializer(), "disk_queue"); - op.add(Builder::diskReads, JsonpDeserializer.longDeserializer(), "disk_reads"); - op.add(Builder::diskReadSize, JsonpDeserializer.stringDeserializer(), "disk_read_size"); - op.add(Builder::diskReadSizeInBytes, JsonpDeserializer.longDeserializer(), "disk_read_size_in_bytes"); - op.add(Builder::diskWrites, JsonpDeserializer.longDeserializer(), "disk_writes"); - op.add(Builder::diskWriteSize, JsonpDeserializer.stringDeserializer(), "disk_write_size"); - op.add(Builder::diskWriteSizeInBytes, JsonpDeserializer.longDeserializer(), "disk_write_size_in_bytes"); - op.add(Builder::free, JsonpDeserializer.stringDeserializer(), "free"); op.add(Builder::freeInBytes, JsonpDeserializer.longDeserializer(), "free_in_bytes"); op.add(Builder::mount, JsonpDeserializer.stringDeserializer(), "mount"); op.add(Builder::path, JsonpDeserializer.stringDeserializer(), "path"); - op.add(Builder::total, JsonpDeserializer.stringDeserializer(), "total"); op.add(Builder::totalInBytes, JsonpDeserializer.longDeserializer(), "total_in_bytes"); op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java index 64727d5498..0916e4604b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java @@ -53,27 +53,18 @@ @JsonpDeserializable public class FileSystemTotal implements JsonpSerializable { - private final String available; - private final long availableInBytes; - private final String free; - private final long freeInBytes; - private final String total; - private final long totalInBytes; // --------------------------------------------------------------------------------------------- private FileSystemTotal(Builder builder) { - this.available = ApiTypeHelper.requireNonNull(builder.available, this, "available"); this.availableInBytes = ApiTypeHelper.requireNonNull(builder.availableInBytes, this, "availableInBytes"); - this.free = ApiTypeHelper.requireNonNull(builder.free, this, "free"); this.freeInBytes = ApiTypeHelper.requireNonNull(builder.freeInBytes, this, "freeInBytes"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); this.totalInBytes = ApiTypeHelper.requireNonNull(builder.totalInBytes, this, "totalInBytes"); } @@ -82,13 +73,6 @@ public static FileSystemTotal of(Function { - private String available; private Long availableInBytes; - private String free; - private Long freeInBytes; - private String total; - private Long totalInBytes; - /** - * Required - API name: {@code available} - */ - public final Builder available(String value) { - this.available = value; - return this; - } - /** * Required - API name: {@code available_in_bytes} */ @@ -190,13 +139,6 @@ public final Builder availableInBytes(long value) { return this; } - /** - * Required - API name: {@code free} - */ - public final Builder free(String value) { - this.free = value; - return this; - } /** * Required - API name: {@code free_in_bytes} @@ -206,14 +148,6 @@ public final Builder freeInBytes(long value) { return this; } - /** - * Required - API name: {@code total} - */ - public final Builder total(String value) { - this.total = value; - return this; - } - /** * Required - API name: {@code total_in_bytes} */ @@ -245,11 +179,8 @@ public FileSystemTotal build() { protected static void setupFileSystemTotalDeserializer(ObjectDeserializer op) { - op.add(Builder::available, JsonpDeserializer.stringDeserializer(), "available"); op.add(Builder::availableInBytes, JsonpDeserializer.longDeserializer(), "available_in_bytes"); - op.add(Builder::free, JsonpDeserializer.stringDeserializer(), "free"); op.add(Builder::freeInBytes, JsonpDeserializer.longDeserializer(), "free_in_bytes"); - op.add(Builder::total, JsonpDeserializer.stringDeserializer(), "total"); op.add(Builder::totalInBytes, JsonpDeserializer.longDeserializer(), "total_in_bytes"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java index 2d5abaf5b2..248ef171ca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java @@ -55,8 +55,6 @@ public class GarbageCollectorTotal implements JsonpSerializable { private final long collectionCount; - private final String collectionTime; - private final long collectionTimeInMillis; // --------------------------------------------------------------------------------------------- @@ -64,7 +62,6 @@ public class GarbageCollectorTotal implements JsonpSerializable { private GarbageCollectorTotal(Builder builder) { this.collectionCount = ApiTypeHelper.requireNonNull(builder.collectionCount, this, "collectionCount"); - this.collectionTime = ApiTypeHelper.requireNonNull(builder.collectionTime, this, "collectionTime"); this.collectionTimeInMillis = ApiTypeHelper.requireNonNull(builder.collectionTimeInMillis, this, "collectionTimeInMillis"); @@ -81,13 +78,6 @@ public final long collectionCount() { return this.collectionCount; } - /** - * Required - API name: {@code collection_time} - */ - public final String collectionTime() { - return this.collectionTime; - } - /** * Required - API name: {@code collection_time_in_millis} */ @@ -109,9 +99,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("collection_count"); generator.write(this.collectionCount); - generator.writeKey("collection_time"); - generator.write(this.collectionTime); - generator.writeKey("collection_time_in_millis"); generator.write(this.collectionTimeInMillis); @@ -126,8 +113,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends ObjectBuilderBase implements ObjectBuilder { private Long collectionCount; - private String collectionTime; - private Long collectionTimeInMillis; /** @@ -138,14 +123,6 @@ public final Builder collectionCount(long value) { return this; } - /** - * Required - API name: {@code collection_time} - */ - public final Builder collectionTime(String value) { - this.collectionTime = value; - return this; - } - /** * Required - API name: {@code collection_time_in_millis} */ @@ -178,7 +155,6 @@ public GarbageCollectorTotal build() { protected static void setupGarbageCollectorTotalDeserializer(ObjectDeserializer op) { op.add(Builder::collectionCount, JsonpDeserializer.longDeserializer(), "collection_count"); - op.add(Builder::collectionTime, JsonpDeserializer.stringDeserializer(), "collection_time"); op.add(Builder::collectionTimeInMillis, JsonpDeserializer.longDeserializer(), "collection_time_in_millis"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java index 4dc2054e50..88ba7f108c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java @@ -59,8 +59,6 @@ public class IngestTotal implements JsonpSerializable { private final long failed; - private final List processors; - private final long timeInMillis; // --------------------------------------------------------------------------------------------- @@ -70,7 +68,6 @@ private IngestTotal(Builder builder) { this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); this.current = ApiTypeHelper.requireNonNull(builder.current, this, "current"); this.failed = ApiTypeHelper.requireNonNull(builder.failed, this, "failed"); - this.processors = ApiTypeHelper.unmodifiableRequired(builder.processors, this, "processors"); this.timeInMillis = ApiTypeHelper.requireNonNull(builder.timeInMillis, this, "timeInMillis"); } @@ -100,13 +97,6 @@ public final long failed() { return this.failed; } - /** - * Required - API name: {@code processors} - */ - public final List processors() { - return this.processors; - } - /** * Required - API name: {@code time_in_millis} */ @@ -134,16 +124,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("failed"); generator.write(this.failed); - if (ApiTypeHelper.isDefined(this.processors)) { - generator.writeKey("processors"); - generator.writeStartArray(); - for (KeyedProcessor item0 : this.processors) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } generator.writeKey("time_in_millis"); generator.write(this.timeInMillis); @@ -162,8 +142,6 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder processors; - private Long timeInMillis; /** @@ -190,35 +168,6 @@ public final Builder failed(long value) { return this; } - /** - * Required - API name: {@code processors} - *

- * Adds all elements of list to processors. - */ - public final Builder processors(List list) { - this.processors = _listAddAll(this.processors, list); - return this; - } - - /** - * Required - API name: {@code processors} - *

- * Adds one or more values to processors. - */ - public final Builder processors(KeyedProcessor value, KeyedProcessor... values) { - this.processors = _listAdd(this.processors, value, values); - return this; - } - - /** - * Required - API name: {@code processors} - *

- * Adds a value to processors using a builder lambda. - */ - public final Builder processors(Function> fn) { - return processors(fn.apply(new KeyedProcessor.Builder()).build()); - } - /** * Required - API name: {@code time_in_millis} */ @@ -253,7 +202,6 @@ protected static void setupIngestTotalDeserializer(ObjectDeserializer op) { op.add(Builder::mem, MemoryStats._DESERIALIZER, "mem"); op.add(Builder::threads, JvmThreads._DESERIALIZER, "threads"); op.add(Builder::timestamp, JsonpDeserializer.longDeserializer(), "timestamp"); - op.add(Builder::uptime, JsonpDeserializer.stringDeserializer(), "uptime"); op.add(Builder::uptimeInMillis, JsonpDeserializer.longDeserializer(), "uptime_in_millis"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java index 0251e052c4..4153706bc6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java @@ -42,7 +42,6 @@ import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; import jakarta.json.stream.JsonGenerator; @@ -72,11 +71,14 @@ public class MemoryStats implements JsonpSerializable { @Nullable private final Long totalVirtualInBytes; - private final long totalInBytes; + @Nullable + private final Long totalInBytes; - private final long freeInBytes; + @Nullable + private final Long freeInBytes; - private final long usedInBytes; + @Nullable + private final Long usedInBytes; // --------------------------------------------------------------------------------------------- @@ -88,9 +90,9 @@ protected MemoryStats(AbstractBuilder builder) { this.shareInBytes = builder.shareInBytes; this.totalVirtual = builder.totalVirtual; this.totalVirtualInBytes = builder.totalVirtualInBytes; - this.totalInBytes = ApiTypeHelper.requireNonNull(builder.totalInBytes, this, "totalInBytes"); - this.freeInBytes = ApiTypeHelper.requireNonNull(builder.freeInBytes, this, "freeInBytes"); - this.usedInBytes = ApiTypeHelper.requireNonNull(builder.usedInBytes, this, "usedInBytes"); + this.totalInBytes = builder.totalInBytes; + this.freeInBytes = builder.freeInBytes; + this.usedInBytes = builder.usedInBytes; } @@ -147,21 +149,21 @@ public final Long totalVirtualInBytes() { } /** - * Required - API name: {@code total_in_bytes} + * API name: {@code total_in_bytes} */ public final long totalInBytes() { return this.totalInBytes; } /** - * Required - API name: {@code free_in_bytes} + * API name: {@code free_in_bytes} */ public final long freeInBytes() { return this.freeInBytes; } /** - * Required - API name: {@code used_in_bytes} + * API name: {@code used_in_bytes} */ public final long usedInBytes() { return this.usedInBytes; @@ -208,15 +210,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.totalVirtualInBytes); } - generator.writeKey("total_in_bytes"); - generator.write(this.totalInBytes); - - generator.writeKey("free_in_bytes"); - generator.write(this.freeInBytes); + + if (this.totalInBytes != null) { + generator.writeKey("total_in_bytes"); + generator.write(this.totalInBytes); + } - generator.writeKey("used_in_bytes"); - generator.write(this.usedInBytes); + if (this.freeInBytes != null) { + generator.writeKey("free_in_bytes"); + generator.write(this.freeInBytes); + } + if (this.usedInBytes != null) { + generator.writeKey("used_in_bytes"); + generator.write(this.usedInBytes); + } } // --------------------------------------------------------------------------------------------- @@ -320,7 +328,7 @@ public final BuilderT totalVirtualInBytes(@Nullable Long value) { } /** - * Required - API name: {@code total_in_bytes} + * API name: {@code total_in_bytes} */ public final BuilderT totalInBytes(long value) { this.totalInBytes = value; @@ -328,7 +336,7 @@ public final BuilderT totalInBytes(long value) { } /** - * Required - API name: {@code free_in_bytes} + * API name: {@code free_in_bytes} */ public final BuilderT freeInBytes(long value) { this.freeInBytes = value; @@ -336,7 +344,7 @@ public final BuilderT freeInBytes(long value) { } /** - * Required - API name: {@code used_in_bytes} + * API name: {@code used_in_bytes} */ public final BuilderT usedInBytes(long value) { this.usedInBytes = value; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java index 063d48603d..c9998ad65e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java @@ -55,12 +55,8 @@ public class NodeBufferPool implements JsonpSerializable { private final long count; - private final String totalCapacity; - private final long totalCapacityInBytes; - private final String used; - private final long usedInBytes; // --------------------------------------------------------------------------------------------- @@ -68,10 +64,8 @@ public class NodeBufferPool implements JsonpSerializable { private NodeBufferPool(Builder builder) { this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); - this.totalCapacity = ApiTypeHelper.requireNonNull(builder.totalCapacity, this, "totalCapacity"); this.totalCapacityInBytes = ApiTypeHelper.requireNonNull(builder.totalCapacityInBytes, this, "totalCapacityInBytes"); - this.used = ApiTypeHelper.requireNonNull(builder.used, this, "used"); this.usedInBytes = ApiTypeHelper.requireNonNull(builder.usedInBytes, this, "usedInBytes"); } @@ -87,13 +81,6 @@ public final long count() { return this.count; } - /** - * Required - API name: {@code total_capacity} - */ - public final String totalCapacity() { - return this.totalCapacity; - } - /** * Required - API name: {@code total_capacity_in_bytes} */ @@ -101,13 +88,6 @@ public final long totalCapacityInBytes() { return this.totalCapacityInBytes; } - /** - * Required - API name: {@code used} - */ - public final String used() { - return this.used; - } - /** * Required - API name: {@code used_in_bytes} */ @@ -129,15 +109,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("count"); generator.write(this.count); - generator.writeKey("total_capacity"); - generator.write(this.totalCapacity); - generator.writeKey("total_capacity_in_bytes"); generator.write(this.totalCapacityInBytes); - generator.writeKey("used"); - generator.write(this.used); - generator.writeKey("used_in_bytes"); generator.write(this.usedInBytes); @@ -152,12 +126,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends ObjectBuilderBase implements ObjectBuilder { private Long count; - private String totalCapacity; - private Long totalCapacityInBytes; - private String used; - private Long usedInBytes; /** @@ -168,14 +138,6 @@ public final Builder count(long value) { return this; } - /** - * Required - API name: {@code total_capacity} - */ - public final Builder totalCapacity(String value) { - this.totalCapacity = value; - return this; - } - /** * Required - API name: {@code total_capacity_in_bytes} */ @@ -184,14 +146,6 @@ public final Builder totalCapacityInBytes(long value) { return this; } - /** - * Required - API name: {@code used} - */ - public final Builder used(String value) { - this.used = value; - return this; - } - /** * Required - API name: {@code used_in_bytes} */ @@ -224,9 +178,7 @@ public NodeBufferPool build() { protected static void setupNodeBufferPoolDeserializer(ObjectDeserializer op) { op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); - op.add(Builder::totalCapacity, JsonpDeserializer.stringDeserializer(), "total_capacity"); op.add(Builder::totalCapacityInBytes, JsonpDeserializer.longDeserializer(), "total_capacity_in_bytes"); - op.add(Builder::used, JsonpDeserializer.stringDeserializer(), "used"); op.add(Builder::usedInBytes, JsonpDeserializer.longDeserializer(), "used_in_bytes"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java index a8bd8255a7..f981d15b5f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java @@ -53,6 +53,8 @@ import java.util.Map; import java.util.function.Function; +import javax.annotation.Nullable; + // typedef: nodes._types.Stats @JsonpDeserializable @@ -93,6 +95,7 @@ public class Stats implements JsonpSerializable { private final String transportAddress; + @Nullable private final Map attributes; // --------------------------------------------------------------------------------------------- @@ -118,7 +121,7 @@ private Stats(Builder builder) { this.timestamp = ApiTypeHelper.requireNonNull(builder.timestamp, this, "timestamp"); this.transport = ApiTypeHelper.requireNonNull(builder.transport, this, "transport"); this.transportAddress = ApiTypeHelper.requireNonNull(builder.transportAddress, this, "transportAddress"); - this.attributes = ApiTypeHelper.unmodifiableRequired(builder.attributes, this, "attributes"); + this.attributes = builder.attributes; } @@ -253,7 +256,7 @@ public final String transportAddress() { } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} */ public final Map attributes() { return this.attributes; @@ -418,6 +421,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder attributes; /** @@ -716,7 +720,7 @@ public final Builder transportAddress(String value) { } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} *

* Adds all entries of map to attributes. */ @@ -726,7 +730,7 @@ public final Builder attributes(Map map) { } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} *

* Adds an entry to attributes. */ diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java index cd9b9ddb10..7488a71ea5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java @@ -55,16 +55,12 @@ public class Transport implements JsonpSerializable { private final long rxCount; - private final String rxSize; - private final long rxSizeInBytes; private final int serverOpen; private final long txCount; - private final String txSize; - private final long txSizeInBytes; // --------------------------------------------------------------------------------------------- @@ -72,11 +68,9 @@ public class Transport implements JsonpSerializable { private Transport(Builder builder) { this.rxCount = ApiTypeHelper.requireNonNull(builder.rxCount, this, "rxCount"); - this.rxSize = ApiTypeHelper.requireNonNull(builder.rxSize, this, "rxSize"); this.rxSizeInBytes = ApiTypeHelper.requireNonNull(builder.rxSizeInBytes, this, "rxSizeInBytes"); this.serverOpen = ApiTypeHelper.requireNonNull(builder.serverOpen, this, "serverOpen"); this.txCount = ApiTypeHelper.requireNonNull(builder.txCount, this, "txCount"); - this.txSize = ApiTypeHelper.requireNonNull(builder.txSize, this, "txSize"); this.txSizeInBytes = ApiTypeHelper.requireNonNull(builder.txSizeInBytes, this, "txSizeInBytes"); } @@ -92,13 +86,6 @@ public final long rxCount() { return this.rxCount; } - /** - * Required - API name: {@code rx_size} - */ - public final String rxSize() { - return this.rxSize; - } - /** * Required - API name: {@code rx_size_in_bytes} */ @@ -120,13 +107,6 @@ public final long txCount() { return this.txCount; } - /** - * Required - API name: {@code tx_size} - */ - public final String txSize() { - return this.txSize; - } - /** * Required - API name: {@code tx_size_in_bytes} */ @@ -148,9 +128,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("rx_count"); generator.write(this.rxCount); - generator.writeKey("rx_size"); - generator.write(this.rxSize); - generator.writeKey("rx_size_in_bytes"); generator.write(this.rxSizeInBytes); @@ -160,9 +137,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("tx_count"); generator.write(this.txCount); - generator.writeKey("tx_size"); - generator.write(this.txSize); - generator.writeKey("tx_size_in_bytes"); generator.write(this.txSizeInBytes); @@ -177,16 +151,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends ObjectBuilderBase implements ObjectBuilder { private Long rxCount; - private String rxSize; - private Long rxSizeInBytes; private Integer serverOpen; private Long txCount; - private String txSize; - private Long txSizeInBytes; /** @@ -197,14 +167,6 @@ public final Builder rxCount(long value) { return this; } - /** - * Required - API name: {@code rx_size} - */ - public final Builder rxSize(String value) { - this.rxSize = value; - return this; - } - /** * Required - API name: {@code rx_size_in_bytes} */ @@ -229,14 +191,6 @@ public final Builder txCount(long value) { return this; } - /** - * Required - API name: {@code tx_size} - */ - public final Builder txSize(String value) { - this.txSize = value; - return this; - } - /** * Required - API name: {@code tx_size_in_bytes} */ @@ -269,11 +223,9 @@ public Transport build() { protected static void setupTransportDeserializer(ObjectDeserializer op) { op.add(Builder::rxCount, JsonpDeserializer.longDeserializer(), "rx_count"); - op.add(Builder::rxSize, JsonpDeserializer.stringDeserializer(), "rx_size"); op.add(Builder::rxSizeInBytes, JsonpDeserializer.longDeserializer(), "rx_size_in_bytes"); op.add(Builder::serverOpen, JsonpDeserializer.integerDeserializer(), "server_open"); op.add(Builder::txCount, JsonpDeserializer.longDeserializer(), "tx_count"); - op.add(Builder::txSize, JsonpDeserializer.stringDeserializer(), "tx_size"); op.add(Builder::txSizeInBytes, JsonpDeserializer.longDeserializer(), "tx_size_in_bytes"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java index 684b25ea3f..471dd96aaa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java @@ -57,9 +57,8 @@ @JsonpDeserializable public class NodeInfo implements JsonpSerializable { - private final Map attributes; - - private final String buildFlavor; + @Nullable + private final Map attributes; private final String buildHash; @@ -119,8 +118,7 @@ public class NodeInfo implements JsonpSerializable { private NodeInfo(Builder builder) { - this.attributes = ApiTypeHelper.unmodifiableRequired(builder.attributes, this, "attributes"); - this.buildFlavor = ApiTypeHelper.requireNonNull(builder.buildFlavor, this, "buildFlavor"); + this.attributes = ApiTypeHelper.unmodifiable(builder.attributes); this.buildHash = ApiTypeHelper.requireNonNull(builder.buildHash, this, "buildHash"); this.buildType = ApiTypeHelper.requireNonNull(builder.buildType, this, "buildType"); this.host = ApiTypeHelper.requireNonNull(builder.host, this, "host"); @@ -151,19 +149,13 @@ public static NodeInfo of(Function> fn) { } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} */ + @Nullable public final Map attributes() { return this.attributes; } - /** - * Required - API name: {@code build_flavor} - */ - public final String buildFlavor() { - return this.buildFlavor; - } - /** * Required - Short hash of the last git commit in this release. *

@@ -368,8 +360,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - generator.writeKey("build_flavor"); - generator.write(this.buildFlavor); generator.writeKey("build_hash"); generator.write(this.buildHash); @@ -503,10 +493,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable private Map attributes; - private String buildFlavor; - private String buildHash; private String buildType; @@ -566,7 +555,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder aggregations; /** - * Required - API name: {@code attributes} + * API name: {@code attributes} *

* Adds all entries of map to attributes. */ @@ -576,7 +565,7 @@ public final Builder attributes(Map map) { } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} *

* Adds an entry to attributes. */ @@ -585,14 +574,6 @@ public final Builder attributes(String key, String value) { return this; } - /** - * Required - API name: {@code build_flavor} - */ - public final Builder buildFlavor(String value) { - this.buildFlavor = value; - return this; - } - /** * Required - Short hash of the last git commit in this release. *

@@ -966,7 +947,6 @@ protected static void setupNodeInfoDeserializer(ObjectDeserializer seedHosts; // --------------------------------------------------------------------------------------------- private NodeInfoDiscover(Builder builder) { - this.seedHosts = ApiTypeHelper.requireNonNull(builder.seedHosts, this, "seedHosts"); + this.seedHosts = builder.seedHosts; } @@ -69,8 +74,8 @@ public static NodeInfoDiscover of(Function seedHosts() { + return Collections.unmodifiableList(this.seedHosts); } /** @@ -83,10 +88,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("seed_hosts"); - generator.write(this.seedHosts); - + if (this.seedHosts != null) { + generator.writeStartArray("seed_hosts"); + this.seedHosts.forEach(generator::write); + generator.writeEnd(); + } } // --------------------------------------------------------------------------------------------- @@ -96,13 +102,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String seedHosts; + @Nullable + private List seedHosts; /** - * Required - API name: {@code seed_hosts} + * API name: {@code seed_hosts} */ - public final Builder seedHosts(String value) { - this.seedHosts = value; + public final Builder seedHosts(List values) { + this.seedHosts = values; return this; } @@ -129,7 +136,7 @@ public NodeInfoDiscover build() { protected static void setupNodeInfoDiscoverDeserializer(ObjectDeserializer op) { - op.add(Builder::seedHosts, JsonpDeserializer.stringDeserializer(), "seed_hosts"); + op.add(Builder::seedHosts, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "seed_hosts"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java index 7cab089347..124e47d13b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java @@ -58,6 +58,7 @@ public class NodeInfoPath implements JsonpSerializable { private final String home; + @Nullable private final List repo; private final List data; @@ -68,7 +69,7 @@ private NodeInfoPath(Builder builder) { this.logs = ApiTypeHelper.requireNonNull(builder.logs, this, "logs"); this.home = ApiTypeHelper.requireNonNull(builder.home, this, "home"); - this.repo = ApiTypeHelper.unmodifiableRequired(builder.repo, this, "repo"); + this.repo = ApiTypeHelper.unmodifiable(builder.repo); this.data = ApiTypeHelper.unmodifiable(builder.data); } @@ -92,7 +93,7 @@ public final String home() { } /** - * Required - API name: {@code repo} + * API name: {@code repo} */ public final List repo() { return this.repo; @@ -178,7 +179,7 @@ public final Builder home(String value) { } /** - * Required - API name: {@code repo} + * API name: {@code repo} *

* Adds all elements of list to repo. */ diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java index f552e9a009..4cc74372cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java @@ -48,10 +48,13 @@ import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Nullable; + // typedef: nodes.info.NodeInfoScript @JsonpDeserializable public class NodeInfoScript implements JsonpSerializable { + @Nullable private final String allowedTypes; private final String disableMaxCompilationsRate; @@ -60,7 +63,7 @@ public class NodeInfoScript implements JsonpSerializable { private NodeInfoScript(Builder builder) { - this.allowedTypes = ApiTypeHelper.requireNonNull(builder.allowedTypes, this, "allowedTypes"); + this.allowedTypes = builder.allowedTypes; this.disableMaxCompilationsRate = ApiTypeHelper.requireNonNull(builder.disableMaxCompilationsRate, this, "disableMaxCompilationsRate"); @@ -71,8 +74,9 @@ public static NodeInfoScript of(Function> } /** - * Required - API name: {@code allowed_types} + * API name: {@code allowed_types} */ + @Nullable public final String allowedTypes() { return this.allowedTypes; } @@ -94,9 +98,10 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("allowed_types"); - generator.write(this.allowedTypes); + if (this.allowedTypes != null) { + generator.writeKey("allowed_types"); + generator.write(this.allowedTypes); + } generator.writeKey("disable_max_compilations_rate"); generator.write(this.disableMaxCompilationsRate); @@ -110,12 +115,13 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String allowedTypes; + @Nullable + private String allowedTypes; private String disableMaxCompilationsRate; /** - * Required - API name: {@code allowed_types} + * API name: {@code allowed_types} */ public final Builder allowedTypes(String value) { this.allowedTypes = value; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java index db773cd0ad..9b1d17baa2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java @@ -47,6 +47,8 @@ import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; import jakarta.json.stream.JsonGenerator; + +import java.util.List; import java.util.function.Function; import javax.annotation.Nullable; @@ -59,14 +61,15 @@ public class NodeInfoSettingsCluster implements JsonpSerializable { @Nullable private final IndexRouting routing; + @Nullable private final NodeInfoSettingsClusterElection election; @Deprecated @Nullable - private final String initialMasterNodes; + private final List initialMasterNodes; @Nullable - private final String initialClusterManagerNodes; + private final List initialClusterManagerNodes; // --------------------------------------------------------------------------------------------- @@ -74,7 +77,7 @@ private NodeInfoSettingsCluster(Builder builder) { this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); this.routing = builder.routing; - this.election = ApiTypeHelper.requireNonNull(builder.election, this, "election"); + this.election = builder.election; this.initialMasterNodes = builder.initialMasterNodes; this.initialClusterManagerNodes = builder.initialClusterManagerNodes; @@ -100,8 +103,9 @@ public final IndexRouting routing() { } /** - * Required - API name: {@code election} + * API name: {@code election} */ + @Nullable public final NodeInfoSettingsClusterElection election() { return this.election; } @@ -111,7 +115,7 @@ public final NodeInfoSettingsClusterElection election() { */ @Deprecated @Nullable - public final String initialMasterNodes() { + public final List initialMasterNodes() { return this.initialMasterNodes; } @@ -119,7 +123,7 @@ public final String initialMasterNodes() { * API name: {@code initial_cluster_manager_nodes} */ @Nullable - public final String initialClusterManagerNodes() { + public final List initialClusterManagerNodes() { return this.initialClusterManagerNodes; } @@ -146,15 +150,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.election.serialize(generator, mapper); if (this.initialMasterNodes != null) { - generator.writeKey("initial_master_nodes"); - generator.write(this.initialMasterNodes); - + generator.writeStartArray("initial_master_nodes"); + this.initialMasterNodes.forEach(generator::write); + generator.writeEnd(); } if (this.initialClusterManagerNodes != null) { - generator.writeKey("initial_cluster_manager_nodes"); - generator.write(this.initialClusterManagerNodes); - + generator.writeStartArray("initial_cluster_manager_nodes"); + this.initialClusterManagerNodes.forEach(generator::write); + generator.writeEnd(); } } @@ -171,14 +175,15 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder initialMasterNodes; @Nullable - private String initialClusterManagerNodes; + private List initialClusterManagerNodes; /** * Required - API name: {@code name} @@ -204,7 +209,7 @@ public final Builder routing(Function> fn) { @@ -223,7 +228,7 @@ public final Builder election( * API name: {@code initial_master_nodes} */ @Deprecated - public final Builder initialMasterNodes(@Nullable String value) { + public final Builder initialMasterNodes(@Nullable List value) { this.initialMasterNodes = value; return this; } @@ -231,7 +236,7 @@ public final Builder initialMasterNodes(@Nullable String value) { /** * API name: {@code initial_cluster_manager_nodes} */ - public final Builder initialClusterManagerNodes(@Nullable String value) { + public final Builder initialClusterManagerNodes(@Nullable List value) { this.initialClusterManagerNodes = value; return this; } @@ -263,8 +268,8 @@ protected static void setupNodeInfoSettingsClusterDeserializer( op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); op.add(Builder::routing, IndexRouting._DESERIALIZER, "routing"); op.add(Builder::election, NodeInfoSettingsClusterElection._DESERIALIZER, "election"); - op.add(Builder::initialMasterNodes, JsonpDeserializer.stringDeserializer(), "initial_master_nodes"); - op.add(Builder::initialClusterManagerNodes, JsonpDeserializer.stringDeserializer(), "initial_cluster_manager_nodes"); + op.add(Builder::initialMasterNodes, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "initial_master_nodes"); + op.add(Builder::initialClusterManagerNodes, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "initial_cluster_manager_nodes"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java index 92a51be897..bd73a74e9e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java @@ -57,6 +57,7 @@ public class NodeInfoSettingsNode implements JsonpSerializable { private final String name; + @Nullable private final Map attr; @Nullable @@ -67,7 +68,7 @@ public class NodeInfoSettingsNode implements JsonpSerializable { private NodeInfoSettingsNode(Builder builder) { this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.attr = ApiTypeHelper.unmodifiableRequired(builder.attr, this, "attr"); + this.attr = ApiTypeHelper.unmodifiable(builder.attr); this.maxLocalStorageNodes = builder.maxLocalStorageNodes; } @@ -84,8 +85,9 @@ public final String name() { } /** - * Required - API name: {@code attr} + * API name: {@code attr} */ + @Nullable public final Map attr() { return this.attr; } @@ -140,6 +142,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends ObjectBuilderBase implements ObjectBuilder { private String name; + @Nullable private Map attr; @Nullable @@ -164,7 +167,7 @@ public final Builder attr(Map map) { } /** - * Required - API name: {@code attr} + * API name: {@code attr} *

* Adds an entry to attr. */ diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java index 7ad19ec4ba..8b21eadba8 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java @@ -34,10 +34,10 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class ClusterClientIT extends OpenSearchRestHighLevelClientTestCase { +public class ClusterClientIT extends OpenSearchJavaClientTestCase { public void testClusterPutSettings() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); final String transientSettingKey = RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(); String[] transientSettingKeySplit = transientSettingKey.split("\\."); @@ -80,7 +80,7 @@ public void testClusterPutSettings() throws IOException { } public void testClusterUpdateSettingNonExistent() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); String setting = "no_idea_what_you_are_talking_about"; int value = 10; @@ -105,7 +105,7 @@ public void testClusterUpdateSettingNonExistent() throws IOException { } public void testClusterGetSettings() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); final String transientSettingKey = RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(); final String transientSettingValue = "10b"; @@ -140,7 +140,7 @@ public void testClusterGetSettings() throws IOException { } public void testClusterGetSettingsWithDefault() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); final String transientSettingKey = RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(); final String transientSettingValue = "10b"; @@ -175,7 +175,7 @@ public void testClusterGetSettingsWithDefault() throws IOException { } public void testClusterHealthYellowClusterLevel() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); createIndex("index", Settings.EMPTY); createIndex("index2", Settings.EMPTY); HealthRequest request = new HealthRequest.Builder().timeout(t->t.time("5s")).build(); @@ -184,7 +184,7 @@ public void testClusterHealthYellowClusterLevel() throws IOException { } public void testClusterHealthYellowIndicesLevel() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); String firstIndex = "index"; String secondIndex = "index2"; // including another index that we do not assert on, to ensure that we are not @@ -222,7 +222,7 @@ private static void assertYellowShards(HealthResponse response) { } public void testClusterHealthYellowSpecificIndex() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); createIndex("index", Settings.EMPTY); createIndex("index2", Settings.EMPTY); HealthRequest request = new HealthRequest.Builder() @@ -287,7 +287,7 @@ private static void assertNoIndices(HealthResponse response) { } public void testClusterHealthNotFoundIndex() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); createIndex("index", Settings.EMPTY); HealthRequest request = new HealthRequest.Builder() .index("notexisted-index") diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java index 1fee8b7a77..5a31ca2e92 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java @@ -36,17 +36,17 @@ import java.util.Collections; import java.util.List; -public class CrudIT extends OpenSearchRestHighLevelClientTestCase { +public class CrudIT extends OpenSearchJavaClientTestCase { public void testDelete() throws IOException { { // Testing index deletion String index1 = "my-index"; - CreateIndexResponse createIndexResponse = highLevelClient().indices().create(b -> b.index(index1)); + CreateIndexResponse createIndexResponse = javaClient().indices().create(b -> b.index(index1)); assertEquals(index1, createIndexResponse.index()); assertTrue(createIndexResponse.acknowledged()); assertTrue(createIndexResponse.shardsAcknowledged()); - DeleteIndexResponse deleteIndexResponse = highLevelClient().indices().delete(b -> b.index(index1)); + DeleteIndexResponse deleteIndexResponse = javaClient().indices().delete(b -> b.index(index1)); assertTrue(deleteIndexResponse.acknowledged()); } @@ -54,22 +54,22 @@ public void testDelete() throws IOException { // Testing doc deletion after data ingestion String docId = "id"; String index = "my-index1"; - highLevelClient().indices().create(b -> b.index(index)); + javaClient().indices().create(b -> b.index(index)); - String id = highLevelClient().index(b -> b + String id = javaClient().index(b -> b .index(index) .id(docId) .document(Collections.singletonMap("foo", "bar"))) .id(); assertEquals(id, docId); - DeleteResponse deleteResponse = highLevelClient().delete(d -> d.id(docId).index(index)); + DeleteResponse deleteResponse = javaClient().delete(d -> d.id(docId).index(index)); assertEquals(deleteResponse.index(), index); assertEquals(deleteResponse.id(), docId); assertEquals(deleteResponse.result(), Result.Deleted); String docIdTemp = "does_not_exist"; - DeleteResponse deleteResponseDocNotExist = highLevelClient().delete(d -> d.id(docIdTemp).index(index)); + DeleteResponse deleteResponseDocNotExist = javaClient().delete(d -> d.id(docIdTemp).index(index)); assertEquals(deleteResponseDocNotExist.index(), index); assertEquals(deleteResponseDocNotExist.id(), docIdTemp); assertEquals(deleteResponseDocNotExist.result(), Result.NotFound); @@ -78,26 +78,26 @@ public void testDelete() throws IOException { } public void testExists() throws IOException { - assertFalse(highLevelClient().indices().exists(b -> b.index("index")).value()); + assertFalse(javaClient().indices().exists(b -> b.index("index")).value()); String index = "ingest-test"; // Create an index - CreateIndexResponse createIndexResponse = highLevelClient().indices().create(b -> b + CreateIndexResponse createIndexResponse = javaClient().indices().create(b -> b .index(index) ); assertEquals(index, createIndexResponse.index()); // Check that it actually exists. Example of a boolean response - assertTrue(highLevelClient().indices().exists(b -> b.index(index)).value()); + assertTrue(javaClient().indices().exists(b -> b.index(index)).value()); - highLevelClient().index(b -> b + javaClient().index(b -> b .index(index) .id("id") .document(Collections.singletonMap("foo", "bar")) .refresh(Refresh.True)); - assertTrue(highLevelClient().exists(b -> b.index(index).id("id")).value()); - assertFalse(highLevelClient().exists(b -> b.index(index).id("random_id")).value()); - assertFalse(highLevelClient().exists(b -> b.index(index).id("random_id").version(1L)).value()); + assertTrue(javaClient().exists(b -> b.index(index).id("id")).value()); + assertFalse(javaClient().exists(b -> b.index(index).id("random_id")).value()); + assertFalse(javaClient().exists(b -> b.index(index).id("random_id").version(1L)).value()); } public void testSourceExists() throws IOException { @@ -110,10 +110,10 @@ public void testSourceExists() throws IOException { .index("index") .id("id") .build(); - BooleanResponse response = highLevelClient().existsSource(request); + BooleanResponse response = javaClient().existsSource(request); assertFalse(response.value()); } - highLevelClient().index(b -> b + javaClient().index(b -> b .index("index") .id("id") .refresh(Refresh.True) @@ -123,7 +123,7 @@ public void testSourceExists() throws IOException { .index("index") .id("id") .build(); - BooleanResponse response = highLevelClient().existsSource(request); + BooleanResponse response = javaClient().existsSource(request); assertTrue(response.value()); } { @@ -131,7 +131,7 @@ public void testSourceExists() throws IOException { .index("index") .id("does_not_exist") .build(); - BooleanResponse response = highLevelClient().existsSource(request); + BooleanResponse response = javaClient().existsSource(request); assertFalse(response.value()); } } @@ -141,7 +141,7 @@ public void testGet() throws IOException { { OpenSearchException exception = expectThrows( OpenSearchException.class, - () -> highLevelClient().get(new GetRequest.Builder().index("index").id("id").build(), String.class) + () -> javaClient().get(new GetRequest.Builder().index("index").id("id").build(), String.class) ); assertEquals(404, exception.status()); assertEquals("Request failed: [index_not_found_exception] no such index [index]", @@ -152,10 +152,10 @@ public void testGet() throws IOException { appData.setIntValue(1337); appData.setMsg("foo"); - highLevelClient().index(b -> b.index("index").id("id").document(appData).refresh(Refresh.True)); + javaClient().index(b -> b.index("index").id("id").document(appData).refresh(Refresh.True)); { - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index("index") .id("id") .version(1L) @@ -169,7 +169,7 @@ public void testGet() throws IOException { assertEquals(appData.getMsg(), getResponse.source().getMsg()); } { - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index("index") .id("does_not_exist") , AppData.class @@ -187,13 +187,13 @@ public void testGetWithTypes() throws IOException { appData.setIntValue(1337); appData.setMsg("foo"); - highLevelClient().index(b -> b + javaClient().index(b -> b .index("index") .id("id") .document(appData) .refresh(Refresh.True)); - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index("index") .id("id") , AppData.class @@ -216,7 +216,7 @@ public void testMultiGet() throws IOException { List ids = new ArrayList<>(); ids.add("id1"); ids.add("id2"); - MgetResponse response = highLevelClient().mget(b -> b + MgetResponse response = javaClient().mget(b -> b .index("index") .ids(ids) , AppData.class @@ -256,7 +256,7 @@ public void testUpdate() throws Exception { .doc(appData) .build(); try { - highLevelClient().update(updateRequest, AppData.class); + javaClient().update(updateRequest, AppData.class); } catch (OpenSearchException e) { // 1.x: [document_missing_exception] [_doc][does_not_exist]: document missing // 2.x: [document_missing_exception] [does_not_exist]: document missing @@ -271,7 +271,7 @@ public void testUpdate() throws Exception { .id("id") .document(appData) .build(); - IndexResponse indexResponse = highLevelClient().index(indexRequest); + IndexResponse indexResponse = javaClient().index(indexRequest); assertEquals(Result.Created, indexResponse.result()); long lastUpdateSeqNo; @@ -282,7 +282,7 @@ public void testUpdate() throws Exception { .id("id") .doc(updatedAppData) .build(); - UpdateResponse updateResponse = highLevelClient().update(updateRequest, AppData.class); + UpdateResponse updateResponse = javaClient().update(updateRequest, AppData.class); assertEquals(Result.Updated, updateResponse.result()); assertEquals(indexResponse.version() + 1, updateResponse.version()); lastUpdateSeqNo = updateResponse.seqNo(); @@ -309,14 +309,14 @@ public void testUpdateWithTypes() throws IOException { .id("id") .document(appData) .build(); - IndexResponse indexResponse = highLevelClient().index(indexRequest); + IndexResponse indexResponse = javaClient().index(indexRequest); UpdateRequest updateRequest = new UpdateRequest.Builder() .index("index") .id("id") .doc(updatedAppData) .build(); - UpdateResponse updateResponse = highLevelClient().update(updateRequest, AppData.class); + UpdateResponse updateResponse = javaClient().update(updateRequest, AppData.class); assertEquals(Result.Updated, updateResponse.result()); assertEquals(indexResponse.version() + 1, updateResponse.version()); @@ -341,7 +341,7 @@ public void testBulk() throws IOException { if (!erroneous) { assertEquals( Result.Created, - highLevelClient().index(b -> b.index("index").id(id).document(appData)).result() + javaClient().index(b -> b.index("index").id(id).document(appData)).result() ); } BulkOperation op = new BulkOperation.Builder().delete(d -> d.index("index").id(id)).build(); @@ -367,7 +367,7 @@ public void testBulk() throws IOException { opsList.add(op); if (erroneous) { - assertEquals(Result.Created, highLevelClient().index(b -> b. + assertEquals(Result.Created, javaClient().index(b -> b. index("index").id(id).document(appData)).result()); } @@ -381,7 +381,7 @@ public void testBulk() throws IOException { if (!erroneous) { assertEquals( Result.Created, - highLevelClient().index(b -> b.index("index").id(id).document(appData)).result() + javaClient().index(b -> b.index("index").id(id).document(appData)).result() ); } } @@ -389,7 +389,7 @@ public void testBulk() throws IOException { } BulkRequest bulkRequest = new BulkRequest.Builder().operations(opsList).build(); - BulkResponse bulkResponse = highLevelClient().bulk(bulkRequest); + BulkResponse bulkResponse = javaClient().bulk(bulkRequest); assertTrue(bulkResponse.took() > 0); assertEquals(nbItems, bulkResponse.items().size()); @@ -424,12 +424,12 @@ public void testUrlEncode() throws IOException { appData.setIntValue(1337); appData.setMsg("foo"); { - IndexResponse response = highLevelClient().index(b -> b.index(indexPattern).id("id#1").document(appData)); + IndexResponse response = javaClient().index(b -> b.index(indexPattern).id("id#1").document(appData)); assertEquals(expectedIndex, response.index()); assertEquals("id#1", response.id()); } { - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index(indexPattern).id("id#1"), AppData.class); assertTrue(getResponse.found()); assertEquals(expectedIndex, getResponse.index()); @@ -438,19 +438,19 @@ public void testUrlEncode() throws IOException { String docId = "this/is/the/id"; { - IndexResponse indexResponse = highLevelClient().index(b -> b.index("index").id(docId).document(appData)); + IndexResponse indexResponse = javaClient().index(b -> b.index("index").id(docId).document(appData)); assertEquals("index", indexResponse.index()); assertEquals(docId, indexResponse.id()); } { - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index("index").id(docId), AppData.class); assertTrue(getResponse.found()); assertEquals("index", getResponse.index()); assertEquals(docId, getResponse.id()); } - assertTrue(highLevelClient().indices().exists(b -> b.index(indexPattern, "index")).value()); + assertTrue(javaClient().indices().exists(b -> b.index(indexPattern, "index")).value()); } public void testParamsEncode() throws IOException { @@ -460,12 +460,12 @@ public void testParamsEncode() throws IOException { AppData appData = new AppData(); appData.setIntValue(1337); appData.setMsg("foo"); - IndexResponse response = highLevelClient().index(b -> b.index("index").id(id).document(appData).routing(routing)); + IndexResponse response = javaClient().index(b -> b.index("index").id(id).document(appData).routing(routing)); assertEquals("index", response.index()); assertEquals(id, response.id()); } { - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index("index").id("id").routing(routing), AppData.class); assertTrue(getResponse.found()); assertEquals("index", getResponse.index()); @@ -481,13 +481,13 @@ public void testGetIdWithPlusSign() throws Exception { appData.setMsg("foo"); { - IndexResponse indexResponse = highLevelClient().index(b -> b + IndexResponse indexResponse = javaClient().index(b -> b .index("index").id(id).document(appData)); assertEquals("index", indexResponse.index()); assertEquals(id, indexResponse.id()); } { - GetResponse getResponse = highLevelClient().get(b -> b + GetResponse getResponse = javaClient().get(b -> b .index("index").id(id), AppData.class); assertTrue(getResponse.found()); assertEquals("index", getResponse.index()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java index 89c17043e4..38726a57a5 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java @@ -17,23 +17,22 @@ import org.opensearch.client.opensearch.indices.IndexState; import org.opensearch.common.settings.Settings; - import java.io.IOException; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; -public class IndicesClientIT extends OpenSearchRestHighLevelClientTestCase { +public class IndicesClientIT extends OpenSearchJavaClientTestCase { public void testIndicesExists() throws IOException { // Index present { String indexName = "test_index_exists_index_present"; - highLevelClient().indices().create(_1 -> _1.index(indexName)); + javaClient().indices().create(_1 -> _1.index(indexName)); GetIndexRequest request = new GetIndexRequest.Builder().index(indexName).build(); - GetIndexResponse response = highLevelClient().indices().get(request); + GetIndexResponse response = javaClient().indices().get(request); assertNotNull(response.result()); assertEquals(response.result().size(), 1); @@ -45,7 +44,7 @@ public void testIndicesExists() throws IOException { GetIndexRequest request = new GetIndexRequest.Builder().index(indexName).build(); try { - highLevelClient().indices().get(request); + javaClient().indices().get(request); fail(); // should never execute } catch (OpenSearchException ex) { assertNotNull(ex); @@ -66,7 +65,7 @@ public void testIndicesExists() throws IOException { GetIndexRequest request = new GetIndexRequest.Builder().index(existingIndex, nonExistentIndex).build(); try { - highLevelClient().indices().get(request); + javaClient().indices().get(request); fail(); // should never execute } catch (OpenSearchException ex) { assertNotNull(ex); @@ -75,8 +74,8 @@ public void testIndicesExists() throws IOException { } public void testCreateIndex() throws Exception { - OpenSearchAsyncClient asyncClient = new OpenSearchAsyncClient(highLevelClient()._transport()); - CreateIndexResponse createResponse = highLevelClient().indices().create(b -> b.index("my-index")); + OpenSearchAsyncClient asyncClient = new OpenSearchAsyncClient(javaClient()._transport()); + CreateIndexResponse createResponse = javaClient().indices().create(b -> b.index("my-index")); assertTrue(createResponse.acknowledged()); assertTrue(createResponse.shardsAcknowledged()); @@ -98,7 +97,7 @@ public void testGetSettingsNonExistentIndex() throws IOException { .index(nonExistentIndex).build(); try { - highLevelClient().indices().getSettings(getIndicesSettingsRequest); + javaClient().indices().getSettings(getIndicesSettingsRequest); fail(); } catch (OpenSearchException ex) { assertNotNull(ex); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java new file mode 100644 index 0000000000..74fc61a3ec --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.Matchers.anEmptyMap; + +import java.io.IOException; + +import org.opensearch.client.opensearch.nodes.NodesStatsResponse; + +public class NodesIT extends OpenSearchJavaClientTestCase { + public void testNodesStats() throws IOException { + final NodesStatsResponse response = javaClient().nodes().stats(); + assertThat(response.clusterName(), not(nullValue())); + assertThat(response.nodes(), not(anEmptyMap())); + } +} \ No newline at end of file diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java new file mode 100644 index 0000000000..d12aa93bf0 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -0,0 +1,176 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import org.opensearch.Version; +import org.opensearch.client.RestClient; +import org.opensearch.client.RestClientBuilder; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.OpenSearchClient; +import org.opensearch.client.opensearch._types.ExpandWildcard; +import org.opensearch.client.opensearch.cat.IndicesResponse; +import org.opensearch.client.opensearch.cat.indices.IndicesRecord; +import org.opensearch.client.opensearch.indices.DeleteIndexRequest; +import org.opensearch.client.opensearch.nodes.NodesInfoResponse; +import org.opensearch.client.opensearch.nodes.info.NodeInfo; +import org.apache.http.HttpHost; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.conn.ssl.NoopHostnameVerifier; +import org.apache.http.impl.client.BasicCredentialsProvider; +import org.apache.http.ssl.SSLContextBuilder; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.test.rest.OpenSearchRestTestCase; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.TreeSet; + +public abstract class OpenSearchJavaClientTestCase extends OpenSearchRestTestCase { + private static OpenSearchClient javaClient; + private static OpenSearchClient adminJavaClient; + + private static TreeSet nodeVersions; + private static List clusterHosts; + + @Before + public void initJavaClient() throws IOException { + if (javaClient == null) { + String cluster = getTestRestCluster(); + String[] stringUrls = cluster.split(","); + List hosts = new ArrayList<>(stringUrls.length); + for (String stringUrl : stringUrls) { + int portSeparator = stringUrl.lastIndexOf(':'); + if (portSeparator < 0) { + throw new IllegalArgumentException("Illegal cluster url [" + stringUrl + "]"); + } + String host = stringUrl.substring(0, portSeparator); + int port = Integer.valueOf(stringUrl.substring(portSeparator + 1)); + hosts.add(new HttpHost(host, port, getProtocol())); + } + clusterHosts = Collections.unmodifiableList(hosts); + logger.info("initializing REST clients against {}", clusterHosts); + + javaClient = buildJavaClient(restClientSettings(), clusterHosts.toArray(new HttpHost[clusterHosts.size()])); + adminJavaClient = buildJavaClient(restAdminSettings(), clusterHosts.toArray(new HttpHost[clusterHosts.size()])); + + nodeVersions = new TreeSet<>(); + final NodesInfoResponse response = adminJavaClient.nodes().info(); + for (final NodeInfo node : response.nodes().values()) { + nodeVersions.add(Version.fromString(node.version())); + } + } + } + + private boolean isHttps() { + return Optional.ofNullable(System.getProperty("https")) + .map("true"::equalsIgnoreCase) + .orElse(false); + } + + @Override + protected String getProtocol() { + return isHttps() ? "https" : "http"; + } + + protected OpenSearchClient buildJavaClient(Settings settings, HttpHost[] hosts) throws IOException { + return new OpenSearchClient(new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper())); + } + + @Override + protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOException { + RestClientBuilder builder = RestClient.builder(hosts); + + if (isHttps()) { + builder.setHttpClientConfigCallback(httpClientBuilder -> { + String userName = Optional.ofNullable(System.getProperty("user")).orElse("admin"); + String password = Optional.ofNullable(System.getProperty("password")).orElse("admin"); + + final BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider(); + for (final HttpHost host: hosts) { + credentialsProvider.setCredentials(AuthScope.ANY, + new UsernamePasswordCredentials(userName, password)); + } + + try { + return httpClientBuilder + .setDefaultCredentialsProvider(credentialsProvider) + // disable the certificate since our testing cluster just uses the default security configuration + .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) + .setSSLContext(SSLContextBuilder.create().loadTrustMaterial(null, (chains, authType) -> true).build()); + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } + + builder.setStrictDeprecationMode(true); + return builder.build(); + } + + protected static OpenSearchClient javaClient() { + return javaClient; + } + + protected static OpenSearchClient adminJavaClient() { + return adminJavaClient; + } + + protected String getTestRestCluster() { + String cluster = System.getProperty("tests.rest.cluster"); + if (cluster == null) { + cluster = "localhost:9200"; + } + return cluster; + } + + @After + protected void wipeAllOSIndices() throws IOException { + final IndicesResponse response = adminJavaClient() + .cat() + .indices(r -> r.expandWildcards(ExpandWildcard.All)); + + for (IndicesRecord index : response.valueBody()) { + if (index.index() != null && !".opendistro_security".equals(index.index())) { + adminJavaClient().indices().delete(new DeleteIndexRequest.Builder().index(index.index()).build()); + } + } + } + + @AfterClass + public static void cleanupJavaClient() throws IOException { + try { + if (javaClient != null) { + IOUtils.close(javaClient._transport()); + } + + if (adminJavaClient != null) { + IOUtils.close(adminJavaClient._transport()); + } + } finally { + clusterHosts = null; + javaClient = null; + adminJavaClient = null; + nodeVersions = null; + } + } + + @Override + protected boolean preserveIndicesUponCompletion() { + return true; + } +} \ No newline at end of file diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchRestHighLevelClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchRestHighLevelClientTestCase.java deleted file mode 100644 index e04099db17..0000000000 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchRestHighLevelClientTestCase.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package org.opensearch.client.opensearch.integTest; - - -import org.apache.http.HttpHost; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.apache.http.client.CredentialsProvider; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.impl.client.BasicCredentialsProvider; -import org.apache.http.ssl.SSLContextBuilder; -import org.junit.After; -import org.opensearch.client.Request; -import org.opensearch.client.Response; -import org.opensearch.client.RestClient; -import org.opensearch.client.RestClientBuilder; -import org.opensearch.client.json.jackson.JacksonJsonpMapper; -import org.opensearch.client.opensearch.OpenSearchClient; -import org.junit.AfterClass; -import org.junit.Before; -import org.opensearch.client.transport.OpenSearchTransport; -import org.opensearch.client.transport.rest_client.RestClientTransport; -import org.opensearch.common.settings.Settings; -import org.opensearch.common.xcontent.DeprecationHandler; -import org.opensearch.common.xcontent.NamedXContentRegistry; -import org.opensearch.common.xcontent.XContentParser; -import org.opensearch.common.xcontent.XContentType; -import org.opensearch.test.rest.OpenSearchRestTestCase; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - - -public abstract class OpenSearchRestHighLevelClientTestCase extends OpenSearchRestTestCase { - - private static RestClient restClient; - private static OpenSearchClient restHighLevelClient; - - @Before - public void initHighLevelClient() throws IOException { - super.initClient(); - if (restHighLevelClient == null) { - // Create the low-level client - restClient = client(); - // Create the transport that provides JSON and http services to API clients - OpenSearchTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); - // Create API client - restHighLevelClient = new OpenSearchClient(transport); - } - } - - private boolean isHttps() { - return Optional.ofNullable(System.getProperty("https")) - .map("true"::equalsIgnoreCase) - .orElse(false); - } - - @Override - protected String getProtocol() { - return isHttps() ? "https" : "http"; - } - - protected static OpenSearchClient highLevelClient() { - return restHighLevelClient; - } - - @Override - protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOException { - RestClientBuilder builder = RestClient.builder(hosts); - builder.setStrictDeprecationMode(true); - if (isHttps()) { - configureHttpsClient(builder); - } - return builder.build(); - } - - private void configureHttpsClient(RestClientBuilder builder) { - builder.setHttpClientConfigCallback(httpClientBuilder -> { - String userName = Optional.ofNullable(System.getProperty("user")).orElse("admin"); - String password = Optional.ofNullable(System.getProperty("password")).orElse("admin"); - - final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); - credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(userName, password)); - - try { - return httpClientBuilder - .setDefaultCredentialsProvider(credentialsProvider) - // disable the certificate since our testing cluster just uses the default security configuration - .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) - .setSSLContext(SSLContextBuilder.create().loadTrustMaterial(null, (chains, authType) -> true).build()); - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } - - @Override - protected String getTestRestCluster() { - String cluster = System.getProperty("tests.rest.cluster"); - if (cluster == null) { - cluster = "localhost:9200"; - } - return cluster; - } - - @AfterClass - public static void cleanupClient() throws IOException { - try { - restClient.close(); - } finally { - restClient = null; - restHighLevelClient = null; - } - } - - @SuppressWarnings("unchecked") - @After - protected void wipeAllOSIndices() throws IOException { - Response response = adminClient().performRequest(new Request("GET", "/_cat/indices?format=json&expand_wildcards=all")); - XContentType xContentType = XContentType.fromMediaType(response.getEntity().getContentType().getValue()); - XContentParser parser = xContentType.xContent().createParser( - NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION, - response.getEntity().getContent()); - - try { - XContentParser.Token token = parser.nextToken(); - List> parserList; - if (token == XContentParser.Token.START_ARRAY) { - parserList = parser.listOrderedMap().stream().map(obj -> (Map) obj).collect(Collectors.toList()); - } else { - parserList = Collections.singletonList(parser.mapOrdered()); - } - - for (Map index : parserList) { - String indexName = (String) index.get("index"); - if (indexName != null && !".opendistro_security".equals(indexName)) { - adminClient().performRequest(new Request("DELETE", "/" + indexName)); - } - } - } finally { - parser.close(); - } - } - - /** - * wipeAllIndices won't work since it cannot delete security index. Use wipeAllOSIndices instead. - */ - @Override - protected boolean preserveIndicesUponCompletion() { - return true; - } -} \ No newline at end of file diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java index 05abea8ce1..ef69c05b7b 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java @@ -17,16 +17,15 @@ import java.io.IOException; import java.util.Map; -public class PingAndInfoIT extends OpenSearchRestHighLevelClientTestCase { +public class PingAndInfoIT extends OpenSearchJavaClientTestCase { public void testPing() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); - BooleanResponse ping = openSearchClient.ping(); + BooleanResponse ping = javaClient().ping(); assertTrue(ping.value()); } public void testInfo() throws IOException { - OpenSearchClient openSearchClient = highLevelClient(); + OpenSearchClient openSearchClient = javaClient(); InfoResponse info = openSearchClient.info(); // compare with what the low level client outputs diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java index 4196884453..a3c5c8a6ff 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java @@ -72,25 +72,25 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -public class RequestTest extends OpenSearchRestHighLevelClientTestCase { +public class RequestTest extends OpenSearchJavaClientTestCase { @Test public void testCount() throws Exception { // Tests that a no-parameter method exists for endpoints that only have optional properties - assertTrue(highLevelClient().count().count() >= 0); + assertTrue(javaClient().count().count() >= 0); } @Test public void testIndexCreation() throws Exception { - OpenSearchAsyncClient asyncClient = new OpenSearchAsyncClient(highLevelClient()._transport()); + OpenSearchAsyncClient asyncClient = new OpenSearchAsyncClient(javaClient()._transport()); // Ping the server - assertTrue(highLevelClient().ping().value()); + assertTrue(javaClient().ping().value()); // Create an index... - final CreateIndexResponse createResponse = highLevelClient().indices().create(b -> b.index("my-index")); + final CreateIndexResponse createResponse = javaClient().indices().create(b -> b.index("my-index")); assertTrue(createResponse.acknowledged()); assertTrue(createResponse.shardsAcknowledged()); @@ -110,14 +110,14 @@ public void testDataIngestion() throws Exception { String index = "ingest-test"; // Create an index - CreateIndexResponse createIndexResponse = highLevelClient().indices().create(b -> b + CreateIndexResponse createIndexResponse = javaClient().indices().create(b -> b .index(index) ); assertEquals(index, createIndexResponse.index()); // Check that it actually exists. Example of a boolean response - BooleanResponse existsResponse = highLevelClient().indices().exists(b -> b.index(index)); + BooleanResponse existsResponse = javaClient().indices().exists(b -> b.index(index)); assertTrue(existsResponse.value()); // Ingest some data @@ -125,7 +125,7 @@ public void testDataIngestion() throws Exception { appData.setIntValue(1337); appData.setMsg("foo"); - String docId = highLevelClient().index(b -> b + String docId = javaClient().index(b -> b .index(index) .id("my/Id") // test with url-unsafe string .document(appData) @@ -135,14 +135,14 @@ public void testDataIngestion() throws Exception { assertEquals("my/Id", docId); // Check auto-created mapping - GetMappingResponse mapping = highLevelClient().indices().getMapping(b -> b.index(index)); + GetMappingResponse mapping = javaClient().indices().getMapping(b -> b.index(index)); assertEquals( Property.Kind.Long, mapping.get("ingest-test").mappings().properties().get("intValue")._kind() ); // Query by id - AppData esData = highLevelClient().get(b -> b + AppData esData = javaClient().get(b -> b .index(index) .id(docId) , AppData.class @@ -152,7 +152,7 @@ public void testDataIngestion() throws Exception { assertEquals("foo", esData.getMsg()); // Query by id a non-existing document - final GetResponse notExists = highLevelClient().get(b -> b + final GetResponse notExists = javaClient().get(b -> b .index(index) .id("some-random-id") , AppData.class @@ -162,7 +162,7 @@ public void testDataIngestion() throws Exception { assertNull(notExists.source()); // Search - SearchResponse search = highLevelClient().search(b -> b + SearchResponse search = javaClient().search(b -> b .index(index) , AppData.class ); @@ -180,7 +180,7 @@ public void testDataIngestion() throws Exception { ); // MSearch: 1st search on an existing index, 2nd one on a non-existing index - final MsearchResponse msearch = highLevelClient().msearch(_0 -> _0 + final MsearchResponse msearch = javaClient().msearch(_0 -> _0 .searches(_1 -> _1 .header(_3 -> _3.index(index)) .body(_3 -> _3.query(_4 -> _4.matchAll(_5 -> _5))) @@ -200,10 +200,10 @@ public void testDataIngestion() throws Exception { @Test public void testCatRequest() throws IOException { // Cat requests should have the "format=json" added by the transport - NodesResponse nodes = highLevelClient().cat().nodes(_0 -> _0); - System.out.println(ModelTestCase.toJson(nodes, highLevelClient()._transport().jsonpMapper())); + NodesResponse nodes = javaClient().cat().nodes(_0 -> _0); + System.out.println(ModelTestCase.toJson(nodes, javaClient()._transport().jsonpMapper())); - InfoResponse info = highLevelClient().info(); + InfoResponse info = javaClient().info(); String version = info.version().number(); if (version.contains("SNAPSHOT")) { version = version.split("-")[0]; @@ -223,7 +223,7 @@ public void testBulkRequest() throws IOException { appData.setIntValue(42); appData.setMsg("Some message"); - BulkResponse bulk = highLevelClient().bulk(_0 -> _0 + BulkResponse bulk = javaClient().bulk(_0 -> _0 .operations(_1 -> _1 .create(_2 -> _2 .index("foo") @@ -245,7 +245,7 @@ public void testBulkRequest() throws IOException { assertEquals(1L, bulk.items().get(0).version().longValue()); assertEquals("foo", bulk.items().get(1).index()); assertEquals(1L, bulk.items().get(1).version().longValue()); - assertEquals(42, highLevelClient().get(b -> b.index("foo").id("abc"), AppData.class).source().getIntValue()); + assertEquals(42, javaClient().get(b -> b.index("foo").id("abc"), AppData.class).source().getIntValue()); } @Test @@ -254,7 +254,7 @@ public void testRefresh() throws IOException { appData.setIntValue(42); appData.setMsg("Some message"); - IndexResponse ir = highLevelClient().index(_0 -> _0 + IndexResponse ir = javaClient().index(_0 -> _0 .index("test") .id("1") .document(appData) @@ -265,11 +265,11 @@ public void testRefresh() throws IOException { } @Test public void errorResponse() throws Exception { - BooleanResponse exists = highLevelClient().exists(_0 -> _0.index("doesnotexist").id("reallynot")); + BooleanResponse exists = javaClient().exists(_0 -> _0.index("doesnotexist").id("reallynot")); assertFalse(exists.value()); OpenSearchException ex = assertThrows(OpenSearchException.class, () -> { - GetResponse response = highLevelClient().get( + GetResponse response = javaClient().get( _0 -> _0.index("doesnotexist").id("reallynot"), String.class ); }); @@ -280,7 +280,7 @@ public void testRefresh() throws IOException { ExecutionException ee = assertThrows(ExecutionException.class, () -> { - OpenSearchAsyncClient aClient = new OpenSearchAsyncClient(highLevelClient()._transport()); + OpenSearchAsyncClient aClient = new OpenSearchAsyncClient(javaClient()._transport()); GetResponse response = aClient.get( _0 -> _0.index("doesnotexist").id("reallynot"), String.class ).get(); @@ -297,7 +297,7 @@ public void testErrorStatusCodeWithValidResponse() throws IOException { // Transports should first try to decode an error, and if they fail because of missing properties for // the error type, then try to decode the regular request. - final ClearScrollResponse clearResponse = highLevelClient().clearScroll(b -> b.scrollId( + final ClearScrollResponse clearResponse = javaClient().clearScroll(b -> b.scrollId( "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==") ); assertEquals(0, clearResponse.numFreed()); @@ -306,11 +306,11 @@ public void testErrorStatusCodeWithValidResponse() throws IOException { @Test public void testSearchAggregation() throws IOException { - highLevelClient().create(_1 -> _1.index("products").id("A").document(new Product(5)).refresh(Refresh.True)); - highLevelClient().create(_1 -> _1.index("products").id("B").document(new Product(15)).refresh(Refresh.True)); - highLevelClient().create(_1 -> _1.index("products").id("C").document(new Product(25)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index("products").id("A").document(new Product(5)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index("products").id("B").document(new Product(15)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index("products").id("C").document(new Product(25)).refresh(Refresh.True)); - SearchResponse searchResponse = highLevelClient().search(_1 -> _1 + SearchResponse searchResponse = javaClient().search(_1 -> _1 .index("products") .size(0) .aggregations( @@ -339,9 +339,9 @@ public void testSearchAggregation() throws IOException { @Test public void testSubAggregation() throws IOException { - highLevelClient().create(_1 -> _1.index("products").id("A").document(new Product(5, "Blue")).refresh(Refresh.True)); - highLevelClient().create(_1 -> _1.index("products").id("B").document(new Product(10, "Blue")).refresh(Refresh.True)); - highLevelClient().create(_1 -> _1.index("products").id("C").document(new Product(15, "Black")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index("products").id("A").document(new Product(5, "Blue")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index("products").id("B").document(new Product(10, "Blue")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index("products").id("C").document(new Product(15, "Black")).refresh(Refresh.True)); List fieldValues = List.of(FieldValue.of("Blue")); @@ -362,7 +362,7 @@ public void testSubAggregation() throws IOException { ._toQuery() ) )); - SearchResponse searchResponse = highLevelClient().search(searchRequest, Product.class); + SearchResponse searchResponse = javaClient().search(searchRequest, Product.class); Aggregate prices = searchResponse.aggregations().get("price")._get()._toAggregate(); assertEquals(2, searchResponse.aggregations().get("price").filter().docCount()); @@ -381,16 +381,16 @@ public void testChildAggregation() throws IOException { String question = "question"; String answer = "answer"; - highLevelClient().indices().create(c -> c.index(index).mappings(m -> m.properties("join", p -> p + javaClient().indices().create(c -> c.index(index).mappings(m -> m.properties("join", p -> p .join(j -> j.relations(Collections.singletonMap(question, Collections.singletonList(answer))))))); - highLevelClient().index(i -> i.index(index).id("1").document(new Question("exists")).refresh(Refresh.True)); - highLevelClient().index(i -> i.index(index).id("2").routing("1").document(new Answer("true", "1")).refresh(Refresh.True)); - highLevelClient().index(i -> i.index(index).id("3").routing("1").document(new Answer("false", "1")).refresh(Refresh.True)); + javaClient().index(i -> i.index(index).id("1").document(new Question("exists")).refresh(Refresh.True)); + javaClient().index(i -> i.index(index).id("2").routing("1").document(new Answer("true", "1")).refresh(Refresh.True)); + javaClient().index(i -> i.index(index).id("3").routing("1").document(new Answer("false", "1")).refresh(Refresh.True)); SearchRequest searchRequest = SearchRequest.of(r -> r.index(index).size(0) .aggregations(answer, a -> a.children(c -> c.type(answer)))); - SearchResponse searchResponse = highLevelClient().search(searchRequest, Void.class); + SearchResponse searchResponse = javaClient().search(searchRequest, Void.class); assertEquals(2, searchResponse.aggregations().get(answer).children().docCount()); } @@ -403,7 +403,7 @@ public void testGetMapping() throws Exception { Map fields = Collections.singletonMap("keyword", Property.of(p -> p.keyword(k -> k.ignoreAbove(256)))); Property text = Property.of(p -> p.text(t -> t.fields(fields))); - highLevelClient().indices().create(c -> c + javaClient().indices().create(c -> c .index(index) .mappings(m -> m .properties("id", text) @@ -416,7 +416,7 @@ public void testGetMapping() throws Exception { ) ); - GetMappingResponse mr = highLevelClient().indices().getMapping(mrb -> mrb.index(index)); + GetMappingResponse mr = javaClient().indices().getMapping(mrb -> mrb.index(index)); assertNotNull(mr.result().get(index)); assertNotNull(mr.result().get(index).mappings().properties().get("name").object()); @@ -426,13 +426,13 @@ public void testGetMapping() throws Exception { public void testDefaultIndexSettings() throws IOException { String index = "index-settings"; - highLevelClient().index(_1 -> _1.index(index).document(new Product(5)).refresh(Refresh.True)); + javaClient().index(_1 -> _1.index(index).document(new Product(5)).refresh(Refresh.True)); GetIndicesSettingsResponse settings; - settings = highLevelClient().indices().getSettings(b -> b.index(index).includeDefaults(true)); + settings = javaClient().indices().getSettings(b -> b.index(index).includeDefaults(true)); assertNotNull(settings.get(index).defaults()); - settings = highLevelClient().indices().getSettings(b -> b.index(index)); + settings = javaClient().indices().getSettings(b -> b.index(index)); assertNull(settings.get(index).defaults()); } From 0c498c01fcbfb393e74c50a9670433f11687b426 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 12 Jan 2023 16:30:50 -0500 Subject: [PATCH 005/123] Removing unsupported dynamic_templates option for bulk (#276) (#319) * Removing unsupported dynamic_templates option Signed-off-by: Vacha Shah * Update CHANGELOG Signed-off-by: Vacha Shah Signed-off-by: Vacha Shah (cherry picked from commit 52679c34cc4ce01bd01e4b2a380cb27a9046e953) Co-authored-by: Vacha Shah --- CHANGELOG.md | 2 +- .../opensearch/core/bulk/WriteOperation.java | 49 ------------------- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 914aaabce2..952be96f46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Deprecated ### Removed - +- Removed support for unsupported dynamic_templates in bulk ([#276](https://github.com/opensearch-project/opensearch-java/pull/276)) ### Fixed - Make ChildrenAggregate as a SingleBucketAggregate ([#306](https://github.com/opensearch-project/opensearch-java/pull/306)) - Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java index f1547e5a31..8e102a10d8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java @@ -39,9 +39,7 @@ import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; import jakarta.json.stream.JsonGenerator; -import java.util.Map; import javax.annotation.Nullable; // typedef: _global.bulk.WriteOperation @@ -49,7 +47,6 @@ public abstract class WriteOperation extends BulkOperationBase { - private final Map dynamicTemplates; @Nullable private final String pipeline; @@ -62,22 +59,11 @@ public abstract class WriteOperation extends BulkOperationBase { protected WriteOperation(AbstractBuilder builder) { super(builder); - this.dynamicTemplates = ApiTypeHelper.unmodifiable(builder.dynamicTemplates); this.pipeline = builder.pipeline; this.requireAlias = builder.requireAlias; } - /** - * API name: {@code dynamic_templates} - */ - public final Map dynamicTemplates() { - return this.dynamicTemplates; - } - - /** - * API name: {@code pipeline} - */ @Nullable public final String pipeline() { return this.pipeline; @@ -94,17 +80,6 @@ public final Boolean requireAlias() { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); - if (ApiTypeHelper.isDefined(this.dynamicTemplates)) { - generator.writeKey("dynamic_templates"); - generator.writeStartObject(); - for (Map.Entry item0 : this.dynamicTemplates.entrySet()) { - generator.writeKey(item0.getKey()); - generator.write(item0.getValue()); - - } - generator.writeEnd(); - - } if (this.pipeline != null) { generator.writeKey("pipeline"); generator.write(this.pipeline); @@ -121,8 +96,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends BulkOperationBase.AbstractBuilder { - @Nullable - private Map dynamicTemplates; @Nullable private String pipeline; @@ -130,26 +103,6 @@ protected abstract static class AbstractBuilder - * Adds all entries of map to dynamicTemplates. - */ - public final BuilderT dynamicTemplates(Map map) { - this.dynamicTemplates = _mapPutAll(this.dynamicTemplates, map); - return self(); - } - - /** - * API name: {@code dynamic_templates} - *

- * Adds an entry to dynamicTemplates. - */ - public final BuilderT dynamicTemplates(String key, String value) { - this.dynamicTemplates = _mapPut(this.dynamicTemplates, key, value); - return self(); - } - /** * API name: {@code pipeline} */ @@ -172,8 +125,6 @@ public final BuilderT requireAlias(@Nullable Boolean value) { protected static > void setupWriteOperationDeserializer( ObjectDeserializer op) { BulkOperationBase.setupBulkOperationBaseDeserializer(op); - op.add(AbstractBuilder::dynamicTemplates, - JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "dynamic_templates"); op.add(AbstractBuilder::pipeline, JsonpDeserializer.stringDeserializer(), "pipeline"); op.add(AbstractBuilder::requireAlias, JsonpDeserializer.booleanDeserializer(), "require_alias"); From aa9daf4d84ec4f7d8a7488d8870b56bb2436575c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 13:44:58 -0500 Subject: [PATCH 006/123] Fix: responseCompression option. (#322) (#327) Signed-off-by: dblock (cherry picked from commit 416567423957d9eb5e3b7756b2ff2ea637274adf) Co-authored-by: Daniel (dB.) Doubrovkine --- CHANGELOG.md | 1 + .../aws/AwsSdk2TransportOptions.java | 1 + .../aws/AwsSdk2TransportOptionsTestCase.java | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 java-client/src/test/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptionsTestCase.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 952be96f46..a7db8e5b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Make ChildrenAggregate as a SingleBucketAggregate ([#306](https://github.com/opensearch-project/opensearch-java/pull/306)) - Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) +- Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptions.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptions.java index ef8eb0a738..187c1b69bd 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptions.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptions.java @@ -173,6 +173,7 @@ class DefaultImpl extends TransportOptions.DefaultImpl implements AwsSdk2Transpo super(builder); credentials = builder.credentials; requestCompressionSize = builder.requestCompressionSize; + responseCompression = builder.responseCompression; mapper = builder.mapper; } diff --git a/java-client/src/test/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptionsTestCase.java b/java-client/src/test/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptionsTestCase.java new file mode 100644 index 0000000000..05b77ead26 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/transport/aws/AwsSdk2TransportOptionsTestCase.java @@ -0,0 +1,24 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.aws; + +import org.junit.Assert; +import org.junit.Test; + +public class AwsSdk2TransportOptionsTestCase extends Assert { + @Test + public void testBuilderResponseCompression() throws Exception { + AwsSdk2TransportOptions options = AwsSdk2TransportOptions.builder() + .setResponseCompression(true) + .setRequestCompressionSize(10) + .build(); + assertEquals(10, options.requestCompressionSize().intValue()); + assertTrue(options.responseCompression()); + } +} From 0081c56310939e261d99bbab544313dfdd659e50 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 17 Jan 2023 13:58:16 -0500 Subject: [PATCH 007/123] Introduce new OpenSearchTransport based on Apache HttpClient 5 (#281) (#328) Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko --- CHANGELOG.md | 1 + USER_GUIDE.md | 37 + java-client/build.gradle.kts | 4 + .../client/transport/TransportHeaders.java | 17 + .../httpclient5/ApacheHttpClient5Options.java | 267 +++++ .../ApacheHttpClient5Transport.java | 987 ++++++++++++++++++ .../ApacheHttpClient5TransportBuilder.java | 407 ++++++++ .../transport/httpclient5/DeadHostState.java | 125 +++ .../HttpAsyncResponseConsumerFactory.java | 86 ++ .../transport/httpclient5/Response.java | 214 ++++ .../httpclient5/ResponseException.java | 96 ++ .../httpclient5/WarningFailureException.java | 76 ++ .../httpclient5/WarningsHandler.java | 80 ++ .../HeapBufferedAsyncEntityConsumer.java | 139 +++ .../HeapBufferedAsyncResponseConsumer.java | 123 +++ .../HttpEntityAsyncEntityProducer.java | 182 ++++ .../internal/HttpUriRequestProducer.java | 62 ++ .../transport/httpclient5/internal/Node.java | 289 +++++ .../httpclient5/internal/NodeSelector.java | 105 ++ .../rest_client/RestClientOptions.java | 7 +- ...ntIT.java => AbstractClusterClientIT.java} | 3 +- .../{CrudIT.java => AbstractCrudIT.java} | 2 +- ...ntIT.java => AbstractIndicesClientIT.java} | 3 +- .../{NodesIT.java => AbstractNodesIT.java} | 4 +- ...InfoIT.java => AbstractPingAndInfoIT.java} | 3 +- ...equestTest.java => AbstractRequestIT.java} | 5 +- .../OpenSearchJavaClientTestCase.java | 14 +- .../integTest/OpenSearchTransportSupport.java | 31 + .../httpclient5/ClusterClientIT.java | 25 + .../integTest/httpclient5/CrudIT.java | 14 + .../HttpClient5TransportSupport.java | 123 +++ .../httpclient5/IndicesClientIT.java | 14 + .../integTest/httpclient5/NodesIT.java | 14 + .../integTest/httpclient5/PingAndInfoIT.java | 15 + .../integTest/httpclient5/RequestIT.java | 14 + .../integTest/restclient/ClusterClientIT.java | 25 + .../integTest/restclient/CrudIT.java | 25 + .../integTest/restclient/IndicesClientIT.java | 25 + .../integTest/restclient/NodesIT.java | 25 + .../integTest/restclient/PingAndInfoIT.java | 25 + .../integTest/restclient/RequestIT.java | 25 + 41 files changed, 3709 insertions(+), 29 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/transport/TransportHeaders.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Options.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Transport.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5TransportBuilder.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/DeadHostState.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/HttpAsyncResponseConsumerFactory.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/Response.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/ResponseException.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningFailureException.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningsHandler.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncResponseConsumer.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpEntityAsyncEntityProducer.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpUriRequestProducer.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/Node.java create mode 100644 java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/NodeSelector.java rename java-client/src/test/java/org/opensearch/client/opensearch/integTest/{ClusterClientIT.java => AbstractClusterClientIT.java} (99%) rename java-client/src/test/java/org/opensearch/client/opensearch/integTest/{CrudIT.java => AbstractCrudIT.java} (99%) rename java-client/src/test/java/org/opensearch/client/opensearch/integTest/{IndicesClientIT.java => AbstractIndicesClientIT.java} (97%) rename java-client/src/test/java/org/opensearch/client/opensearch/integTest/{NodesIT.java => AbstractNodesIT.java} (90%) rename java-client/src/test/java/org/opensearch/client/opensearch/integTest/{PingAndInfoIT.java => AbstractPingAndInfoIT.java} (96%) rename java-client/src/test/java/org/opensearch/client/opensearch/integTest/{RequestTest.java => AbstractRequestIT.java} (99%) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index a7db8e5b53..53601fcfe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - Github workflow for changelog verification ([#239](https://github.com/opensearch-project/opensearch-java/pull/239)) - Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247)) +- Introduce new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/USER_GUIDE.md b/USER_GUIDE.md index f51063052e..a3403cc8af 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -2,6 +2,7 @@ - [User Guide](#user-guide) - [Sample data](#sample-data) + - [Create a client](#create-a-client) - [Create an index](#create-an-index) - [Index data](#index-data) - [Search for the document](#search-for-the-document) @@ -48,6 +49,42 @@ static class IndexData { } ``` +## Create a client + +There are multiple low level transports which `OpenSearchClient` could be configured with. + +### Create a client using `RestClientTransport` + +```java +Transport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); +OpenSearchClient client = new OpenSearchClient(transport); +``` + +The `JacksonJsonpMapper` class (2.x versions) only supports Java 7 objects by default. [Java 8 modules](https://github.com/FasterXML/jackson-modules-java8) to support JDK8 classes such as the Date and Time API (JSR-310), `Optional`, and more can be used by including [the additional datatype dependency](https://github.com/FasterXML/jackson-modules-java8#usage) and adding the module. For example, to include JSR-310 classes: + +```java +Transport transport = new RestClientTransport(restClient, + new JacksonJsonpMapper(new ObjectMapper().registerModule(new JavaTimeModule()))); +OpenSearchClient client = new OpenSearchClient(transport); +``` + +### Create a client using `ApacheHttpClient5Transport` + +```java +final Transport transport = ApacheHttpClient5TransportBuilder + .builder(hosts) + .setMapper(new JacksonJsonpMapper()) + .build(); +OpenSearchClient client = new OpenSearchClient(transport); +``` + +The Apache HttpClient 5 based transport has dependences on Apache HttpClient 5 and Apache HttpCore 5 which has to be added to the project explicitly. + +```gradle + implementation("org.apache.httpcomponents.client5", "httpclient5", "5.1.4") + implementation("org.apache.httpcomponents.core5", "httpcore5", "5.1.5") +``` + ## Create an index ```java diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index fc50f81adc..b7adb63334 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -164,6 +164,10 @@ dependencies { implementation("com.fasterxml.jackson.core", "jackson-databind", jacksonDatabindVersion) testImplementation("com.fasterxml.jackson.datatype", "jackson-datatype-jakarta-jsonp", jacksonVersion) + // ApacheHttpClient5Transport dependencies (optional) + implementation("org.apache.httpcomponents.client5", "httpclient5", "5.1.4") + implementation("org.apache.httpcomponents.core5", "httpcore5", "5.1.5") + // For AwsSdk2Transport "awsSdk2SupportImplementation"("software.amazon.awssdk","sdk-core","[2.15,3.0)") "awsSdk2SupportImplementation"("software.amazon.awssdk","auth","[2.15,3.0)") diff --git a/java-client/src/main/java/org/opensearch/client/transport/TransportHeaders.java b/java-client/src/main/java/org/opensearch/client/transport/TransportHeaders.java new file mode 100644 index 0000000000..b21360a903 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/TransportHeaders.java @@ -0,0 +1,17 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport; + +public final class TransportHeaders { + public static final String ACCEPT = "Accept"; + public static final String USER_AGENT = "User-Agent"; + + private TransportHeaders() { + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Options.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Options.java new file mode 100644 index 0000000000..e10c32a577 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Options.java @@ -0,0 +1,267 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.httpclient5; + +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Map.Entry; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.hc.core5.http.nio.AsyncResponseConsumer; +import org.opensearch.client.transport.TransportOptions; +import org.opensearch.client.transport.Version; + +import static org.opensearch.client.transport.TransportHeaders.ACCEPT; +import static org.opensearch.client.transport.TransportHeaders.USER_AGENT; + +public class ApacheHttpClient5Options implements TransportOptions { + /** + * Default request options. + */ + public static final ApacheHttpClient5Options DEFAULT = new Builder( + Collections.emptyList(), + HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory.DEFAULT, + null, + null + ).build(); + + private final List

headers; + private final HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory; + private final WarningsHandler warningsHandler; + private final RequestConfig requestConfig; + + private ApacheHttpClient5Options(Builder builder) { + this.headers = Collections.unmodifiableList(new ArrayList<>(builder.headers)); + this.httpAsyncResponseConsumerFactory = builder.httpAsyncResponseConsumerFactory; + this.warningsHandler = builder.warningsHandler; + this.requestConfig = builder.requestConfig; + } + + public HttpAsyncResponseConsumerFactory getHttpAsyncResponseConsumerFactory() { + return httpAsyncResponseConsumerFactory; + } + + public WarningsHandler getWarningsHandler() { + return warningsHandler; + } + + public RequestConfig getRequestConfig() { + return requestConfig; + } + + @Override + public Collection> headers() { + return headers.stream() + .map(h -> new AbstractMap.SimpleImmutableEntry<>(h.getName(), h.getValue())) + .collect(Collectors.toList()); + } + + @Override + public Map queryParameters() { + return null; + } + + @Override + public Function, Boolean> onWarnings() { + if (warningsHandler == null) { + return null; + } else { + return warnings -> warningsHandler.warningsShouldFailRequest(warnings); + } + } + + @Override + public Builder toBuilder() { + return new Builder(headers, httpAsyncResponseConsumerFactory, warningsHandler, requestConfig); + } + + public static class Builder implements TransportOptions.Builder { + private final List
headers; + private HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory; + private WarningsHandler warningsHandler; + private RequestConfig requestConfig; + + private Builder(Builder builder) { + this(builder.headers, builder.httpAsyncResponseConsumerFactory, + builder.warningsHandler, builder.requestConfig); + } + + private Builder( + List
headers, + HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory, + WarningsHandler warningsHandler, + RequestConfig requestConfig + ) { + this.headers = new ArrayList<>(headers); + this.httpAsyncResponseConsumerFactory = httpAsyncResponseConsumerFactory; + this.warningsHandler = warningsHandler; + this.requestConfig = requestConfig; + } + + /** + * Add the provided header to the request. + * + * @param name the header name + * @param value the header value + * @throws NullPointerException if {@code name} or {@code value} is null. + */ + @Override + public Builder addHeader(String name, String value) { + Objects.requireNonNull(name, "header name cannot be null"); + Objects.requireNonNull(value, "header value cannot be null"); + this.headers.add(new ReqHeader(name, value)); + return this; + } + + @Override + public TransportOptions.Builder setParameter(String name, String value) { + return this; + } + + /** + * Called if there are warnings to determine if those warnings should fail the request. + */ + @Override + public TransportOptions.Builder onWarnings(Function, Boolean> listener) { + if (listener == null) { + setWarningsHandler(null); + } else { + setWarningsHandler(w -> { + if (w != null && !w.isEmpty()) { + return listener.apply(w); + } else { + return false; + } + }); + } + + return this; + } + + /** + * Set the {@link HttpAsyncResponseConsumerFactory} used to create one + * {@link AsyncResponseConsumer} callback per retry. Controls how the + * response body gets streamed from a non-blocking HTTP connection on the + * client side. + * + * @param httpAsyncResponseConsumerFactory factory for creating {@link AsyncResponseConsumer}. + * @throws NullPointerException if {@code httpAsyncResponseConsumerFactory} is null. + */ + public void setHttpAsyncResponseConsumerFactory(HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory) { + this.httpAsyncResponseConsumerFactory = Objects.requireNonNull( + httpAsyncResponseConsumerFactory, + "httpAsyncResponseConsumerFactory cannot be null" + ); + } + + /** + * How this request should handle warnings. If null (the default) then + * this request will default to the behavior dictacted by + * `setStrictDeprecationMode`. + *

+ * This can be set to {@link WarningsHandler#PERMISSIVE} if the client + * should ignore all warnings which is the same behavior as setting + * strictDeprecationMode to true. It can be set to + * {@link WarningsHandler#STRICT} if the client should fail if there are + * any warnings which is the same behavior as settings + * strictDeprecationMode to false. + *

+ * It can also be set to a custom implementation of + * {@linkplain WarningsHandler} to permit only certain warnings or to + * fail the request if the warnings returned don't + * exactly match some set. + * + * @param warningsHandler the {@link WarningsHandler} to be used + */ + public void setWarningsHandler(WarningsHandler warningsHandler) { + this.warningsHandler = warningsHandler; + } + + /** + * set RequestConfig, which can set socketTimeout, connectTimeout + * and so on by request + * @param requestConfig http client RequestConfig + * @return Builder + */ + public Builder setRequestConfig(RequestConfig requestConfig) { + this.requestConfig = requestConfig; + return this; + } + + @Override + public ApacheHttpClient5Options build() { + return new ApacheHttpClient5Options(this); + } + } + + static ApacheHttpClient5Options initialOptions() { + String ua = String.format( + Locale.ROOT, + "opensearch-java/%s (Java/%s)", + Version.VERSION == null ? "Unknown" : Version.VERSION.toString(), + System.getProperty("java.version") + ); + + return new ApacheHttpClient5Options( + DEFAULT.toBuilder() + .addHeader(USER_AGENT, ua) + .addHeader(ACCEPT, ApacheHttpClient5Transport.JsonContentType.toString()) + ); + } + + static ApacheHttpClient5Options of(TransportOptions options) { + if (options instanceof ApacheHttpClient5Options) { + return (ApacheHttpClient5Options)options; + + } else { + final Builder builder = new Builder(DEFAULT.toBuilder()); + options.headers().forEach(h -> builder.addHeader(h.getKey(), h.getValue())); + options.queryParameters().forEach(builder::setParameter); + builder.onWarnings(options.onWarnings()); + return builder.build(); + } + } + + /** + * Custom implementation of {@link BasicHeader} that overrides equals and + * hashCode so it is easier to test equality of {@link ApacheHttpClient5Options}. + */ + static final class ReqHeader extends BasicHeader { + ReqHeader(String name, String value) { + super(name, value); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (other instanceof ReqHeader) { + Header otherHeader = (Header) other; + return Objects.equals(getName(), otherHeader.getName()) && Objects.equals(getValue(), otherHeader.getValue()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(getName(), getValue()); + } + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Transport.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Transport.java new file mode 100644 index 0000000000..033cbcaaa7 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5Transport.java @@ -0,0 +1,987 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.httpclient5; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.Map.Entry; +import java.util.concurrent.CancellationException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.zip.GZIPOutputStream; + +import javax.annotation.Nullable; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hc.client5.http.auth.AuthCache; +import org.apache.hc.client5.http.auth.AuthScheme; +import org.apache.hc.client5.http.auth.AuthScope; +import org.apache.hc.client5.http.auth.Credentials; +import org.apache.hc.client5.http.auth.CredentialsProvider; +import org.apache.hc.client5.http.classic.methods.HttpHead; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.entity.GzipDecompressingEntity; +import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient; +import org.apache.hc.client5.http.impl.auth.BasicAuthCache; +import org.apache.hc.client5.http.impl.auth.BasicScheme; +import org.apache.hc.client5.http.protocol.HttpClientContext; +import org.apache.hc.core5.concurrent.FutureCallback; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.core5.http.io.entity.BufferedHttpEntity; +import org.apache.hc.core5.http.io.entity.ByteArrayEntity; +import org.apache.hc.core5.http.io.entity.EntityUtils; +import org.apache.hc.core5.http.io.entity.HttpEntityWrapper; +import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.hc.core5.http.message.RequestLine; +import org.apache.hc.core5.http.nio.AsyncRequestProducer; +import org.apache.hc.core5.http.nio.AsyncResponseConsumer; +import org.apache.hc.core5.net.URIBuilder; +import org.apache.hc.core5.util.Args; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.NdJsonpSerializable; +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.OpenSearchException; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.JsonEndpoint; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.TransportException; +import org.opensearch.client.transport.TransportOptions; +import org.opensearch.client.transport.endpoints.BooleanEndpoint; +import org.opensearch.client.transport.endpoints.BooleanResponse; +import org.opensearch.client.transport.httpclient5.internal.HttpUriRequestProducer; +import org.opensearch.client.transport.httpclient5.internal.Node; +import org.opensearch.client.transport.httpclient5.internal.NodeSelector; +import org.opensearch.client.util.MissingRequiredPropertyException; + +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; + +public class ApacheHttpClient5Transport implements OpenSearchTransport { + private static final Log logger = LogFactory.getLog(ApacheHttpClient5Transport.class); + static final ContentType JsonContentType = ContentType.APPLICATION_JSON; + + private final JsonpMapper mapper; + private final CloseableHttpAsyncClient client; + private final ApacheHttpClient5Options transportOptions; + private final ConcurrentMap denylist = new ConcurrentHashMap<>(); + private final AtomicInteger lastNodeIndex = new AtomicInteger(0); + private volatile NodeTuple> nodeTuple; + private final NodeSelector nodeSelector; + private final WarningsHandler warningsHandler; + private final FailureListener failureListener; + private final boolean compressionEnabled; + private final boolean chunkedEnabled; + private final String pathPrefix; + private final List

defaultHeaders; + + public ApacheHttpClient5Transport(final CloseableHttpAsyncClient client, final Header[] defaultHeaders, + final List nodes, final JsonpMapper mapper, @Nullable TransportOptions options, final String pathPrefix, + final FailureListener failureListener, final NodeSelector nodeSelector, final boolean strictDeprecationMode, + final boolean compressionEnabled, final boolean chunkedEnabled) { + this.mapper = mapper; + this.client = client; + this.defaultHeaders = Collections.unmodifiableList(Arrays.asList(defaultHeaders)); + this.pathPrefix = pathPrefix; + this.transportOptions = (options == null) ? ApacheHttpClient5Options.initialOptions() : ApacheHttpClient5Options.of(options); + this.warningsHandler = strictDeprecationMode ? WarningsHandler.STRICT : WarningsHandler.PERMISSIVE; + this.nodeSelector = (nodeSelector == null) ? NodeSelector.ANY : nodeSelector; + this.failureListener = (failureListener == null) ? new FailureListener() : failureListener; + this.chunkedEnabled = chunkedEnabled; + this.compressionEnabled = compressionEnabled; + setNodes(nodes); + } + + @Override + public ResponseT performRequest(RequestT request, + Endpoint endpoint, TransportOptions options) throws IOException { + try { + return performRequestAsync(request, endpoint, options).join(); + } catch (final CompletionException ex) { + if (ex.getCause() instanceof RuntimeException) { + throw (RuntimeException) ex.getCause(); + } else if (ex.getCause() instanceof IOException) { + throw (IOException) ex.getCause(); + } else { + throw new IOException(ex.getCause()); + } + } + } + + @Override + public CompletableFuture performRequestAsync(RequestT request, + Endpoint endpoint, TransportOptions options) { + + final ApacheHttpClient5Options requestOptions = (options == null) ? transportOptions : ApacheHttpClient5Options.of(options); + final CompletableFuture future = new CompletableFuture<>(); + final HttpUriRequestBase clientReq = prepareLowLevelRequest(request, endpoint, requestOptions); + final WarningsHandler warningsHandler = (requestOptions.getWarningsHandler() == null) ? + this.warningsHandler : requestOptions.getWarningsHandler(); + + try { + performRequestAsync(nextNodes(), requestOptions, clientReq, warningsHandler, future); + } catch(final IOException ex) { + future.completeExceptionally(ex); + } + + return future.thenApply(r -> { + try { + return (ResponseT)prepareResponse(r, endpoint); + } catch (final IOException ex) { + throw new CompletionException(ex); + } + }); + } + + @Override + public JsonpMapper jsonpMapper() { + return mapper; + } + + @Override + public TransportOptions options() { + return transportOptions; + } + + @Override + public void close() throws IOException { + client.close(); + } + + private void performRequestAsync(final NodeTuple> nodeTuple, final ApacheHttpClient5Options options, + final HttpUriRequestBase request, final WarningsHandler warningsHandler, final CompletableFuture listener) { + final RequestContext context = createContextForNextAttempt(options, request, nodeTuple.nodes.next(), nodeTuple.authCache); + Future future = client.execute( + context.requestProducer, + context.asyncResponseConsumer, + context.context, + new FutureCallback() { + @Override + public void completed(ClassicHttpResponse httpResponse) { + try { + ResponseOrResponseException responseOrResponseException = convertResponse(request, context.node, + httpResponse, warningsHandler); + if (responseOrResponseException.responseException == null) { + listener.complete(responseOrResponseException.response); + } else { + if (nodeTuple.nodes.hasNext()) { + performRequestAsync(nodeTuple, options, request, warningsHandler, listener); + } else { + listener.completeExceptionally(responseOrResponseException.responseException); + } + } + } catch (Exception e) { + listener.completeExceptionally(e); + } + } + + @Override + public void failed(Exception failure) { + try { + onFailure(context.node); + if (nodeTuple.nodes.hasNext()) { + performRequestAsync(nodeTuple, options, request, warningsHandler, listener); + } else { + listener.completeExceptionally(failure); + } + } catch (Exception e) { + listener.completeExceptionally(e); + } + } + + @Override + public void cancelled() { + listener.completeExceptionally(new CancellationException("request was cancelled")); + } + } + ); + + if (future instanceof org.apache.hc.core5.concurrent.Cancellable) { + request.setDependency((org.apache.hc.core5.concurrent.Cancellable) future); + } + } + + /** + * Replaces the nodes with which the client communicates. + * + * @param nodes the new nodes to communicate with. + */ + private void setNodes(Collection nodes) { + if (nodes == null || nodes.isEmpty()) { + throw new IllegalArgumentException("nodes must not be null or empty"); + } + AuthCache authCache = new BasicAuthCache(); + + Map nodesByHost = new LinkedHashMap<>(); + for (Node node : nodes) { + Objects.requireNonNull(node, "node cannot be null"); + // TODO should we throw an IAE if we have two nodes with the same host? + nodesByHost.put(node.getHost(), node); + authCache.put(node.getHost(), new BasicScheme()); + } + this.nodeTuple = new NodeTuple<>(Collections.unmodifiableList(new ArrayList<>(nodesByHost.values())), authCache); + this.denylist.clear(); + } + + private ResponseOrResponseException convertResponse(final HttpUriRequestBase request, final Node node, + final ClassicHttpResponse httpResponse, final WarningsHandler warningsHandler) throws IOException { + int statusCode = httpResponse.getCode(); + + Optional.ofNullable(httpResponse.getEntity()) + .map(HttpEntity::getContentEncoding) + .filter("gzip"::equalsIgnoreCase) + .map(gzipHeaderValue -> new GzipDecompressingEntity(httpResponse.getEntity())) + .ifPresent(httpResponse::setEntity); + + Response response = new Response(new RequestLine(request), node.getHost(), httpResponse); + Set ignoreErrorCodes = getIgnoreErrorCodes("400,401,403,404,405", request.getMethod()); + if (isSuccessfulResponse(statusCode) || ignoreErrorCodes.contains(response.getStatusLine().getStatusCode())) { + onResponse(node); + if (warningsHandler.warningsShouldFailRequest(response.getWarnings())) { + throw new WarningFailureException(response); + } + return new ResponseOrResponseException(response); + } + ResponseException responseException = new ResponseException(response); + if (isRetryStatus(statusCode)) { + // mark host dead and retry against next one + onFailure(node); + return new ResponseOrResponseException(responseException); + } + // mark host alive and don't retry, as the error should be a request problem + onResponse(node); + throw responseException; + } + + private static Set getIgnoreErrorCodes(String ignoreString, String requestMethod) { + Set ignoreErrorCodes; + if (ignoreString == null) { + if (HttpHead.METHOD_NAME.equals(requestMethod)) { + // 404 never causes error if returned for a HEAD request + ignoreErrorCodes = Collections.singleton(404); + } else { + ignoreErrorCodes = Collections.emptySet(); + } + } else { + String[] ignoresArray = ignoreString.split(","); + ignoreErrorCodes = new HashSet<>(); + if (HttpHead.METHOD_NAME.equals(requestMethod)) { + // 404 never causes error if returned for a HEAD request + ignoreErrorCodes.add(404); + } + for (String ignoreCode : ignoresArray) { + try { + ignoreErrorCodes.add(Integer.valueOf(ignoreCode)); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("ignore value should be a number, found [" + ignoreString + "] instead", e); + } + } + } + return ignoreErrorCodes; + } + + private static boolean isSuccessfulResponse(int statusCode) { + return statusCode < 300; + } + + private static boolean isRetryStatus(int statusCode) { + switch (statusCode) { + case 502: + case 503: + case 504: + return true; + } + return false; + } + + /** + * Returns a non-empty {@link Iterator} of nodes to be used for a request + * that match the {@link NodeSelector}. + *

+ * If there are no living nodes that match the {@link NodeSelector} + * this will return the dead node that matches the {@link NodeSelector} + * that is closest to being revived. + * @throws IOException if no nodes are available + */ + private NodeTuple> nextNodes() throws IOException { + NodeTuple> nodeTuple = this.nodeTuple; + Iterable hosts = selectNodes(nodeTuple, denylist, lastNodeIndex, nodeSelector); + return new NodeTuple<>(hosts.iterator(), nodeTuple.authCache); + } + + /** + * Select nodes to try and sorts them so that the first one will be tried initially, then the following ones + * if the previous attempt failed and so on. Package private for testing. + */ + static Iterable selectNodes( + NodeTuple> nodeTuple, + Map denylist, + AtomicInteger lastNodeIndex, + NodeSelector nodeSelector + ) throws IOException { + /* + * Sort the nodes into living and dead lists. + */ + List livingNodes = new ArrayList<>(Math.max(0, nodeTuple.nodes.size() - denylist.size())); + List deadNodes = new ArrayList<>(denylist.size()); + for (Node node : nodeTuple.nodes) { + DeadHostState deadness = denylist.get(node.getHost()); + if (deadness == null || deadness.shallBeRetried()) { + livingNodes.add(node); + } else { + deadNodes.add(new DeadNode(node, deadness)); + } + } + + if (false == livingNodes.isEmpty()) { + /* + * Normal state: there is at least one living node. If the + * selector is ok with any over the living nodes then use them + * for the request. + */ + List selectedLivingNodes = new ArrayList<>(livingNodes); + nodeSelector.select(selectedLivingNodes); + if (false == selectedLivingNodes.isEmpty()) { + /* + * Rotate the list using a global counter as the distance so subsequent + * requests will try the nodes in a different order. + */ + Collections.rotate(selectedLivingNodes, lastNodeIndex.getAndIncrement()); + return selectedLivingNodes; + } + } + + /* + * Last resort: there are no good nodes to use, either because + * the selector rejected all the living nodes or because there aren't + * any living ones. Either way, we want to revive a single dead node + * that the NodeSelectors are OK with. We do this by passing the dead + * nodes through the NodeSelector so it can have its say in which nodes + * are ok. If the selector is ok with any of the nodes then we will take + * the one in the list that has the lowest revival time and try it. + */ + if (false == deadNodes.isEmpty()) { + final List selectedDeadNodes = new ArrayList<>(deadNodes); + /* + * We'd like NodeSelectors to remove items directly from deadNodes + * so we can find the minimum after it is filtered without having + * to compare many things. This saves us a sort on the unfiltered + * list. + */ + nodeSelector.select(() -> new DeadNodeIteratorAdapter(selectedDeadNodes.iterator())); + if (false == selectedDeadNodes.isEmpty()) { + return Collections.singletonList(Collections.min(selectedDeadNodes).node); + } + } + throw new IOException( + "NodeSelector [" + nodeSelector + "] rejected all nodes, " + "living " + livingNodes + " and dead " + deadNodes + ); + } + + /** + * Called after each failed attempt. + * Receives as an argument the host that was used for the failed attempt. + */ + private void onFailure(Node node) { + while (true) { + DeadHostState previousDeadHostState = denylist.putIfAbsent( + node.getHost(), + new DeadHostState(DeadHostState.DEFAULT_TIME_SUPPLIER) + ); + if (previousDeadHostState == null) { + if (logger.isDebugEnabled()) { + logger.debug("added [" + node + "] to denylist"); + } + break; + } + if (denylist.replace(node.getHost(), previousDeadHostState, new DeadHostState(previousDeadHostState))) { + if (logger.isDebugEnabled()) { + logger.debug("updated [" + node + "] already in denylist"); + } + break; + } + } + failureListener.onFailure(node); + } + + private RequestContext createContextForNextAttempt(final ApacheHttpClient5Options options, + final HttpUriRequestBase request, final Node node, final AuthCache authCache) { + request.reset(); + return new RequestContext(options, request, node, authCache); + } + + private ResponseT prepareResponse(Response clientResp, + Endpoint endpoint + ) throws IOException { + + try { + int statusCode = clientResp.getStatusLine().getStatusCode(); + + if (endpoint.isError(statusCode)) { + JsonpDeserializer errorDeserializer = endpoint.errorDeserializer(statusCode); + if (errorDeserializer == null) { + throw new TransportException( + "Request failed with status code '" + statusCode + "'", + new ResponseException(clientResp) + ); + } + + HttpEntity entity = clientResp.getEntity(); + if (entity == null) { + throw new TransportException( + "Expecting a response body, but none was sent", + new ResponseException(clientResp) + ); + } + + // We may have to replay it. + entity = new BufferedHttpEntity(entity); + + try { + InputStream content = entity.getContent(); + try (JsonParser parser = mapper.jsonProvider().createParser(content)) { + ErrorT error = errorDeserializer.deserialize(parser, mapper); + // TODO: have the endpoint provide the exception constructor + throw new OpenSearchException((ErrorResponse) error); + } + } catch(MissingRequiredPropertyException errorEx) { + // Could not decode exception, try the response type + try { + ResponseT response = decodeResponse(statusCode, entity, clientResp, endpoint); + return response; + } catch(Exception respEx) { + // No better luck: throw the original error decoding exception + throw new TransportException("Failed to decode error response", new ResponseException(clientResp)); + } + } + } else { + return decodeResponse(statusCode, clientResp.getEntity(), clientResp, endpoint); + } + } finally { + EntityUtils.consume(clientResp.getEntity()); + } + } + + private HttpUriRequestBase prepareLowLevelRequest( + RequestT request, + Endpoint endpoint, + @Nullable ApacheHttpClient5Options options + ) { + final String method = endpoint.method(request); + final String path = endpoint.requestUrl(request); + final Map params = endpoint.queryParameters(request); + + final URI uri = buildUri(pathPrefix, path, params); + final HttpUriRequestBase clientReq = new HttpUriRequestBase(method, uri); + if (endpoint.hasRequestBody()) { + // Request has a body and must implement JsonpSerializable or NdJsonpSerializable + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + if (request instanceof NdJsonpSerializable) { + writeNdJson((NdJsonpSerializable) request, baos); + } else { + JsonGenerator generator = mapper.jsonProvider().createGenerator(baos); + mapper.serialize(request, generator); + generator.close(); + } + + addRequestBody(clientReq, new ByteArrayEntity(baos.toByteArray(), JsonContentType)); + } + + setHeaders(clientReq, options.headers()); + + if (options.getRequestConfig() != null) { + clientReq.setConfig(options.getRequestConfig()); + } + + return clientReq; + } + + private HttpUriRequestBase addRequestBody(HttpUriRequestBase httpRequest, HttpEntity entity) { + if (entity != null) { + if (compressionEnabled) { + if (chunkedEnabled) { + entity = new ContentCompressingEntity(entity, chunkedEnabled); + } else { + entity = new ContentCompressingEntity(entity); + } + } else if (chunkedEnabled) { + entity = new ContentHttpEntity(entity, chunkedEnabled); + } + httpRequest.setEntity(entity); + } + return httpRequest; + } + + private void setHeaders(HttpRequest httpRequest, Collection> requestHeaders) { + // request headers override default headers, so we don't add default headers if they exist as request headers + final Set requestNames = new HashSet<>(requestHeaders.size()); + for (Map.Entry requestHeader : requestHeaders) { + httpRequest.addHeader(new BasicHeader(requestHeader.getKey(), requestHeader.getValue())); + requestNames.add(requestHeader.getKey()); + } + for (Header defaultHeader : defaultHeaders) { + if (requestNames.contains(defaultHeader.getName()) == false) { + httpRequest.addHeader(defaultHeader); + } + } + if (compressionEnabled) { + httpRequest.addHeader("Accept-Encoding", "gzip"); + } + } + /** + * Called after each successful request call. + * Receives as an argument the host that was used for the successful request. + */ + private void onResponse(Node node) { + DeadHostState removedHost = this.denylist.remove(node.getHost()); + if (logger.isDebugEnabled() && removedHost != null) { + logger.debug("removed [" + node + "] from denylist"); + } + } + + private ResponseT decodeResponse( + int statusCode, @Nullable HttpEntity entity, Response clientResp, Endpoint endpoint + ) throws IOException { + + if (endpoint instanceof BooleanEndpoint) { + BooleanEndpoint bep = (BooleanEndpoint) endpoint; + + @SuppressWarnings("unchecked") + ResponseT response = (ResponseT) new BooleanResponse(bep.getResult(statusCode)); + return response; + + } else if (endpoint instanceof JsonEndpoint){ + JsonEndpoint jsonEndpoint = (JsonEndpoint)endpoint; + // Successful response + ResponseT response = null; + JsonpDeserializer responseParser = jsonEndpoint.responseDeserializer(); + if (responseParser != null) { + // Expecting a body + if (entity == null) { + throw new TransportException( + "Expecting a response body, but none was sent", + new ResponseException(clientResp) + ); + } + InputStream content = entity.getContent(); + try (JsonParser parser = mapper.jsonProvider().createParser(content)) { + response = responseParser.deserialize(parser, mapper); + }; + } + return response; + } else { + throw new TransportException("Unhandled endpoint type: '" + endpoint.getClass().getName() + "'"); + } + } + + /** + * {@link NodeTuple} enables the {@linkplain Node}s and {@linkplain AuthCache} + * to be set together in a thread safe, volatile way. + */ + static class NodeTuple { + final T nodes; + final AuthCache authCache; + + NodeTuple(final T nodes, final AuthCache authCache) { + this.nodes = nodes; + this.authCache = authCache; + } + } + + /** + * Contains a reference to a denylisted node and the time until it is + * revived. We use this so we can do a single pass over the denylist. + */ + private static class DeadNode implements Comparable { + final Node node; + final DeadHostState deadness; + + DeadNode(Node node, DeadHostState deadness) { + this.node = node; + this.deadness = deadness; + } + + @Override + public String toString() { + return node.toString(); + } + + @Override + public int compareTo(DeadNode rhs) { + return deadness.compareTo(rhs.deadness); + } + } + + /** + * Adapts an Iterator<DeadNodeAndRevival> into an + * Iterator<Node>. + */ + private static class DeadNodeIteratorAdapter implements Iterator { + private final Iterator itr; + + private DeadNodeIteratorAdapter(Iterator itr) { + this.itr = itr; + } + + @Override + public boolean hasNext() { + return itr.hasNext(); + } + + @Override + public Node next() { + return itr.next().node; + } + + @Override + public void remove() { + itr.remove(); + } + } + + /** + * Write an nd-json value by serializing each of its items on a separate line, recursing if its items themselves implement + * {@link NdJsonpSerializable} to flattening nested structures. + */ + private void writeNdJson(NdJsonpSerializable value, ByteArrayOutputStream baos) { + Iterator values = value._serializables(); + while(values.hasNext()) { + Object item = values.next(); + if (item instanceof NdJsonpSerializable && item != value) { // do not recurse on the item itself + writeNdJson((NdJsonpSerializable) item, baos); + } else { + JsonGenerator generator = mapper.jsonProvider().createGenerator(baos); + mapper.serialize(item, generator); + generator.close(); + baos.write('\n'); + } + } + } + + private static URI buildUri(String pathPrefix, String path, Map params) { + Objects.requireNonNull(path, "path must not be null"); + try { + String fullPath; + if (pathPrefix != null && pathPrefix.isEmpty() == false) { + if (pathPrefix.endsWith("/") && path.startsWith("/")) { + fullPath = pathPrefix.substring(0, pathPrefix.length() - 1) + path; + } else if (pathPrefix.endsWith("/") || path.startsWith("/")) { + fullPath = pathPrefix + path; + } else { + fullPath = pathPrefix + "/" + path; + } + } else { + fullPath = path; + } + + URIBuilder uriBuilder = new URIBuilder(fullPath); + for (Map.Entry param : params.entrySet()) { + uriBuilder.addParameter(param.getKey(), param.getValue()); + } + + // The Apache HttpClient 5.x **does not** encode URIs but Apache HttpClient 4.x does. It leads + // to the issues with Unicode characters (f.e. document IDs could contain Unicode characters) and + // weird characters are being passed instead. By using `toASCIIString()`, the URI is already created + // with proper encoding. + return new URI(uriBuilder.build().toASCIIString()); + } catch (URISyntaxException e) { + throw new IllegalArgumentException(e.getMessage(), e); + } + } + + private static class RequestContext { + private final Node node; + private final AsyncRequestProducer requestProducer; + private final AsyncResponseConsumer asyncResponseConsumer; + private final HttpClientContext context; + + RequestContext(final ApacheHttpClient5Options options, final HttpUriRequestBase request, + final Node node, final AuthCache authCache) { + this.node = node; + this.requestProducer = HttpUriRequestProducer.create(request, node.getHost()); + this.asyncResponseConsumer = options + .getHttpAsyncResponseConsumerFactory() + .createHttpAsyncResponseConsumer(); + this.context = HttpClientContext.create(); + context.setAuthCache(new WrappingAuthCache(context, authCache)); + } + } + + /** + * The Apache HttpClient 5 adds "Authorization" header even if the credentials for basic authentication are not provided + * (effectively, username and password are 'null'). To workaround that, wrapping the AuthCache around current HttpClientContext + * and ensuring that the credentials are indeed provided for particular HttpHost, otherwise returning no authentication scheme + * even if it is present in the cache. + */ + private static class WrappingAuthCache implements AuthCache { + private final HttpClientContext context; + private final AuthCache delegate; + private final boolean usePersistentCredentials = true; + + WrappingAuthCache(HttpClientContext context, AuthCache delegate) { + this.context = context; + this.delegate = delegate; + } + + @Override + public void put(HttpHost host, AuthScheme authScheme) { + delegate.put(host, authScheme); + } + + @Override + public AuthScheme get(HttpHost host) { + AuthScheme authScheme = delegate.get(host); + + if (authScheme != null) { + final CredentialsProvider credsProvider = context.getCredentialsProvider(); + if (credsProvider != null) { + final String schemeName = authScheme.getName(); + final AuthScope authScope = new AuthScope(host, null, schemeName); + final Credentials creds = credsProvider.getCredentials(authScope, context); + + // See please https://issues.apache.org/jira/browse/HTTPCLIENT-2203 + if (authScheme instanceof BasicScheme) { + ((BasicScheme) authScheme).initPreemptive(creds); + } + + if (creds == null) { + return null; + } + } + } + + return authScheme; + } + + @Override + public void remove(HttpHost host) { + if (!usePersistentCredentials) { + delegate.remove(host); + } + } + + @Override + public void clear() { + delegate.clear(); + } + } + + private static class ResponseOrResponseException { + private final Response response; + private final ResponseException responseException; + + ResponseOrResponseException(Response response) { + this.response = Objects.requireNonNull(response); + this.responseException = null; + } + + ResponseOrResponseException(ResponseException responseException) { + this.responseException = Objects.requireNonNull(responseException); + this.response = null; + } + } + + /** + * Listener that allows to be notified whenever a failure happens. Useful when sniffing is enabled, so that we can sniff on failure. + * The default implementation is a no-op. + */ + public static class FailureListener { + /** + * Create a {@link FailureListener} instance. + */ + public FailureListener() {} + + /** + * Notifies that the node provided as argument has just failed. + * + * @param node The node which has failed. + */ + public void onFailure(Node node) {} + } + + /** + * A gzip compressing entity that also implements {@code getContent()}. + */ + public static class ContentCompressingEntity extends HttpEntityWrapper { + private static final String GZIP_CODEC = "gzip"; + + private Optional chunkedEnabled; + + /** + * Creates a {@link ContentCompressingEntity} instance with the provided HTTP entity. + * + * @param entity the HTTP entity. + */ + public ContentCompressingEntity(HttpEntity entity) { + super(entity); + this.chunkedEnabled = Optional.empty(); + } + + /** + * Returns content encoding of the entity, if known. + */ + @Override + public String getContentEncoding() { + return GZIP_CODEC; + } + + /** + * Creates a {@link ContentCompressingEntity} instance with the provided HTTP entity. + * + * @param entity the HTTP entity. + * @param chunkedEnabled force enable/disable chunked transfer-encoding. + */ + public ContentCompressingEntity(HttpEntity entity, boolean chunkedEnabled) { + super(entity); + this.chunkedEnabled = Optional.of(chunkedEnabled); + } + + /** + * Returns a content stream of the entity. + */ + @Override + public InputStream getContent() throws IOException { + ByteArrayInputOutputStream out = new ByteArrayInputOutputStream(1024); + try (GZIPOutputStream gzipOut = new GZIPOutputStream(out)) { + super.writeTo(gzipOut); + } + return out.asInput(); + } + + /** + * A gzip compressing entity doesn't work with chunked encoding with sigv4 + * + * @return false + */ + @Override + public boolean isChunked() { + return chunkedEnabled.orElseGet(super::isChunked); + } + + /** + * A gzip entity requires content length in http headers. + * + * @return content length of gzip entity + */ + @Override + public long getContentLength() { + if (chunkedEnabled.isPresent()) { + if (chunkedEnabled.get()) { + return -1L; + } else { + long size; + try (InputStream is = getContent()) { + size = is.readAllBytes().length; + } catch (IOException ex) { + size = -1L; + } + + return size; + } + } else { + return -1; + } + } + + /** + * Writes the entity content out to the output stream. + * @param outStream the output stream to write entity content to + * @throws IOException if an I/O error occurs + */ + @Override + public void writeTo(final OutputStream outStream) throws IOException { + Args.notNull(outStream, "Output stream"); + final GZIPOutputStream gzip = new GZIPOutputStream(outStream); + super.writeTo(gzip); + // Only close output stream if the wrapped entity has been + // successfully written out + gzip.close(); + } + } + + /** + * An entity that lets the caller specify the return value of {@code isChunked()}. + */ + public static class ContentHttpEntity extends HttpEntityWrapper { + private Optional chunkedEnabled; + + /** + * Creates a {@link ContentHttpEntity} instance with the provided HTTP entity. + * + * @param entity the HTTP entity. + */ + public ContentHttpEntity(HttpEntity entity) { + super(entity); + this.chunkedEnabled = Optional.empty(); + } + + /** + * Creates a {@link ContentHttpEntity} instance with the provided HTTP entity. + * + * @param entity the HTTP entity. + * @param chunkedEnabled force enable/disable chunked transfer-encoding. + */ + public ContentHttpEntity(HttpEntity entity, boolean chunkedEnabled) { + super(entity); + this.chunkedEnabled = Optional.of(chunkedEnabled); + } + + /** + * A chunked entity requires transfer-encoding:chunked in http headers + * which requires isChunked to be true + * + * @return true + */ + @Override + public boolean isChunked() { + return chunkedEnabled.orElseGet(super::isChunked); + } + } + + /** + * A ByteArrayOutputStream that can be turned into an input stream without copying the underlying buffer. + */ + private static class ByteArrayInputOutputStream extends ByteArrayOutputStream { + ByteArrayInputOutputStream(int size) { + super(size); + } + + public InputStream asInput() { + return new ByteArrayInputStream(this.buf, 0, this.count); + } + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5TransportBuilder.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5TransportBuilder.java new file mode 100644 index 0000000000..bf75ba74b4 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5TransportBuilder.java @@ -0,0 +1,407 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.httpclient5; + +import java.security.AccessController; +import java.security.NoSuchAlgorithmException; +import java.security.PrivilegedAction; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; + +import org.apache.hc.client5.http.auth.CredentialsProvider; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.DefaultAuthenticationStrategy; +import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient; +import org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager; +import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder; +import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder; +import org.apache.hc.core5.function.Factory; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.nio.ssl.TlsStrategy; +import org.apache.hc.core5.reactor.ssl.TlsDetails; +import org.apache.hc.core5.util.Timeout; +import org.opensearch.client.RestClient; +import org.opensearch.client.RestClientBuilder; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.transport.TransportOptions; +import org.opensearch.client.transport.httpclient5.internal.Node; +import org.opensearch.client.transport.httpclient5.internal.NodeSelector; + +public class ApacheHttpClient5TransportBuilder { + /** + * The default connection timeout in milliseconds. + */ + public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 1000; + + /** + * The default response timeout in milliseconds. + */ + public static final int DEFAULT_RESPONSE_TIMEOUT_MILLIS = 30000; + + /** + * The default maximum of connections per route. + */ + public static final int DEFAULT_MAX_CONN_PER_ROUTE = 10; + + /** + * The default maximum total connections. + */ + public static final int DEFAULT_MAX_CONN_TOTAL = 30; + + private static final Header[] EMPTY_HEADERS = new Header[0]; + + private final List nodes; + private Header[] defaultHeaders = EMPTY_HEADERS; + private ApacheHttpClient5Transport.FailureListener failureListener; + private HttpClientConfigCallback httpClientConfigCallback; + private RequestConfigCallback requestConfigCallback; + private String pathPrefix; + private NodeSelector nodeSelector = NodeSelector.ANY; + private boolean strictDeprecationMode = false; + private boolean compressionEnabled = false; + private Optional chunkedEnabled; + private JsonpMapper mapper; + private TransportOptions options; + + /** + * Creates a new builder instance and sets the hosts that the client will send requests to. + * + * @throws IllegalArgumentException if {@code nodes} is {@code null} or empty. + */ + ApacheHttpClient5TransportBuilder(List nodes) { + if (nodes == null || nodes.isEmpty()) { + throw new IllegalArgumentException("nodes must not be null or empty"); + } + for (Node node : nodes) { + if (node == null) { + throw new IllegalArgumentException("node cannot be null"); + } + } + this.nodes = nodes; + this.chunkedEnabled = Optional.empty(); + } + + /** + * Sets the default request headers, which will be sent along with each request. + *

+ * Request-time headers will always overwrite any default headers. + * + * @param defaultHeaders array of default header + * @throws NullPointerException if {@code defaultHeaders} or any header is {@code null}. + */ + public ApacheHttpClient5TransportBuilder setDefaultHeaders(Header[] defaultHeaders) { + Objects.requireNonNull(defaultHeaders, "defaultHeaders must not be null"); + for (Header defaultHeader : defaultHeaders) { + Objects.requireNonNull(defaultHeader, "default header must not be null"); + } + this.defaultHeaders = defaultHeaders; + return this; + } + + /** + * Sets the {@link RestClient.FailureListener} to be notified for each request failure + * + * @param failureListener the {@link RestClient.FailureListener} for each failure + * @throws NullPointerException if {@code failureListener} is {@code null}. + */ + public ApacheHttpClient5TransportBuilder setFailureListener(ApacheHttpClient5Transport.FailureListener failureListener) { + Objects.requireNonNull(failureListener, "failureListener must not be null"); + this.failureListener = failureListener; + return this; + } + + /** + * Sets the {@link HttpClientConfigCallback} to be used to customize http client configuration + * + * @param httpClientConfigCallback the {@link HttpClientConfigCallback} to be used + * @throws NullPointerException if {@code httpClientConfigCallback} is {@code null}. + */ + public ApacheHttpClient5TransportBuilder setHttpClientConfigCallback(HttpClientConfigCallback httpClientConfigCallback) { + Objects.requireNonNull(httpClientConfigCallback, "httpClientConfigCallback must not be null"); + this.httpClientConfigCallback = httpClientConfigCallback; + return this; + } + + /** + * Sets the {@link RequestConfigCallback} to be used to customize http client configuration + * + * @param requestConfigCallback the {@link RequestConfigCallback} to be used + * @throws NullPointerException if {@code requestConfigCallback} is {@code null}. + */ + public ApacheHttpClient5TransportBuilder setRequestConfigCallback(RequestConfigCallback requestConfigCallback) { + Objects.requireNonNull(requestConfigCallback, "requestConfigCallback must not be null"); + this.requestConfigCallback = requestConfigCallback; + return this; + } + + /** + * Sets the path's prefix for every request used by the http client. + *

+ * For example, if this is set to "/my/path", then any client request will become "/my/path/" + endpoint. + *

+ * In essence, every request's {@code endpoint} is prefixed by this {@code pathPrefix}. The path prefix is useful for when + * OpenSearch is behind a proxy that provides a base path or a proxy that requires all paths to start with '/'; + * it is not intended for other purposes and it should not be supplied in other scenarios. + * + * @param pathPrefix the path prefix for every request. + * @throws NullPointerException if {@code pathPrefix} is {@code null}. + * @throws IllegalArgumentException if {@code pathPrefix} is empty, or ends with more than one '/'. + */ + public ApacheHttpClient5TransportBuilder setPathPrefix(String pathPrefix) { + this.pathPrefix = cleanPathPrefix(pathPrefix); + return this; + } + + /** + * Sets the {@link JsonpMapper} instance to be used for parsing JSON payloads. If not provided + * the {@link JacksonJsonpMapper} is going to be used. + * @param mapper the {@link JsonpMapper} instance + */ + public ApacheHttpClient5TransportBuilder setMapper(JsonpMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Sets the default {@link TransportOptions} to be used by the client + * @param options default {@link TransportOptions} + */ + public ApacheHttpClient5TransportBuilder setOptions(TransportOptions options) { + this.options = options; + return this; + } + + /** + * Cleans up the given path prefix to ensure that looks like "/base/path". + * + * @param pathPrefix the path prefix to be cleaned up. + * @return the cleaned up path prefix. + * @throws NullPointerException if {@code pathPrefix} is {@code null}. + * @throws IllegalArgumentException if {@code pathPrefix} is empty, or ends with more than one '/'. + */ + public static String cleanPathPrefix(String pathPrefix) { + Objects.requireNonNull(pathPrefix, "pathPrefix must not be null"); + + if (pathPrefix.isEmpty()) { + throw new IllegalArgumentException("pathPrefix must not be empty"); + } + + String cleanPathPrefix = pathPrefix; + if (cleanPathPrefix.startsWith("/") == false) { + cleanPathPrefix = "/" + cleanPathPrefix; + } + + // best effort to ensure that it looks like "/base/path" rather than "/base/path/" + if (cleanPathPrefix.endsWith("/") && cleanPathPrefix.length() > 1) { + cleanPathPrefix = cleanPathPrefix.substring(0, cleanPathPrefix.length() - 1); + + if (cleanPathPrefix.endsWith("/")) { + throw new IllegalArgumentException("pathPrefix is malformed. too many trailing slashes: [" + pathPrefix + "]"); + } + } + return cleanPathPrefix; + } + + /** + * Sets the {@link NodeSelector} to be used for all requests. + * + * @param nodeSelector the {@link NodeSelector} to be used + * @throws NullPointerException if the provided nodeSelector is null + */ + public ApacheHttpClient5TransportBuilder setNodeSelector(NodeSelector nodeSelector) { + Objects.requireNonNull(nodeSelector, "nodeSelector must not be null"); + this.nodeSelector = nodeSelector; + return this; + } + + /** + * Whether the REST client should return any response containing at least + * one warning header as a failure. + * + * @param strictDeprecationMode flag for enabling strict deprecation mode + */ + public ApacheHttpClient5TransportBuilder setStrictDeprecationMode(boolean strictDeprecationMode) { + this.strictDeprecationMode = strictDeprecationMode; + return this; + } + + /** + * Whether the REST client should compress requests using gzip content encoding and add the "Accept-Encoding: gzip" + * header to receive compressed responses. + * + * @param compressionEnabled flag for enabling compression + */ + public ApacheHttpClient5TransportBuilder setCompressionEnabled(boolean compressionEnabled) { + this.compressionEnabled = compressionEnabled; + return this; + } + + /** + * Whether the REST client should use Transfer-Encoding: chunked for requests or not" + * + * @param chunkedEnabled force enable/disable chunked transfer-encoding. + */ + public ApacheHttpClient5TransportBuilder setChunkedEnabled(boolean chunkedEnabled) { + this.chunkedEnabled = Optional.of(chunkedEnabled); + return this; + } + + /** + * Creates a new {@link RestClient} based on the provided configuration. + */ + public ApacheHttpClient5Transport build() { + if (failureListener == null) { + failureListener = new ApacheHttpClient5Transport.FailureListener(); + } + CloseableHttpAsyncClient httpClient = AccessController.doPrivileged( + (PrivilegedAction) this::createHttpClient + ); + + if (mapper == null) { + mapper = new JacksonJsonpMapper(); + } + + final ApacheHttpClient5Transport transport = new ApacheHttpClient5Transport( + httpClient, + defaultHeaders, + nodes, + mapper, + options, + pathPrefix, + failureListener, + nodeSelector, + strictDeprecationMode, + compressionEnabled, + chunkedEnabled.orElse(false) + ); + + httpClient.start(); + return transport; + } + + /** + * Returns a new {@link ApacheHttpClient5TransportBuilder} to help with {@link ApacheHttpClient5Transport} creation. + * Creates a new builder instance and sets the hosts that the client will send requests to. + *

+ * Prefer this to {@link #builder(HttpHost...)} if you have metadata up front about the nodes. + * If you don't either one is fine. + * + * @param nodes The nodes that the client will send requests to. + */ + public static ApacheHttpClient5TransportBuilder builder(Node... nodes) { + return new ApacheHttpClient5TransportBuilder(nodes == null ? null : Arrays.asList(nodes)); + } + + /** + * Returns a new {@link ApacheHttpClient5TransportBuilder} to help with {@link ApacheHttpClient5Transport} creation. + * Creates a new builder instance and sets the nodes that the client will send requests to. + *

+ * You can use this if you do not have metadata up front about the nodes. If you do, prefer + * {@link #builder(Node...)}. + * @see Node#Node(HttpHost) + * + * @param hosts The hosts that the client will send requests to. + */ + public static ApacheHttpClient5TransportBuilder builder(HttpHost... hosts) { + if (hosts == null || hosts.length == 0) { + throw new IllegalArgumentException("hosts must not be null nor empty"); + } + List nodes = Arrays.stream(hosts).map(Node::new).collect(Collectors.toList()); + return new ApacheHttpClient5TransportBuilder(nodes); + } + + private CloseableHttpAsyncClient createHttpClient() { + // default timeouts are all infinite + RequestConfig.Builder requestConfigBuilder = RequestConfig.custom() + .setConnectTimeout(Timeout.ofMilliseconds(DEFAULT_CONNECT_TIMEOUT_MILLIS)) + .setResponseTimeout(Timeout.ofMilliseconds(DEFAULT_RESPONSE_TIMEOUT_MILLIS)); + + if (requestConfigCallback != null) { + requestConfigBuilder = requestConfigCallback.customizeRequestConfig(requestConfigBuilder); + } + + try { + final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create() + .setSslContext(SSLContext.getDefault()) + // See https://issues.apache.org/jira/browse/HTTPCLIENT-2219 + .setTlsDetailsFactory(new Factory() { + @Override + public TlsDetails create(final SSLEngine sslEngine) { + return new TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol()); + } + }) + .build(); + + final PoolingAsyncClientConnectionManager connectionManager = PoolingAsyncClientConnectionManagerBuilder.create() + .setMaxConnPerRoute(DEFAULT_MAX_CONN_PER_ROUTE) + .setMaxConnTotal(DEFAULT_MAX_CONN_TOTAL) + .setTlsStrategy(tlsStrategy) + .build(); + + HttpAsyncClientBuilder httpClientBuilder = HttpAsyncClientBuilder.create() + .setDefaultRequestConfig(requestConfigBuilder.build()) + .setConnectionManager(connectionManager) + .setTargetAuthenticationStrategy(DefaultAuthenticationStrategy.INSTANCE) + .disableAutomaticRetries(); + if (httpClientConfigCallback != null) { + httpClientBuilder = httpClientConfigCallback.customizeHttpClient(httpClientBuilder); + } + + final HttpAsyncClientBuilder finalBuilder = httpClientBuilder; + return AccessController.doPrivileged((PrivilegedAction) finalBuilder::build); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException("could not create the default ssl context", e); + } + } + + /** + * Callback used the default {@link RequestConfig} being set to the {@link CloseableHttpClient} + * @see HttpClientBuilder#setDefaultRequestConfig + */ + public interface RequestConfigCallback { + /** + * Allows to customize the {@link RequestConfig} that will be used with each request. + * It is common to customize the different timeout values through this method without losing any other useful default + * value that the {@link RestClientBuilder} internally sets. + * + * @param requestConfigBuilder the {@link RestClientBuilder} for customizing the request configuration. + */ + RequestConfig.Builder customizeRequestConfig(RequestConfig.Builder requestConfigBuilder); + } + + /** + * Callback used to customize the {@link CloseableHttpClient} instance used by a {@link RestClient} instance. + * Allows to customize default {@link RequestConfig} being set to the client and any parameter that + * can be set through {@link HttpClientBuilder} + */ + public interface HttpClientConfigCallback { + /** + * Allows to customize the {@link CloseableHttpAsyncClient} being created and used by the {@link RestClient}. + * Commonly used to customize the default {@link CredentialsProvider} for authentication for communication + * through TLS/SSL without losing any other useful default value that the {@link RestClientBuilder} internally + * sets, like connection pooling. + * + * @param httpClientBuilder the {@link HttpClientBuilder} for customizing the client instance. + */ + HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder); + } + + +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/DeadHostState.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/DeadHostState.java new file mode 100644 index 0000000000..a09afde125 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/DeadHostState.java @@ -0,0 +1,125 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5; + +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; + +/** + * Holds the state of a dead connection to a host. Keeps track of how many failed attempts were performed and + * when the host should be retried (based on number of previous failed attempts). + * Class is immutable, a new copy of it should be created each time the state has to be changed. + */ +final class DeadHostState implements Comparable { + + private static final long MIN_CONNECTION_TIMEOUT_NANOS = TimeUnit.MINUTES.toNanos(1); + static final long MAX_CONNECTION_TIMEOUT_NANOS = TimeUnit.MINUTES.toNanos(30); + static final Supplier DEFAULT_TIME_SUPPLIER = System::nanoTime; + + private final int failedAttempts; + private final long deadUntilNanos; + private final Supplier timeSupplier; + + /** + * Build the initial dead state of a host. Useful when a working host stops functioning + * and needs to be marked dead after its first failure. In such case the host will be retried after a minute or so. + * + * @param timeSupplier a way to supply the current time and allow for unit testing + */ + DeadHostState(Supplier timeSupplier) { + this.failedAttempts = 1; + this.deadUntilNanos = timeSupplier.get() + MIN_CONNECTION_TIMEOUT_NANOS; + this.timeSupplier = timeSupplier; + } + + /** + * Build the dead state of a host given its previous dead state. Useful when a host has been failing before, hence + * it already failed for one or more consecutive times. The more failed attempts we register the longer we wait + * to retry that same host again. Minimum is 1 minute (for a node the only failed once created + * through {@link #DeadHostState(Supplier)}), maximum is 30 minutes (for a node that failed more than 10 consecutive times) + * + * @param previousDeadHostState the previous state of the host which allows us to increase the wait till the next retry attempt + */ + DeadHostState(DeadHostState previousDeadHostState) { + long timeoutNanos = (long) Math.min( + MIN_CONNECTION_TIMEOUT_NANOS * 2 * Math.pow(2, previousDeadHostState.failedAttempts * 0.5 - 1), + MAX_CONNECTION_TIMEOUT_NANOS + ); + this.deadUntilNanos = previousDeadHostState.timeSupplier.get() + timeoutNanos; + this.failedAttempts = previousDeadHostState.failedAttempts + 1; + this.timeSupplier = previousDeadHostState.timeSupplier; + } + + /** + * Indicates whether it's time to retry to failed host or not. + * + * @return true if the host should be retried, false otherwise + */ + boolean shallBeRetried() { + return timeSupplier.get() - deadUntilNanos > 0; + } + + /** + * Returns the timestamp (nanos) till the host is supposed to stay dead without being retried. + * After that the host should be retried. + */ + long getDeadUntilNanos() { + return deadUntilNanos; + } + + int getFailedAttempts() { + return failedAttempts; + } + + @Override + public int compareTo(DeadHostState other) { + if (timeSupplier != other.timeSupplier) { + throw new IllegalArgumentException( + "can't compare DeadHostStates holding different time suppliers as they may be based on different clocks" + ); + } + return Long.compare(deadUntilNanos, other.deadUntilNanos); + } + + @Override + public String toString() { + return "DeadHostState{" + + "failedAttempts=" + + failedAttempts + + ", deadUntilNanos=" + + deadUntilNanos + + ", timeSupplier=" + + timeSupplier + + '}'; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/HttpAsyncResponseConsumerFactory.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/HttpAsyncResponseConsumerFactory.java new file mode 100644 index 0000000000..c9322f473e --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/HttpAsyncResponseConsumerFactory.java @@ -0,0 +1,86 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5; + +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.nio.AsyncResponseConsumer; +import org.opensearch.client.transport.httpclient5.internal.HeapBufferedAsyncResponseConsumer; + +/** + * Factory used to create instances of {@link AsyncResponseConsumer}. Each request retry needs its own instance of the + * consumer object. Users can implement this interface and pass their own instance to the specialized + * performRequest methods that accept an {@link HttpAsyncResponseConsumerFactory} instance as argument. + */ +public interface HttpAsyncResponseConsumerFactory { + + /** + * Creates the default type of {@link AsyncResponseConsumer}, based on heap buffering with a buffer limit of 100MB. + */ + HttpAsyncResponseConsumerFactory DEFAULT = new HeapBufferedResponseConsumerFactory( + HeapBufferedResponseConsumerFactory.DEFAULT_BUFFER_LIMIT); + + /** + * Creates the {@link AsyncResponseConsumer}, called once per request attempt. + */ + AsyncResponseConsumer createHttpAsyncResponseConsumer(); + + /** + * Default factory used to create instances of {@link AsyncResponseConsumer}. + * Creates one instance of {@link HeapBufferedAsyncResponseConsumer} for each request attempt, with a configurable + * buffer limit which defaults to 100MB. + */ + class HeapBufferedResponseConsumerFactory implements HttpAsyncResponseConsumerFactory { + + // default buffer limit is 100MB + static final int DEFAULT_BUFFER_LIMIT = 100 * 1024 * 1024; + + private final int bufferLimit; + + /** + * Creates a {@link HeapBufferedResponseConsumerFactory} instance with the given buffer limit. + * + * @param bufferLimitBytes the buffer limit to be applied to this instance + */ + public HeapBufferedResponseConsumerFactory(int bufferLimitBytes) { + this.bufferLimit = bufferLimitBytes; + } + + /** + * Creates the {@link AsyncResponseConsumer}, called once per request attempt. + */ + @Override + public AsyncResponseConsumer createHttpAsyncResponseConsumer() { + return new HeapBufferedAsyncResponseConsumer(bufferLimit); + } + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/Response.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/Response.java new file mode 100644 index 0000000000..2f36d517de --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/Response.java @@ -0,0 +1,214 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5; + +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.HttpResponse; +import org.apache.hc.core5.http.message.RequestLine; +import org.apache.hc.core5.http.message.StatusLine; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Holds an opensearch response. It wraps the {@link HttpResponse} returned and associates it with + * its corresponding {@link RequestLine} and {@link HttpHost}. + */ +final class Response { + + private final RequestLine requestLine; + private final HttpHost host; + private final ClassicHttpResponse response; + + Response(RequestLine requestLine, HttpHost host, ClassicHttpResponse response) { + Objects.requireNonNull(requestLine, "requestLine cannot be null"); + Objects.requireNonNull(host, "host cannot be null"); + Objects.requireNonNull(response, "response cannot be null"); + this.requestLine = requestLine; + this.host = host; + this.response = response; + } + + /** + * Returns the request line that generated this response + */ + public RequestLine getRequestLine() { + return requestLine; + } + + /** + * Returns the node that returned this response + */ + public HttpHost getHost() { + return host; + } + + /** + * Returns the status line of the current response + */ + public StatusLine getStatusLine() { + return new StatusLine(response); + } + + /** + * Returns all the response headers + */ + public Header[] getHeaders() { + return response.getHeaders(); + } + + /** + * Returns the value of the first header with a specified name of this message. + * If there is more than one matching header in the message the first element is returned. + * If there is no matching header in the message null is returned. + * + * @param name header name + */ + public String getHeader(String name) { + Header header = response.getFirstHeader(name); + if (header == null) { + return null; + } + return header.getValue(); + } + + /** + * Returns the response body available, null otherwise + * @see HttpEntity + */ + public HttpEntity getEntity() { + return response.getEntity(); + } + + /** + * Optimized regular expression to test if a string matches the RFC 1123 date + * format (with quotes and leading space). Start/end of line characters and + * atomic groups are used to prevent backtracking. + */ + private static final Pattern WARNING_HEADER_DATE_PATTERN = Pattern.compile("^ " + // start of line, leading space + // quoted RFC 1123 date format + "\"" + // opening quote + "(?>Mon|Tue|Wed|Thu|Fri|Sat|Sun), " + // day of week, atomic group to prevent backtracking + "\\d{2} " + // 2-digit day + "(?>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) " + // month, atomic group to prevent backtracking + "\\d{4} " + // 4-digit year + "\\d{2}:\\d{2}:\\d{2} " + // (two-digit hour):(two-digit minute):(two-digit second) + "GMT" + // GMT + "\"$"); // closing quote (optional, since an older version can still send a warn-date), end of line + + /** + * Length of RFC 1123 format (with quotes and leading space), used in + * matchWarningHeaderPatternByPrefix(String). + */ + private static final int WARNING_HEADER_DATE_LENGTH = 0 + 1 + 1 + 3 + 1 + 1 + 2 + 1 + 3 + 1 + 4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 3 + 1; + + /** + * Tests if a string matches the RFC 7234 specification for warning headers. + * This assumes that the warn code is always 299 and the warn agent is always + * OpenSearch. + * + * @param s the value of a warning header formatted according to RFC 7234 + * @return {@code true} if the input string matches the specification + */ + private static boolean matchWarningHeaderPatternByPrefix(final String s) { + return s.startsWith("299 OpenSearch-"); + } + + /** + * Refer to org.opensearch.common.logging.DeprecationLogger + */ + private static String extractWarningValueFromWarningHeader(final String s) { + String warningHeader = s; + + /* + * The following block tests for the existence of a RFC 1123 date in the warning header. If the date exists, it is removed for + * extractWarningValueFromWarningHeader(String) to work properly (as it does not handle dates). + */ + if (s.length() > WARNING_HEADER_DATE_LENGTH) { + final String possibleDateString = s.substring(s.length() - WARNING_HEADER_DATE_LENGTH); + final Matcher matcher = WARNING_HEADER_DATE_PATTERN.matcher(possibleDateString); + + if (matcher.matches()) { + warningHeader = warningHeader.substring(0, s.length() - WARNING_HEADER_DATE_LENGTH); + } + } + + final int firstQuote = warningHeader.indexOf('\"'); + final int lastQuote = warningHeader.length() - 1; + final String warningValue = warningHeader.substring(firstQuote + 1, lastQuote); + return warningValue; + } + + /** + * Returns a list of all warning headers returned in the response. + */ + public List getWarnings() { + List warnings = new ArrayList<>(); + for (Header header : response.getHeaders("Warning")) { + String warning = header.getValue(); + if (matchWarningHeaderPatternByPrefix(warning)) { + warnings.add(extractWarningValueFromWarningHeader(warning)); + } else { + warnings.add(warning); + } + } + return warnings; + } + + /** + * Returns true if there is at least one warning header returned in the + * response. + */ + public boolean hasWarnings() { + Header[] warnings = response.getHeaders("Warning"); + return warnings != null && warnings.length > 0; + } + + ClassicHttpResponse getHttpResponse() { + return response; + } + + /** + * Convert response to string representation + */ + @Override + public String toString() { + return "Response{" + "requestLine=" + requestLine + ", host=" + host + ", response=" + getStatusLine() + '}'; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ResponseException.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ResponseException.java new file mode 100644 index 0000000000..6cd0358a93 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ResponseException.java @@ -0,0 +1,96 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5; + +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.ParseException; +import org.apache.hc.core5.http.io.entity.BufferedHttpEntity; +import org.apache.hc.core5.http.io.entity.EntityUtils; + +import java.io.IOException; +import java.util.Locale; + +/** + * Exception thrown when an opensearch node responds to a request with a status code that indicates an error. + * Holds the response that was returned. + */ +public final class ResponseException extends IOException { + + private final Response response; + + /** + * Creates a ResponseException containing the given {@code Response}. + * + * @param response The error response. + */ + ResponseException(Response response) throws IOException { + super(buildMessage(response)); + this.response = response; + } + + static String buildMessage(Response response) throws IOException { + String message = String.format( + Locale.ROOT, + "method [%s], host [%s], URI [%s], status line [%s]", + response.getRequestLine().getMethod(), + response.getHost(), + response.getRequestLine().getUri(), + response.getStatusLine().toString() + ); + + if (response.hasWarnings()) { + message += "\n" + "Warnings: " + response.getWarnings(); + } + + HttpEntity entity = response.getEntity(); + if (entity != null) { + if (entity.isRepeatable() == false) { + entity = new BufferedHttpEntity(entity); + response.getHttpResponse().setEntity(entity); + } + try { + message += "\n" + EntityUtils.toString(entity); + } catch (final ParseException ex) { + throw new IOException(ex); + } + } + return message; + } + + /** + * Returns the {@link Response} that caused this exception to be thrown. + */ + public Response getResponse() { + return response; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningFailureException.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningFailureException.java new file mode 100644 index 0000000000..8627fd9d0c --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningFailureException.java @@ -0,0 +1,76 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5; + +import java.io.IOException; + +/** + * This exception is used to indicate that one or more {@link Response#getWarnings()} exist + * and is typically used when the {@link ApacheHttpClient5Transport} is set to fail by passing + * `true` to `strictDeprecationMode`. + */ +// This class extends RuntimeException in order to deal with wrapping that is done in FutureUtils on exception. +// if the exception is not of type OpenSearchException or RuntimeException it will be wrapped in a UncategorizedExecutionException +public final class WarningFailureException extends RuntimeException { + private final Response response; + + /** + * Creates a {@link WarningFailureException} instance. + * + * @param response the response that contains warnings. + * @throws IOException if there is a problem building the exception message. + */ + public WarningFailureException(Response response) throws IOException { + super(ResponseException.buildMessage(response)); + this.response = response; + } + + /** + * Wrap a {@linkplain WarningFailureException} with another one with the current + * stack trace. This is used during synchronous calls so that the caller + * ends up in the stack trace of the exception thrown. + * + * @param e the exception to be wrapped. + */ + WarningFailureException(WarningFailureException e) { + super(e.getMessage(), e); + this.response = e.getResponse(); + } + + /** + * Returns the {@link Response} that caused this exception to be thrown. + */ + public Response getResponse() { + return response; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningsHandler.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningsHandler.java new file mode 100644 index 0000000000..1a0b73d07d --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/WarningsHandler.java @@ -0,0 +1,80 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5; + +import java.util.List; + +/** + * Called if there are warnings to determine if those warnings should fail the + * request. + */ +public interface WarningsHandler { + + /** + * Determines whether the given list of warnings should fail the request. + * + * @param warnings a list of warnings. + * @return boolean indicating if the request should fail. + */ + boolean warningsShouldFailRequest(List warnings); + + /** + * The permissive warnings handler. Warnings will not fail the request. + */ + WarningsHandler PERMISSIVE = new WarningsHandler() { + @Override + public boolean warningsShouldFailRequest(List warnings) { + return false; + } + + @Override + public String toString() { + return "permissive"; + } + }; + + /** + * The strict warnings handler. Warnings will fail the request. + */ + WarningsHandler STRICT = new WarningsHandler() { + @Override + public boolean warningsShouldFailRequest(List warnings) { + return false == warnings.isEmpty(); + } + + @Override + public String toString() { + return "strict"; + } + }; +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java new file mode 100644 index 0000000000..aa4d73a237 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java @@ -0,0 +1,139 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import org.apache.hc.core5.http.ContentTooLongException; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.nio.AsyncEntityConsumer; +import org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer; +import org.apache.hc.core5.util.ByteArrayBuffer; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.concurrent.atomic.AtomicReference; + +/** + * Default implementation of {@link AsyncEntityConsumer}. Buffers the whole + * response content in heap memory, meaning that the size of the buffer is equal to the content-length of the response. + * Limits the size of responses that can be read based on a configurable argument. Throws an exception in case the entity is longer + * than the configured buffer limit. + */ +public class HeapBufferedAsyncEntityConsumer extends AbstractBinAsyncEntityConsumer { + + private final int bufferLimitBytes; + private AtomicReference bufferRef = new AtomicReference<>(); + + /** + * Creates a new instance of this consumer with the provided buffer limit. + * + * @param bufferLimit the buffer limit. Must be greater than 0. + * @throws IllegalArgumentException if {@code bufferLimit} is less than or equal to 0. + */ + public HeapBufferedAsyncEntityConsumer(int bufferLimit) { + if (bufferLimit <= 0) { + throw new IllegalArgumentException("bufferLimit must be greater than 0"); + } + this.bufferLimitBytes = bufferLimit; + } + + /** + * Get the limit of the buffer. + */ + public int getBufferLimit() { + return bufferLimitBytes; + } + + /** + * Triggered to signal beginning of entity content stream. + * + * @param contentType the entity content type + */ + @Override + protected void streamStart(final ContentType contentType) throws HttpException, IOException {} + + /** + * Triggered to obtain the capacity increment. + * + * @return the number of bytes this consumer is prepared to process. + */ + @Override + protected int capacityIncrement() { + return Integer.MAX_VALUE; + } + + /** + * Triggered to pass incoming data packet to the data consumer. + * + * @param src the data packet. + * @param endOfStream flag indicating whether this data packet is the last in the data stream. + * + */ + @Override + protected void data(final ByteBuffer src, final boolean endOfStream) throws IOException { + if (src == null) { + return; + } + + ByteArrayBuffer buffer = bufferRef.get(); + if (buffer == null) { + buffer = new ByteArrayBuffer(bufferLimitBytes); + if (bufferRef.compareAndSet(null, buffer) == false) { + buffer = bufferRef.get(); + } + } + + int len = src.limit(); + if (buffer.length() + len > bufferLimitBytes) { + throw new ContentTooLongException( + "entity content is too long [" + len + "] for the configured buffer limit [" + bufferLimitBytes + "]" + ); + } + + if (len < 0) { + len = 4096; + } + + if (src.hasArray()) { + buffer.append(src.array(), src.arrayOffset() + src.position(), src.remaining()); + } else { + while (src.hasRemaining()) { + buffer.append(src.get()); + } + } + } + + /** + * Triggered to generate entity representation. + * + * @return the entity content + */ + @Override + protected byte[] generateContent() throws IOException { + final ByteArrayBuffer buffer = bufferRef.get(); + return buffer == null ? new byte[0] : buffer.toByteArray(); + } + + /** + * Release resources being held + */ + @Override + public void releaseResources() { + ByteArrayBuffer buffer = bufferRef.getAndSet(null); + if (buffer != null) { + buffer.clear(); + buffer = null; + } + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncResponseConsumer.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncResponseConsumer.java new file mode 100644 index 0000000000..4d0ceb66e7 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncResponseConsumer.java @@ -0,0 +1,123 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.http.HttpResponse; +import org.apache.hc.core5.http.io.entity.ByteArrayEntity; +import org.apache.hc.core5.http.message.BasicClassicHttpResponse; +import org.apache.hc.core5.http.nio.AsyncResponseConsumer; +import org.apache.hc.core5.http.nio.support.AbstractAsyncResponseConsumer; +import org.apache.hc.core5.http.protocol.HttpContext; + +import java.io.IOException; + +/** + * Default implementation of {@link AsyncResponseConsumer}. Buffers the whole + * response content in heap memory, meaning that the size of the buffer is equal to the content-length of the response. + * Limits the size of responses that can be read based on a configurable argument. Throws an exception in case the entity is longer + * than the configured buffer limit. + */ +public class HeapBufferedAsyncResponseConsumer extends AbstractAsyncResponseConsumer { + private static final Log LOGGER = LogFactory.getLog(HeapBufferedAsyncResponseConsumer.class); + private final int bufferLimit; + + /** + * Creates a new instance of this consumer with the provided buffer limit. + * + * @param bufferLimit the buffer limit. Must be greater than 0. + * @throws IllegalArgumentException if {@code bufferLimit} is less than or equal to 0. + */ + public HeapBufferedAsyncResponseConsumer(int bufferLimit) { + super(new HeapBufferedAsyncEntityConsumer(bufferLimit)); + this.bufferLimit = bufferLimit; + } + + /** + * Get the limit of the buffer. + */ + public int getBufferLimit() { + return bufferLimit; + } + + /** + * Triggered to signal receipt of an intermediate (1xx) HTTP response. + * + * @param response the intermediate (1xx) HTTP response. + * @param context the actual execution context. + */ + @Override + public void informationResponse(final HttpResponse response, final HttpContext context) throws HttpException, IOException {} + + /** + * Triggered to generate object that represents a result of response message processing. + * @param response the response message. + * @param entity the response entity. + * @param contentType the response content type. + * @return the result of response processing. + */ + @Override + protected ClassicHttpResponse buildResult(final HttpResponse response, final byte[] entity, final ContentType contentType) { + final ClassicHttpResponse classicResponse = new BasicClassicHttpResponse(response.getCode()); + classicResponse.setVersion(response.getVersion()); + classicResponse.setHeaders(response.getHeaders()); + classicResponse.setReasonPhrase(response.getReasonPhrase()); + if (response.getLocale() != null) { + classicResponse.setLocale(response.getLocale()); + } + + if (entity != null) { + String encoding = null; + + try { + final Header contentEncoding = response.getHeader(HttpHeaders.CONTENT_ENCODING); + if (contentEncoding != null) { + encoding = contentEncoding.getValue(); + } + } catch (final HttpException ex) { + LOGGER.debug("Unable to detect content encoding", ex); + } + + final ByteArrayEntity httpEntity = new ByteArrayEntity(entity, contentType, encoding); + classicResponse.setEntity(httpEntity); + } + + return classicResponse; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpEntityAsyncEntityProducer.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpEntityAsyncEntityProducer.java new file mode 100644 index 0000000000..1c669a55c7 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpEntityAsyncEntityProducer.java @@ -0,0 +1,182 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.nio.AsyncEntityProducer; +import org.apache.hc.core5.http.nio.DataStreamChannel; +import org.apache.hc.core5.http.nio.ResourceHolder; +import org.apache.hc.core5.util.Args; +import org.apache.hc.core5.util.Asserts; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Set; +import java.util.concurrent.atomic.AtomicReference; + +/** + * The {@link AsyncEntityProducer} implementation for {@link HttpEntity} + */ +public class HttpEntityAsyncEntityProducer implements AsyncEntityProducer { + + private final HttpEntity entity; + private final ByteBuffer byteBuffer; + private final boolean chunked; + private final AtomicReference exception; + private final AtomicReference channelRef; + private boolean eof; + + /** + * Create new async HTTP entity producer + * @param entity HTTP entity + * @param bufferSize buffer size + */ + public HttpEntityAsyncEntityProducer(final HttpEntity entity, final int bufferSize) { + this.entity = Args.notNull(entity, "Http Entity"); + this.byteBuffer = ByteBuffer.allocate(bufferSize); + this.chunked = entity.isChunked(); + this.exception = new AtomicReference<>(); + this.channelRef = new AtomicReference<>(); + } + + /** + * Create new async HTTP entity producer with default buffer size (8192 bytes) + * @param entity HTTP entity + */ + public HttpEntityAsyncEntityProducer(final HttpEntity entity) { + this(entity, 8192); + } + + /** + * Determines whether the producer can consistently produce the same content + * after invocation of {@link ResourceHolder#releaseResources()}. + */ + @Override + public boolean isRepeatable() { + return entity.isRepeatable(); + } + + /** + * Returns content type of the entity, if known. + */ + @Override + public String getContentType() { + return entity.getContentType(); + } + + /** + * Returns length of the entity, if known. + */ + @Override + public long getContentLength() { + return entity.getContentLength(); + } + + /** + * Returns the number of bytes immediately available for output. + * This method can be used as a hint to control output events + * of the underlying I/O session. + * + * @return the number of bytes immediately available for output + */ + @Override + public int available() { + return Integer.MAX_VALUE; + } + + /** + * Returns content encoding of the entity, if known. + */ + @Override + public String getContentEncoding() { + return entity.getContentEncoding(); + } + + /** + * Returns chunked transfer hint for this entity. + *

+ * The behavior of wrapping entities is implementation dependent, + * but should respect the primary purpose. + *

+ */ + @Override + public boolean isChunked() { + return chunked; + } + + /** + * Preliminary declaration of trailing headers. + */ + @Override + public Set getTrailerNames() { + return entity.getTrailerNames(); + } + + /** + * Triggered to signal the ability of the underlying data channel + * to accept more data. The data producer can choose to write data + * immediately inside the call or asynchronously at some later point. + * + * @param channel the data channel capable to accepting more data. + */ + @Override + public void produce(final DataStreamChannel channel) throws IOException { + ReadableByteChannel stream = channelRef.get(); + if (stream == null) { + stream = Channels.newChannel(entity.getContent()); + Asserts.check(channelRef.getAndSet(stream) == null, "Illegal producer state"); + } + if (!eof) { + final int bytesRead = stream.read(byteBuffer); + if (bytesRead < 0) { + eof = true; + } + } + if (byteBuffer.position() > 0) { + byteBuffer.flip(); + channel.write(byteBuffer); + byteBuffer.compact(); + } + if (eof && byteBuffer.position() == 0) { + channel.endStream(); + releaseResources(); + } + } + + /** + * Triggered to signal a failure in data generation. + * + * @param cause the cause of the failure. + */ + @Override + public void failed(final Exception cause) { + if (exception.compareAndSet(null, cause)) { + releaseResources(); + } + } + + /** + * Release resources being held + */ + @Override + public void releaseResources() { + eof = false; + final ReadableByteChannel stream = channelRef.getAndSet(null); + if (stream != null) { + try { + stream.close(); + } catch (final IOException ex) { + /* Close quietly */ + } + } + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpUriRequestProducer.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpUriRequestProducer.java new file mode 100644 index 0000000000..b9940009c7 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HttpUriRequestProducer.java @@ -0,0 +1,62 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.nio.AsyncEntityProducer; +import org.apache.hc.core5.http.nio.support.BasicRequestProducer; +import org.apache.hc.core5.net.URIAuthority; +import org.apache.hc.core5.util.Args; + +/** + * The producer of the {@link HttpUriRequestBase} instances associated with a particular {@link HttpHost} + */ +public class HttpUriRequestProducer extends BasicRequestProducer { + private final HttpUriRequestBase request; + + HttpUriRequestProducer(final HttpUriRequestBase request, final AsyncEntityProducer entityProducer) { + super(request, entityProducer); + this.request = request; + } + + /** + * Get the produced {@link HttpUriRequestBase} instance + * @return produced {@link HttpUriRequestBase} instance + */ + public HttpUriRequestBase getRequest() { + return request; + } + + /** + * Create new request producer for {@link HttpUriRequestBase} instance and {@link HttpHost} + * @param request {@link HttpUriRequestBase} instance + * @param host {@link HttpHost} instance + * @return new request producer + */ + public static HttpUriRequestProducer create(final HttpUriRequestBase request, final HttpHost host) { + Args.notNull(request, "Request"); + Args.notNull(host, "HttpHost"); + + // TODO: Should we copy request here instead of modifying in place? + request.setAuthority(new URIAuthority(host)); + request.setScheme(host.getSchemeName()); + + final HttpEntity entity = request.getEntity(); + AsyncEntityProducer entityProducer = null; + + if (entity != null) { + entityProducer = new HttpEntityAsyncEntityProducer(entity); + } + + return new HttpUriRequestProducer(request, entityProducer); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/Node.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/Node.java new file mode 100644 index 0000000000..8f55f67cde --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/Node.java @@ -0,0 +1,289 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import org.apache.hc.core5.http.HttpHost; + +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeSet; + +/** + * Metadata about an {@link HttpHost} running OpenSearch. + */ +public class Node { + /** + * Address that this host claims is its primary contact point. + */ + private final HttpHost host; + /** + * Addresses on which the host is listening. These are useful to have + * around because they allow you to find a host based on any address it + * is listening on. + */ + private final Set boundHosts; + /** + * Name of the node as configured by the {@code node.name} attribute. + */ + private final String name; + /** + * Version of OpenSearch that the node is running or {@code null} + * if we don't know the version. + */ + private final String version; + /** + * Roles that the OpenSearch process on the host has or {@code null} + * if we don't know what roles the node has. + */ + private final Roles roles; + /** + * Attributes declared on the node. + */ + private final Map> attributes; + + /** + * Create a {@linkplain Node} with metadata. All parameters except + * {@code host} are nullable and implementations of {@link NodeSelector} + * need to decide what to do in their absence. + * + * @param host primary host address + * @param boundHosts addresses on which the host is listening + * @param name name of the node + * @param version version of OpenSearch + * @param roles roles that the OpenSearch process has on the host + * @param attributes attributes declared on the node + */ + public Node(HttpHost host, Set boundHosts, String name, String version, Roles roles, Map> attributes) { + if (host == null) { + throw new IllegalArgumentException("host cannot be null"); + } + this.host = host; + this.boundHosts = boundHosts; + this.name = name; + this.version = version; + this.roles = roles; + this.attributes = attributes; + } + + /** + * Create a {@linkplain Node} without any metadata. + * + * @param host primary host address + */ + public Node(HttpHost host) { + this(host, null, null, null, null, null); + } + + /** + * Contact information for the host. + */ + public HttpHost getHost() { + return host; + } + + /** + * Addresses on which the host is listening. These are useful to have + * around because they allow you to find a host based on any address it + * is listening on. + */ + public Set getBoundHosts() { + return boundHosts; + } + + /** + * The {@code node.name} of the node. + */ + public String getName() { + return name; + } + + /** + * Version of OpenSearch that the node is running or {@code null} + * if we don't know the version. + */ + public String getVersion() { + return version; + } + + /** + * Roles that the OpenSearch process on the host has or {@code null} + * if we don't know what roles the node has. + */ + public Roles getRoles() { + return roles; + } + + /** + * Attributes declared on the node. + */ + public Map> getAttributes() { + return attributes; + } + + /** + * Convert node to string representation + */ + @Override + public String toString() { + StringBuilder b = new StringBuilder(); + b.append("[host=").append(host); + if (boundHosts != null) { + b.append(", bound=").append(boundHosts); + } + if (name != null) { + b.append(", name=").append(name); + } + if (version != null) { + b.append(", version=").append(version); + } + if (roles != null) { + b.append(", roles=").append(roles); + } + if (attributes != null) { + b.append(", attributes=").append(attributes); + } + return b.append(']').toString(); + } + + /** + * Compare two nodes for equality + * @param obj node instance to compare with + */ + @Override + public boolean equals(Object obj) { + if (obj == null || obj.getClass() != getClass()) { + return false; + } + Node other = (Node) obj; + return host.equals(other.host) + && Objects.equals(boundHosts, other.boundHosts) + && Objects.equals(name, other.name) + && Objects.equals(version, other.version) + && Objects.equals(roles, other.roles) + && Objects.equals(attributes, other.attributes); + } + + /** + * Calculate the hash code of the node + */ + @Override + public int hashCode() { + return Objects.hash(host, boundHosts, name, version, roles, attributes); + } + + /** + * Role information about an OpenSearch process. + */ + public static final class Roles { + + private final Set roles; + + /** + * Create a {@link Roles} instance of the given string set. + * + * @param roles set of role names. + */ + public Roles(final Set roles) { + this.roles = new TreeSet<>(roles); + } + + /** + * Returns whether or not the node could be elected cluster-manager. + */ + public boolean isClusterManagerEligible() { + return roles.contains("master") || roles.contains("cluster_manager"); + } + + /** + * Returns whether or not the node could be elected cluster-manager. + * @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #isClusterManagerEligible()} + */ + @Deprecated + public boolean isMasterEligible() { + return isClusterManagerEligible(); + } + + /** + * Returns whether or not the node stores data. + */ + public boolean isData() { + return roles.contains("data"); + } + + /** + * Returns whether or not the node runs ingest pipelines. + */ + public boolean isIngest() { + return roles.contains("ingest"); + } + + /** + * Returns whether the node is dedicated to provide search capability. + */ + public boolean isSearch() { + return roles.contains("search"); + } + + /** + * Convert roles to string representation + */ + @Override + public String toString() { + return String.join(",", roles); + } + + /** + * Compare two roles for equality + * @param obj roles instance to compare with + */ + @Override + public boolean equals(Object obj) { + if (obj == null || obj.getClass() != getClass()) { + return false; + } + Roles other = (Roles) obj; + return roles.equals(other.roles); + } + + /** + * Calculate the hash code of the roles + */ + @Override + public int hashCode() { + return roles.hashCode(); + } + + } +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/NodeSelector.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/NodeSelector.java new file mode 100644 index 0000000000..eb11d8bb0b --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/NodeSelector.java @@ -0,0 +1,105 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import java.util.Iterator; + +/** + * Selects nodes that can receive requests. Used to keep requests away + * from cluster-manager nodes or to send them to nodes with a particular attribute. + */ +public interface NodeSelector { + /** + * Select the {@link Node}s to which to send requests. This is called with + * a mutable {@link Iterable} of {@linkplain Node}s in the order that the + * rest client would prefer to use them and implementers should remove + * nodes from the that should not receive the request. Implementers may + * iterate the nodes as many times as they need. + *

+ * This may be called twice per request: first for "living" nodes that + * have not been denylisted by previous errors. If the selector removes + * all nodes from the list or if there aren't any living nodes then the + * {@link org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport} + * will call this method with a list of "dead" nodes. + *

+ * Implementers should not rely on the ordering of the nodes. + * + * @param nodes the {@link Node}s targeted for the sending requests + */ + void select(Iterable nodes); + /* + * We were fairly careful with our choice of Iterable here. The caller has + * a List but reordering the list is likely to break round robin. Luckily + * Iterable doesn't allow any reordering. + */ + + /** + * Selector that matches any node. + */ + NodeSelector ANY = new NodeSelector() { + @Override + public void select(Iterable nodes) { + // Intentionally does nothing + } + + @Override + public String toString() { + return "ANY"; + } + }; + + /** + * Selector that matches any node that has metadata and doesn't + * have the {@code cluster_manager} role OR it has the data {@code data} + * role. + */ + NodeSelector SKIP_DEDICATED_CLUSTER_MANAGERS = new NodeSelector() { + @Override + public void select(Iterable nodes) { + for (Iterator itr = nodes.iterator(); itr.hasNext();) { + Node node = itr.next(); + if (node.getRoles() == null) continue; + if (node.getRoles().isClusterManagerEligible() + && false == node.getRoles().isData() + && false == node.getRoles().isIngest()) { + itr.remove(); + } + } + } + + @Override + public String toString() { + return "SKIP_DEDICATED_CLUSTER_MANAGERS"; + } + }; +} diff --git a/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientOptions.java b/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientOptions.java index 3015189421..f74a535639 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientOptions.java +++ b/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientOptions.java @@ -45,6 +45,9 @@ import java.util.function.Function; import java.util.stream.Collectors; +import static org.opensearch.client.transport.TransportHeaders.ACCEPT; +import static org.opensearch.client.transport.TransportHeaders.USER_AGENT; + public class RestClientOptions implements TransportOptions { private final RequestOptions options; @@ -178,8 +181,6 @@ public RestClientOptions build() { } } - private static final String USER_AGENT = "User-Agent"; - static RestClientOptions initialOptions() { String ua = String.format( Locale.ROOT, @@ -191,7 +192,7 @@ static RestClientOptions initialOptions() { return new RestClientOptions( RequestOptions.DEFAULT.toBuilder() .addHeader(USER_AGENT, ua) - .addHeader("Accept", RestClientTransport.JsonContentType.toString()) + .addHeader(ACCEPT, RestClientTransport.JsonContentType.toString()) .build() ); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java similarity index 99% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java index 8b21eadba8..f709de64ee 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/ClusterClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java @@ -34,8 +34,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class ClusterClientIT extends OpenSearchJavaClientTestCase { - +public abstract class AbstractClusterClientIT extends OpenSearchJavaClientTestCase { public void testClusterPutSettings() throws IOException { OpenSearchClient openSearchClient = javaClient(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java similarity index 99% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java index 5a31ca2e92..380a5bdd8a 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/CrudIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java @@ -36,7 +36,7 @@ import java.util.Collections; import java.util.List; -public class CrudIT extends OpenSearchJavaClientTestCase { +public abstract class AbstractCrudIT extends OpenSearchJavaClientTestCase { public void testDelete() throws IOException { { diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java similarity index 97% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java index 38726a57a5..c56556770a 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/IndicesClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java @@ -22,8 +22,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; -public class IndicesClientIT extends OpenSearchJavaClientTestCase { - +public abstract class AbstractIndicesClientIT extends OpenSearchJavaClientTestCase { public void testIndicesExists() throws IOException { // Index present diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java similarity index 90% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java index 74fc61a3ec..6a00a76ac3 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/NodesIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java @@ -16,10 +16,10 @@ import org.opensearch.client.opensearch.nodes.NodesStatsResponse; -public class NodesIT extends OpenSearchJavaClientTestCase { +public abstract class AbstractNodesIT extends OpenSearchJavaClientTestCase { public void testNodesStats() throws IOException { final NodesStatsResponse response = javaClient().nodes().stats(); assertThat(response.clusterName(), not(nullValue())); assertThat(response.nodes(), not(anEmptyMap())); } -} \ No newline at end of file +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java similarity index 96% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java index ef69c05b7b..79f4eb97c9 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/PingAndInfoIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java @@ -17,8 +17,7 @@ import java.io.IOException; import java.util.Map; -public class PingAndInfoIT extends OpenSearchJavaClientTestCase { - +public abstract class AbstractPingAndInfoIT extends OpenSearchJavaClientTestCase { public void testPing() throws IOException { BooleanResponse ping = javaClient().ping(); assertTrue(ping.value()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java similarity index 99% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index a3c5c8a6ff..374b3d1fc3 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/RequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -32,7 +32,6 @@ package org.opensearch.client.opensearch.integTest; - import org.junit.Test; import org.opensearch.Version; import org.opensearch.client.opensearch.OpenSearchAsyncClient; @@ -72,9 +71,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -public class RequestTest extends OpenSearchJavaClientTestCase { - - +public abstract class AbstractRequestIT extends OpenSearchJavaClientTestCase { @Test public void testCount() throws Exception { diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java index d12aa93bf0..11c748762f 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -11,7 +11,6 @@ import org.opensearch.Version; import org.opensearch.client.RestClient; import org.opensearch.client.RestClientBuilder; -import org.opensearch.client.json.jackson.JacksonJsonpMapper; import org.opensearch.client.opensearch.OpenSearchClient; import org.opensearch.client.opensearch._types.ExpandWildcard; import org.opensearch.client.opensearch.cat.IndicesResponse; @@ -28,7 +27,6 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; -import org.opensearch.client.transport.rest_client.RestClientTransport; import org.opensearch.common.settings.Settings; import org.opensearch.core.internal.io.IOUtils; import org.opensearch.test.rest.OpenSearchRestTestCase; @@ -40,7 +38,7 @@ import java.util.Optional; import java.util.TreeSet; -public abstract class OpenSearchJavaClientTestCase extends OpenSearchRestTestCase { +public abstract class OpenSearchJavaClientTestCase extends OpenSearchRestTestCase implements OpenSearchTransportSupport { private static OpenSearchClient javaClient; private static OpenSearchClient adminJavaClient; @@ -76,21 +74,11 @@ public void initJavaClient() throws IOException { } } - private boolean isHttps() { - return Optional.ofNullable(System.getProperty("https")) - .map("true"::equalsIgnoreCase) - .orElse(false); - } - @Override protected String getProtocol() { return isHttps() ? "https" : "http"; } - protected OpenSearchClient buildJavaClient(Settings settings, HttpHost[] hosts) throws IOException { - return new OpenSearchClient(new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper())); - } - @Override protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOException { RestClientBuilder builder = RestClient.builder(hosts); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java new file mode 100644 index 0000000000..3a469598d8 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import java.io.IOException; +import java.util.Optional; + +import org.apache.http.HttpHost; +import org.opensearch.client.opensearch.OpenSearchClient; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.common.settings.Settings; + +public interface OpenSearchTransportSupport { + default boolean isHttps() { + return Optional.ofNullable(System.getProperty("https")) + .map("true"::equalsIgnoreCase) + .orElse(false); + } + + default OpenSearchClient buildJavaClient(Settings settings, HttpHost[] hosts) throws IOException { + return new OpenSearchClient(buildTransport(settings, hosts)); + } + + OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException; +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java new file mode 100644 index 0000000000..5e13da89a2 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import java.io.IOException; + +import org.opensearch.client.opensearch.integTest.AbstractClusterClientIT; +import org.opensearch.client.transport.httpclient5.ResponseException; + +public class ClusterClientIT extends AbstractClusterClientIT implements HttpClient5TransportSupport { + @Override + public void testClusterHealthNotFoundIndex() throws IOException { + try { + super.testClusterHealthNotFoundIndex(); + } catch (ResponseException e) { + assertNotNull(e); + } + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java new file mode 100644 index 0000000000..1e4c995944 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractCrudIT; + +public class CrudIT extends AbstractCrudIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java new file mode 100644 index 0000000000..6ffe6419a1 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java @@ -0,0 +1,123 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import static org.opensearch.test.rest.OpenSearchRestTestCase.CLIENT_PATH_PREFIX; +import static org.opensearch.test.rest.OpenSearchRestTestCase.CLIENT_SOCKET_TIMEOUT; + +import java.io.IOException; +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Map; +import java.util.Optional; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; + +import org.apache.hc.client5.http.auth.AuthScope; +import org.apache.hc.client5.http.auth.UsernamePasswordCredentials; +import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider; +import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager; +import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder; +import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder; +import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.core5.function.Factory; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.hc.core5.http.nio.ssl.TlsStrategy; +import org.apache.hc.core5.reactor.ssl.TlsDetails; +import org.apache.hc.core5.ssl.SSLContextBuilder; +import org.apache.hc.core5.util.Timeout; +import org.opensearch.client.opensearch.integTest.OpenSearchTransportSupport; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.httpclient5.ApacheHttpClient5TransportBuilder; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.ThreadContext; + +interface HttpClient5TransportSupport extends OpenSearchTransportSupport { + @Override + default OpenSearchTransport buildTransport(Settings settings, org.apache.http.HttpHost[] hosts) throws IOException { + final HttpHost[] converted = Arrays + .stream(hosts) + .map(h -> new HttpHost(h.getSchemeName(), h.getHostName(), h.getPort())) + .toArray(HttpHost[]::new); + + final ApacheHttpClient5TransportBuilder builder = ApacheHttpClient5TransportBuilder.builder(converted); + configure(builder, settings, converted); + return builder.setStrictDeprecationMode(true).build(); + } + + private void configure(ApacheHttpClient5TransportBuilder builder, Settings settings, HttpHost[] hosts) throws IOException { + if (isHttps()) { + try { + final SSLContext sslcontext = SSLContextBuilder + .create() + .loadTrustMaterial(null, (chains, authType) -> true) + .build(); + + builder.setHttpClientConfigCallback(httpClientBuilder -> { + String userName = Optional.ofNullable(System.getProperty("user")).orElse("admin"); + String password = Optional.ofNullable(System.getProperty("password")).orElse("admin"); + + final BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider(); + for (final HttpHost host: hosts) { + credentialsProvider.setCredentials(new AuthScope(host), + new UsernamePasswordCredentials(userName, password.toCharArray())); + } + + final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create() + .setSslContext(sslcontext) + // disable the certificate since our testing cluster just uses the default security configuration + .setHostnameVerifier(NoopHostnameVerifier.INSTANCE) + // See https://issues.apache.org/jira/browse/HTTPCLIENT-2219 + .setTlsDetailsFactory(new Factory() { + @Override + public TlsDetails create(final SSLEngine sslEngine) { + return new TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol()); + } + }) + .build(); + + final PoolingAsyncClientConnectionManager connectionManager = PoolingAsyncClientConnectionManagerBuilder.create() + .setTlsStrategy(tlsStrategy) + .build(); + + return httpClientBuilder + .setDefaultCredentialsProvider(credentialsProvider) + .setConnectionManager(connectionManager); + }); + } catch (KeyStoreException | NoSuchAlgorithmException | KeyManagementException e) { + throw new RuntimeException("Error setting up ssl", e); + } + } + + Map headers = ThreadContext.buildDefaultHeaders(settings); + Header[] defaultHeaders = new Header[headers.size()]; + int i = 0; + for (Map.Entry entry : headers.entrySet()) { + defaultHeaders[i++] = new BasicHeader(entry.getKey(), entry.getValue()); + } + builder.setDefaultHeaders(defaultHeaders); + final String socketTimeoutString = settings.get(CLIENT_SOCKET_TIMEOUT); + final TimeValue socketTimeout = TimeValue.parseTimeValue( + socketTimeoutString == null ? "60s" : socketTimeoutString, + CLIENT_SOCKET_TIMEOUT + ); + builder.setRequestConfigCallback( + conf -> conf.setResponseTimeout(Timeout.ofMilliseconds(Math.toIntExact(socketTimeout.getMillis()))) + ); + if (settings.hasValue(CLIENT_PATH_PREFIX)) { + builder.setPathPrefix(settings.get(CLIENT_PATH_PREFIX)); + } + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java new file mode 100644 index 0000000000..ecd1469d3b --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractIndicesClientIT; + +public class IndicesClientIT extends AbstractIndicesClientIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java new file mode 100644 index 0000000000..286ef7d15d --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractNodesIT; + +public class NodesIT extends AbstractNodesIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java new file mode 100644 index 0000000000..9bc6f883b2 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java @@ -0,0 +1,15 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractPingAndInfoIT; + +public class PingAndInfoIT extends AbstractPingAndInfoIT implements HttpClient5TransportSupport { +} + diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java new file mode 100644 index 0000000000..bfa6d90798 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractRequestIT; + +public class RequestIT extends AbstractRequestIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java new file mode 100644 index 0000000000..188eb616f5 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractClusterClientIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class ClusterClientIT extends AbstractClusterClientIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java new file mode 100644 index 0000000000..6831f1d95d --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractCrudIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class CrudIT extends AbstractCrudIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java new file mode 100644 index 0000000000..190127ea9b --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractIndicesClientIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class IndicesClientIT extends AbstractIndicesClientIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java new file mode 100644 index 0000000000..47f07306b8 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractNodesIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class NodesIT extends AbstractNodesIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java new file mode 100644 index 0000000000..e5ac93649e --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractPingAndInfoIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class PingAndInfoIT extends AbstractPingAndInfoIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java new file mode 100644 index 0000000000..2f001541cf --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractRequestIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class RequestIT extends AbstractRequestIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} From 008754667733ce978c73f72cd7934283501eb587 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 19 Jan 2023 13:47:00 -0500 Subject: [PATCH 008/123] Added support for signing service name. (#324) (#335) Signed-off-by: dblock Signed-off-by: dblock (cherry picked from commit 6096034b0599ebb416d3ea8ff2fe40d86b12674c) --- CHANGELOG.md | 14 ++- DEVELOPER_GUIDE.md | 15 +++ USER_GUIDE.md | 35 +++++- java-client/build.gradle.kts | 2 + .../transport/aws/AwsSdk2Transport.java | 116 ++++++++++++++---- .../aws/AwsSdk2TransportTestCase.java | 11 ++ 6 files changed, 161 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53601fcfe4..f73dd9e9b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] + ### Added -- Github workflow for changelog verification ([#239](https://github.com/opensearch-project/opensearch-java/pull/239)) -- Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247)) -- Introduce new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) +- Add Github workflow for changelog verification ([#239](https://github.com/opensearch-project/opensearch-java/pull/239)) +- Add Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247)) +- Add support for signing service name in AwsSdk2Transport ([#324](https://github.com/opensearch-project/opensearch-java/pull/324)) +- Add new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 @@ -16,13 +18,14 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update tests to use JUnit's Assert ([#244](https://github.com/opensearch-project/opensearch-java/pull/244)) - Add support to parse sub-aggregations from filter/nested aggregations ([#234](https://github.com/opensearch-project/opensearch-java/pull/234)) - Add timeout and throttle to the jenkins workflows ([#231](https://github.com/opensearch-project/opensearch-java/pull/231)) -- Updating maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) +- Update maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) - Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) ### Deprecated ### Removed -- Removed support for unsupported dynamic_templates in bulk ([#276](https://github.com/opensearch-project/opensearch-java/pull/276)) +- Remove support for unsupported dynamic_templates in bulk ([#276](https://github.com/opensearch-project/opensearch-java/pull/276)) + ### Fixed - Make ChildrenAggregate as a SingleBucketAggregate ([#306](https://github.com/opensearch-project/opensearch-java/pull/306)) - Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) @@ -30,5 +33,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Security - [Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/2.0...HEAD diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index fa2da6946e..e26bedb875 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -7,6 +7,7 @@ - [Run Tests](#run-tests) - [Unit Tests](#unit-tests) - [Integration Tests](#integration-tests) + - [AWS Transport Integration Tests](#aws-transport-integration-tests) - [Use an Editor](#use-an-editor) - [IntelliJ IDEA](#intellij-idea) - [Visual Studio Code](#visual-studio-code) @@ -64,6 +65,20 @@ Run integration tests after starting OpenSearch cluster: ./gradlew clean integrationTest ``` +#### AWS Transport Integration Tests + +To run integration tests for the AWS transport client, ensure working AWS credentials and specify your OpenSearch domain and region as follows: + +``` +./gradlew integrationTest --tests "*AwsSdk2*" -Dtests.awsSdk2support.domainHost=search-...us-west-2.es.amazonaws.com -Dtests.awsSdk2support.domainRegion=us-west-2 +``` + +For OpenSearch Serverless, change the signing service name. + +``` +./gradlew integrationTest --tests "*AwsSdk2*" -Dtests.awsSdk2support.domainHost=....us-west-2.aoss.amazonaws.com -Dtests.awsSdk2support.domainRegion=us-west-2 -Dtests.awsSdk2support.serviceName=aoss +``` + ## Use an Editor ### IntelliJ IDEA diff --git a/USER_GUIDE.md b/USER_GUIDE.md index a3403cc8af..ffc0c08d91 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -2,15 +2,19 @@ - [User Guide](#user-guide) - [Sample data](#sample-data) + - [IndexData class](#indexdata-class) - [Create a client](#create-a-client) + - [Create a client using `RestClientTransport`](#create-a-client-using-restclienttransport) + - [Create a client using `ApacheHttpClient5Transport`](#create-a-client-using-apachehttpclient5transport) - [Create an index](#create-an-index) - [Index data](#index-data) - - [Search for the document](#search-for-the-document) + - [Search for the documents](#search-for-the-documents) - [Search documents using a match query](#search-documents-using-a-match-query) - [Aggregations](#aggregations) - [Delete the document](#delete-the-document) - [Delete the index](#delete-the-index) - - [Aggregations](#aggregations) +- [Using different transport options](#using-different-transport-options) + - [Amazon Managed OpenSearch](#amazon-managed-opensearch) ## Sample data @@ -156,4 +160,29 @@ client.delete(d -> d.index(index).id("1")); ```java DeleteIndexRequest deleteIndexRequest = new DeleteRequest.Builder().index(index).build(); DeleteIndexResponse deleteIndexResponse = client.indices().delete(deleteIndexRequest); -``` \ No newline at end of file +``` + +# Using different transport options + +## Amazon Managed OpenSearch + +Use `AwsSdk2Transport` to make requests to Amazon Managed OpenSearch. + +```java +SdkHttpClient httpClient = ApacheHttpClient.builder().build(); + +OpenSearchClient client = new OpenSearchClient( + new AwsSdk2Transport( + httpClient, + "search-...us-west-2.es.amazonaws.com", // OpenSearch endpoint, without https:// + "es" // signing service name + Region.US_WEST_2, // signing service region + AwsSdk2TransportOptions.builder().build() + ) +); + +InfoResponse info = client.info(); +System.out.println(info.version().distribution() + ": " + info.version().number()); + +httpClient.close(); +``` diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index b7adb63334..e22bc40093 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -131,6 +131,8 @@ val integrationTest = task("integrationTest") { systemProperty("password", System.getProperty("password", "admin")) systemProperty("tests.awsSdk2support.domainHost", System.getProperty("tests.awsSdk2support.domainHost", null)) + systemProperty("tests.awsSdk2support.serviceName", + System.getProperty("tests.awsSdk2support.serviceName", "es")) systemProperty("tests.awsSdk2support.domainRegion", System.getProperty("tests.awsSdk2support.domainRegion", "us-east-1")) } diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index 1069cf7832..af55aa02f7 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -60,12 +60,12 @@ /** * Implementation of the OpenSearchTransport interface that sends signed requests using - * the AWS v2 SDK HTTP clients, to connect to an AWS OpenSearch service using IAM authentication + * the AWS v2 SDK HTTP clients, to connect to an AWS OpenSearch service using IAM authentication. */ public class AwsSdk2Transport implements OpenSearchTransport { /** * By default, requests that exceed this size will be automatically compressed. - * {@link AwsSdk2TransportOptions} can be used to override this setting or disable compresson. + * {@link AwsSdk2TransportOptions} can be used to override this setting or disable compression. */ public static final Integer DEFAULT_REQUEST_COMPRESSION_SIZE = 8192; @@ -73,21 +73,21 @@ public class AwsSdk2Transport implements OpenSearchTransport { private final SdkHttpClient httpClient; private final SdkAsyncHttpClient asyncHttpClient; private final String host; + private final String signingServiceName; private final Region signingRegion; private final JsonpMapper defaultMapper; private final AwsSdk2TransportOptions transportOptions; /** - * Create an {@link OpenSearchTransport} with a SYNCHRONOUS AWS Http client + * Create an {@link OpenSearchTransport} with a synchronous AWS HTTP client. *

* Note that asynchronous OpenSearch requests sent through this transport will be dispatched * *synchronously* on the calling thread. * - * @param httpClient HTTP client to use for OpenSearch requests - * @param host The fully qualified domain name to connect to - * @param signingRegion The AWS region for which requests will be signed. This should typically match - * the region in `host`. - * @param options Options that apply to all requests. Can be null. Create with + * @param httpClient HTTP client to use for OpenSearch requests. + * @param host The fully qualified domain name to connect to. + * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param options Options that apply to all requests. Can be null. Create with * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, * compression options, etc. */ @@ -96,20 +96,42 @@ public AwsSdk2Transport( @Nonnull String host, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - this(httpClient, null, host, signingRegion, options); + this(httpClient, null, host, "es", signingRegion, options); } /** - * Create an {@link OpenSearchTransport} with an ASYNCHRONOUS AWS Http client + * Create an {@link OpenSearchTransport} with a synchronous AWS HTTP client. + *

+ * Note that asynchronous OpenSearch requests sent through this transport will be dispatched + * *synchronously* on the calling thread. + * + * @param httpClient HTTP client to use for OpenSearch requests. + * @param host The fully qualified domain name to connect to. + * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). + * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param options Options that apply to all requests. Can be null. Create with + * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, + * compression options, etc. + */ + public AwsSdk2Transport( + @Nonnull SdkHttpClient httpClient, + @Nonnull String host, + @Nonnull String signingServiceName, + @Nonnull Region signingRegion, + @CheckForNull AwsSdk2TransportOptions options) { + this(httpClient, null, host, signingServiceName, signingRegion, options); + } + + /** + * Create an {@link OpenSearchTransport} with an asynchronous AWS HTTP client *

* Note that synchronous OpenSearch requests sent through this transport will be dispatched * using the asynchronous client, but the calling thread will block until they are complete. * - * @param asyncHttpClient HTTP client to use for OpenSearch requests - * @param host The target host - * @param signingRegion The AWS region for which requests will be signed. This should typically match - * the region in `host`. - * @param options Options that apply to all requests. Can be null. Create with + * @param asyncHttpClient HTTP client to use for OpenSearch requests. + * @param host The target host. + * @param signingRegion The AWS region for which requests will be signed. This should typically match region in `host`. + * @param options Options that apply to all requests. Can be null. Create with * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, * compression options, etc. */ @@ -118,7 +140,53 @@ public AwsSdk2Transport( @Nonnull String host, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - this(null, asyncHttpClient, host, signingRegion, options); + this(null, asyncHttpClient, host, "es", signingRegion, options); + } + + /** + * Create an {@link OpenSearchTransport} with an asynchronous AWS HTTP client. + *

+ * Note that synchronous OpenSearch requests sent through this transport will be dispatched + * using the asynchronous client, but the calling thread will block until they are complete. + * + * @param asyncHttpClient HTTP client to use for OpenSearch requests. + * @param host The target host. + * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). + * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param options Options that apply to all requests. Can be null. Create with + * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, + * compression options, etc. + */ + public AwsSdk2Transport( + @Nonnull SdkAsyncHttpClient asyncHttpClient, + @Nonnull String host, + @Nonnull String signingServiceName, + @Nonnull Region signingRegion, + @CheckForNull AwsSdk2TransportOptions options) { + this(null, asyncHttpClient, host, signingServiceName, signingRegion, options); + } + + /** + * Create an {@link OpenSearchTransport} with both synchronous and asynchronous AWS HTTP clients. + *

+ * The synchronous client will be used for synchronous OpenSearch requests, and the asynchronous client + * will be used for asynchronous HTTP requests. + * + * @param httpClient HTTP client to use for OpenSearch requests. + * @param asyncHttpClient HTTP client to use for synchronous OpenSearch requests. + * @param host The fully qualified domain name to connect to. + * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param options Options that apply to all requests. Can be null. Create with + * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, + * compression options, etc. + */ + public AwsSdk2Transport( + @CheckForNull SdkHttpClient httpClient, + @CheckForNull SdkAsyncHttpClient asyncHttpClient, + @Nonnull String host, + @Nonnull Region signingRegion, + @CheckForNull AwsSdk2TransportOptions options) { + this(httpClient, asyncHttpClient, host, "es", signingRegion, options); } /** @@ -127,12 +195,12 @@ public AwsSdk2Transport( * The synchronous client will be used for synchronous OpenSearch requests, and the asynchronous client * will be used for asynchronous HTTP requests. * - * @param httpClient HTTP client to use for OpenSearch requests - * @param asyncHttpClient HTTP client to use for synchronous OpenSearch requests - * @param host The fully qualified domain name to connect to - * @param signingRegion The AWS region for which requests will be signed. This should typically match - * the region in `host`. - * @param options Options that apply to all requests. Can be null. Create with + * @param httpClient HTTP client to use for OpenSearch requests. + * @param asyncHttpClient HTTP client to use for synchronous OpenSearch requests. + * @param host The fully qualified domain name to connect to. + * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). + * @param options Options that apply to all requests. Can be null. Create with * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, * compression options, etc. */ @@ -140,6 +208,7 @@ public AwsSdk2Transport( @CheckForNull SdkHttpClient httpClient, @CheckForNull SdkAsyncHttpClient asyncHttpClient, @Nonnull String host, + @Nonnull String signingServiceName, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { if (httpClient == null && asyncHttpClient == null) @@ -150,6 +219,7 @@ public AwsSdk2Transport( this.httpClient = httpClient; this.asyncHttpClient = asyncHttpClient; this.host = host; + this.signingServiceName = signingServiceName; this.signingRegion = signingRegion; this.transportOptions = options != null ? options : AwsSdk2TransportOptions.builder().build(); this.defaultMapper = Optional.ofNullable(options) @@ -314,7 +384,7 @@ private SdkHttpFullRequest prepareRequest( Aws4SignerParams signerParams = Aws4SignerParams.builder() .awsCredentials(credentials.resolveCredentials()) - .signingName("es") + .signingName(this.signingServiceName) .signingRegion(signingRegion) .build(); return Aws4Signer.create().sign(req.build(), signerParams); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java index 05421559d1..fa1d33f39a 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java @@ -83,6 +83,7 @@ protected OpenSearchClient getClient( transport = new AwsSdk2Transport( getAsyncHttpClient(), getTestClusterHost(), + getTestClusterServiceName(), getTestClusterRegion(), getTransportOptions().build() ); @@ -90,6 +91,7 @@ protected OpenSearchClient getClient( transport = new AwsSdk2Transport( getHttpClient(), getTestClusterHost(), + getTestClusterServiceName(), getTestClusterRegion(), getTransportOptions().build() ); @@ -107,6 +109,7 @@ protected OpenSearchAsyncClient getAsyncClient( transport = new AwsSdk2Transport( getAsyncHttpClient(), getTestClusterHost(), + getTestClusterServiceName(), getTestClusterRegion(), getTransportOptions().build() ); @@ -114,6 +117,7 @@ protected OpenSearchAsyncClient getAsyncClient( transport = new AwsSdk2Transport( getHttpClient(), getTestClusterHost(), + getTestClusterServiceName(), getTestClusterRegion(), getTransportOptions().build() ); @@ -131,6 +135,7 @@ protected OpenSearchIndicesClient getIndexesClient( transport = new AwsSdk2Transport( getAsyncHttpClient(), getTestClusterHost(), + getTestClusterServiceName(), getTestClusterRegion(), getTransportOptions().build() ); @@ -138,6 +143,7 @@ protected OpenSearchIndicesClient getIndexesClient( transport = new AwsSdk2Transport( getHttpClient(), getTestClusterHost(), + getTestClusterServiceName(), getTestClusterRegion(), getTransportOptions().build() ); @@ -150,6 +156,11 @@ protected String getTestClusterHost() { return cluster; } + protected String getTestClusterServiceName() { + String cluster = System.getProperty("tests.awsSdk2support.serviceName"); + return cluster; + } + protected Region getTestClusterRegion() { String region = System.getProperty("tests.awsSdk2support.domainRegion"); return region != null ? Region.of(region) : Region.US_EAST_1; From 341b1c0bcfe89cf716c84dde3cdb3aed4e787fe1 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 22:10:12 -0500 Subject: [PATCH 009/123] Added skip-changelog. (#331) (#341) Signed-off-by: dblock Signed-off-by: dblock (cherry picked from commit 8c6bac46a40dfa7a2f4c43de671d1d2d792be143) Co-authored-by: Daniel (dB.) Doubrovkine --- .github/workflows/changelog_verifier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml index 96f99f17b0..992a38b624 100644 --- a/.github/workflows/changelog_verifier.yml +++ b/.github/workflows/changelog_verifier.yml @@ -15,4 +15,4 @@ jobs: - uses: dangoslen/changelog-enforcer@v3 with: - skipLabels: "autocut" + skipLabels: "autocut, skip-changelog" From 80607fa214f1d75055a6eacbf4f38a6c82d8fea6 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 20 Jan 2023 19:10:59 -0800 Subject: [PATCH 010/123] Increment to next minor version (#340) Signed-off-by: Vacha Shah Signed-off-by: Vacha Shah --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 712a6787e1..d11ea7ab21 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -systemProp.version = 2.1.1 \ No newline at end of file +systemProp.version = 2.2.0 From 7eae121d7dead1f4d8e4016dc6007ada53c28c02 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 09:00:02 -0500 Subject: [PATCH 011/123] Fix: do not double-wrap OpenSearchException. (#323) (#332) Signed-off-by: dblock (cherry picked from commit 37d48000b0aa0dea82b5404a82a05410e388859e) Co-authored-by: Daniel (dB.) Doubrovkine --- CHANGELOG.md | 1 + .../client/transport/aws/AwsSdk2Transport.java | 2 ++ .../integTest/aws/AwsSdk2SearchIT.java | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f73dd9e9b8..1d0e1f224f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Make ChildrenAggregate as a SingleBucketAggregate ([#306](https://github.com/opensearch-project/opensearch-java/pull/306)) - Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) +- Do not double-wrap OpenSearchException on error ([#323](https://github.com/opensearch-project/opensearch-java/pull/323)) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index af55aa02f7..c567230559 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -526,6 +526,8 @@ private ResponseT parseResponse( ErrorT error = errorDeserializer.deserialize(parser, mapper); throw new OpenSearchException((ErrorResponse) error); } + } catch (OpenSearchException e) { + throw e; } catch (Exception e) { // can't parse the error - use a general exception ErrorCause.Builder cause = new ErrorCause.Builder(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java index b138ff8545..4b7a4578ad 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java @@ -13,10 +13,13 @@ import org.opensearch.client.opensearch.OpenSearchAsyncClient; import org.opensearch.client.opensearch.OpenSearchClient; import org.opensearch.client.opensearch._types.OpType; +import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch._types.Refresh; import org.opensearch.client.opensearch.core.IndexRequest; import org.opensearch.client.opensearch.core.IndexResponse; import org.opensearch.client.opensearch.core.SearchResponse; +import org.opensearch.client.opensearch.indices.CreateIndexRequest; +import org.opensearch.client.opensearch.indices.OpenSearchIndicesClient; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -133,4 +136,18 @@ private CompletableFuture addDoc( return CompletableFuture.failedFuture(e); } } + + @Test + public void testDoubleWrappedException() throws Exception { + // ensure the test index exists + resetTestIndex(false); + // attempt to create the same index a second time + OpenSearchIndicesClient client = getIndexesClient(false, null, null); + var req = new CreateIndexRequest.Builder().index(TEST_INDEX); + Exception exception = Assert.assertThrows(OpenSearchException.class, () -> { + client.create(req.build()); + }); + // error message contains the actual error, not a generic [http_exception] + Assert.assertTrue(exception.getMessage().contains("[resource_already_exists_exception]")); + } } From 037d488fa9ae283f89b16e991f7490fdbb5f9f06 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Mon, 23 Jan 2023 19:48:40 -0800 Subject: [PATCH 012/123] Adding x-amz-content-sha256 header for signed requests (#339) (#344) * Adding X-Amz-Content-Sha256 header for signed requests Signed-off-by: Vacha Shah * Adding CHANGELOG entry Signed-off-by: Vacha Shah * Adding documentation comment Signed-off-by: Vacha Shah * Adding tests Signed-off-by: Vacha Shah * Addressing comments Signed-off-by: Vacha Shah * Addressing comments Signed-off-by: Vacha Shah * Removing refresh policy for integ tests for Sigv4 Signed-off-by: Vacha Shah * Updating the developer guide Signed-off-by: Vacha Shah Signed-off-by: Vacha Shah Signed-off-by: Vacha Shah --- CHANGELOG.md | 1 + DEVELOPER_GUIDE.md | 4 +-- USER_GUIDE.md | 4 +-- .../transport/aws/AwsSdk2Transport.java | 3 ++ .../integTest/aws/AwsSdk2SearchIT.java | 36 +++++++++---------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d0e1f224f..ecc0fc70bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add timeout and throttle to the jenkins workflows ([#231](https://github.com/opensearch-project/opensearch-java/pull/231)) - Update maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) - Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) +- Add support for OpenSearch Serverless ([#339](https://github.com/opensearch-project/opensearch-java/pull/339)) ### Deprecated diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index e26bedb875..c90e138b40 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -67,10 +67,10 @@ Run integration tests after starting OpenSearch cluster: #### AWS Transport Integration Tests -To run integration tests for the AWS transport client, ensure working AWS credentials and specify your OpenSearch domain and region as follows: +To run integration tests for the AWS transport client, ensure working AWS credentials in `/.aws/credentials` and specify your OpenSearch domain and region as follows: ``` -./gradlew integrationTest --tests "*AwsSdk2*" -Dtests.awsSdk2support.domainHost=search-...us-west-2.es.amazonaws.com -Dtests.awsSdk2support.domainRegion=us-west-2 +./gradlew integrationTest --tests "*AwsSdk2*" -Dtests.awsSdk2support.domainHost=search-...us-west-2.es.amazonaws.com -Dtests.awsSdk2support.domainRegion=us-west-2 -Dtests.awsSdk2support.serviceName=es ``` For OpenSearch Serverless, change the signing service name. diff --git a/USER_GUIDE.md b/USER_GUIDE.md index ffc0c08d91..186d22de6d 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -166,7 +166,7 @@ DeleteIndexResponse deleteIndexResponse = client.indices().delete(deleteIndexReq ## Amazon Managed OpenSearch -Use `AwsSdk2Transport` to make requests to Amazon Managed OpenSearch. +Use `AwsSdk2Transport` to make requests to Amazon Managed OpenSearch and OpenSearch Serverless. ```java SdkHttpClient httpClient = ApacheHttpClient.builder().build(); @@ -175,7 +175,7 @@ OpenSearchClient client = new OpenSearchClient( new AwsSdk2Transport( httpClient, "search-...us-west-2.es.amazonaws.com", // OpenSearch endpoint, without https:// - "es" // signing service name + "es" // signing service name, use "aoss" for OpenSearch Serverless Region.US_WEST_2, // signing service region AwsSdk2TransportOptions.builder().build() ) diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index c567230559..208c904434 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -363,6 +363,9 @@ private SdkHttpFullRequest prepareRequest( } req.putHeader("Content-Length", String.valueOf(body.getContentLength())); req.contentStreamProvider(body::getInputStream); + // To add the "X-Amz-Content-Sha256" header, it needs to set as required. + // It is a required header for Amazon OpenSearch Serverless. + req.putHeader("x-amz-content-sha256", "required"); } boolean responseCompression = Optional.ofNullable(options) diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java index 4b7a4578ad..1e7f4ce427 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SearchIT.java @@ -12,9 +12,7 @@ import org.junit.Assert; import org.opensearch.client.opensearch.OpenSearchAsyncClient; import org.opensearch.client.opensearch.OpenSearchClient; -import org.opensearch.client.opensearch._types.OpType; import org.opensearch.client.opensearch._types.OpenSearchException; -import org.opensearch.client.opensearch._types.Refresh; import org.opensearch.client.opensearch.core.IndexRequest; import org.opensearch.client.opensearch.core.IndexResponse; import org.opensearch.client.opensearch.core.SearchResponse; @@ -51,11 +49,14 @@ void testClient(boolean async) throws Exception { final OpenSearchClient client = getClient(async, null, null); SimplePojo doc1 = new SimplePojo("Document 1", "The text of document 1"); - addDoc(client, "id1", doc1, false); + addDoc(client, "id1", doc1); SimplePojo doc2 = new SimplePojo("Document 2", "The text of document 2"); - addDoc(client, "id2", doc2, false); + addDoc(client, "id2", doc2); SimplePojo doc3 = getLongDoc("Long Document 3", 1000000); - addDoc(client, "id3", doc3, true); + addDoc(client, "id3", doc3); + + // wait for the document to index + Thread.sleep(1000); SearchResponse response = query(client, "NotPresent", null); Assert.assertEquals(0, response.hits().hits().size()); @@ -77,12 +78,15 @@ void testClientAsync(boolean async) throws Exception { final OpenSearchAsyncClient client = getAsyncClient(async, null, null); SimplePojo doc1 = new SimplePojo("Document 1", "The text of document 1"); - CompletableFuture add1 = addDoc(client, "id1", doc1, false); + CompletableFuture add1 = addDoc(client, "id1", doc1); SimplePojo doc2 = new SimplePojo("Document 2", "The text of document 2"); - CompletableFuture add2 = addDoc(client, "id2", doc2, false); + CompletableFuture add2 = addDoc(client, "id2", doc2); SimplePojo doc3 = getLongDoc("Long Document 3", 1000000); CompletableFuture add3 = CompletableFuture.allOf(add1, add2).thenCompose( - unused -> addDoc(client, "id3", doc3, true)); + unused -> addDoc(client, "id3", doc3)); + + // wait for the document to index + Thread.sleep(1000); List> results = add3.thenCompose(unused -> { CompletableFuture> r1 = query(client, "NotPresent", null); @@ -107,29 +111,21 @@ void testClientAsync(boolean async) throws Exception { } - private void addDoc(OpenSearchClient client, String id, SimplePojo doc, boolean wait) throws Exception { + private void addDoc(OpenSearchClient client, String id, SimplePojo doc) throws Exception { IndexRequest.Builder req = new IndexRequest.Builder() .index(TEST_INDEX) .document(doc) - .id(id) - .opType(OpType.Index); - if (wait) { - req.refresh(Refresh.WaitFor); - } + .id(id); client.index(req.build()); } private CompletableFuture addDoc( - OpenSearchAsyncClient client, String id, SimplePojo doc, boolean wait + OpenSearchAsyncClient client, String id, SimplePojo doc ) { IndexRequest.Builder req = new IndexRequest.Builder() .index(TEST_INDEX) .document(doc) - .id(id) - .opType(OpType.Index); - if (wait) { - req.refresh(Refresh.WaitFor); - } + .id(id); try { return client.index(req.build()); } catch (Exception e) { From 9d1b34d93675beff049d5c57ff9afd105cfaf22c Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:12:58 -0800 Subject: [PATCH 013/123] Adds release workflows to onboard to new release process (#321) (#345) * Add release workflows Signed-off-by: Sayali Gaikawad (cherry picked from commit c171531bb51625023cef8da6e0b5fb270e7fd626) --- .github/workflows/release-drafter.yml | 28 ++++++++ CHANGELOG.md | 1 + RELEASING.md | 8 +-- jenkins/release.jenkinsFile | 16 +++++ jenkins/stage-maven-release.jenkinsfile | 90 ------------------------- 5 files changed, 47 insertions(+), 96 deletions(-) create mode 100644 .github/workflows/release-drafter.yml create mode 100644 jenkins/release.jenkinsFile delete mode 100644 jenkins/stage-maven-release.jenkinsfile diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000000..e3f52436b7 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,28 @@ +name: Release drafter + +on: + push: + tags: + - "*" + +jobs: + draft-a-release: + name: Draft a release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Gradle + run: | + ./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository + - name: Draft a release + uses: softprops/action-gh-release@v1 + with: + draft: true + generate_release_notes: true + files: | + artifacts.tar.gz diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc0fc70bb..fc2913554b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247)) - Add support for signing service name in AwsSdk2Transport ([#324](https://github.com/opensearch-project/opensearch-java/pull/324)) - Add new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) +- Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/RELEASING.md b/RELEASING.md index 14dac4c92e..0d0729e578 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -34,9 +34,5 @@ Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md). 1. Create a tag, e.g. `v2.1.0`, and push it to the GitHub repo. -2. The [opensearch-java-maven-sign-and-release/](https://build.ci.opensearch.org/job/opensearch-java-maven-sign-and-release/) will be automatically kicked off. -3. Login to [AWS OSS Sonatype](https://aws.oss.sonatype.org/#stagingRepositories), and locate the staged release. -4. `Close` the staged repository, and ensure all checks pass. -5. `Release` the staged respository. -6. [Create a release on GitHub](https://github.com/opensearch-project/opensearch-java/releases/new) with release notes. -7. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push. \ No newline at end of file +2. This creates a draft release which triggers the [opensearch-java-maven-sign-and-release/](https://build.ci.opensearch.org/job/opensearch-java-maven-sign-and-release/) jenkins workflow. The artifacts will be automcatically signed and published to maven. +3. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push. \ No newline at end of file diff --git a/jenkins/release.jenkinsFile b/jenkins/release.jenkinsFile new file mode 100644 index 0000000000..d8289b3866 --- /dev/null +++ b/jenkins/release.jenkinsFile @@ -0,0 +1,16 @@ +lib = library(identifier: 'jenkins@1.5.3', retriever: modernSCM([ + $class: 'GitSCMSource', + remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', +])) + +standardReleasePipelineWithGenericTrigger( + tokenIdCredential: 'jenkins-opensearch-java-generic-webhook-token', + causeString: 'A tag was cut on opensearch-project/opensearch-java repository causing this workflow to run', + downloadReleaseAsset: true, + publishRelease: true) { + publishToMaven( + signingArtifactsPath: "$WORKSPACE/repository/", + mavenArtifactsPath: "$WORKSPACE/repository/", + autoPublish: true + ) + } diff --git a/jenkins/stage-maven-release.jenkinsfile b/jenkins/stage-maven-release.jenkinsfile deleted file mode 100644 index 80969ce215..0000000000 --- a/jenkins/stage-maven-release.jenkinsfile +++ /dev/null @@ -1,90 +0,0 @@ -lib = library(identifier: 'jenkins@main', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build.git', -])) - -pipeline { - options { - timeout(time: 30, unit: 'MINUTES') - throttleJobProperty( - categories: [], - limitOneJobWithMatchingParams: false, - maxConcurrentPerNode: 0, - maxConcurrentTotal: 1, - paramsToUseForLimit: '', - throttleEnabled: true, - throttleOption: 'project', - ) - } - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image 'opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2' - args '-e JAVA_HOME=/opt/java/openjdk-11' - alwaysPull true - } - } - triggers { - GenericTrigger( - genericVariables: [ - [key: 'ref', value: '$.ref'], - [key: 'VERSION', value: '$.ref', regexpFilter: 'refs/tags/v' ], - ], - tokenCredentialId: 'jenkins-opensearch-java-generic-webhook-token', - causeString: 'A tag was cut on opensearch-project/opensearch-java repository causing this workflow to run', - printContributedVariables: false, - printPostContent: false, - regexpFilterText: '$ref', - regexpFilterExpression: '^refs/tags/.*' - ) - } - environment { - ARTIFACT_PATH = "$WORKSPACE/build/repository/org/opensearch/client/opensearch-java/$VERSION" - } - stages { - stage('Publish to Maven Local') { - steps { - // checkout the commit - checkout([ - $class: 'GitSCM', userRemoteConfigs: [[url: 'https://github.com/opensearch-project/opensearch-java.git']], - branches: [[name: "$ref"]] - ]) - - // publish maven artifacts - sh('./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository') - } - } - stage('Sign') { - steps { - script { - signArtifacts( - artifactPath: "${ARTIFACT_PATH}", - type: 'maven', - platform: 'linux' - ) - } - } - } - stage('Stage Maven Artifacts') { - environment { - REPO_URL = 'https://aws.oss.sonatype.org/' - STAGING_PROFILE_ID = "${SONATYPE_STAGING_PROFILE_ID}" - BUILD_ID = "${BUILD_NUMBER}" - } - steps { - // checkout the build repo - git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main' - - // stage artifacts for release with Sonatype - withCredentials([usernamePassword(credentialsId: 'jenkins-sonatype-creds', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) { - sh('$WORKSPACE/publish/stage-maven-release.sh $WORKSPACE/build/repository/') - } - } - } - } - post { - always { - cleanWs disableDeferredWipeout: true, deleteDirs: true - } - } -} From 00d8f993862f2385ca26dd9baaab4eebeb721932 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Date: Mon, 23 Jan 2023 21:39:25 -0800 Subject: [PATCH 014/123] Use bash (#346) Signed-off-by: Sayali Gaikawad Signed-off-by: Sayali Gaikawad --- .github/workflows/release-drafter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index e3f52436b7..6e8fb0c948 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -18,6 +18,8 @@ jobs: java-version: 11 - name: Build with Gradle run: | + export VERSION=`cat gradle.properties | grep "systemProp.version" | tr -d " " | cut -d '=' -f2` + echo Building the version: $VERSION ./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository - name: Draft a release uses: softprops/action-gh-release@v1 From f52747034636cfe23509bb11797ea80f609bf48f Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 19:46:38 -0500 Subject: [PATCH 015/123] Fix issue with completion suggester being parsed as term suggester. (#347) (#350) * Fix issue with completion suggester being parsed as term suggester. This commit fixes the issue where a completion suggester search request was being parsed as a term suggester and failing due to "Missing required property 'TermSuggestOption.score'" This solution was originally proposed by Github user @apatrida Signed-off-by: Dan Hart * Remove commented code Signed-off-by: Dan Hart * Fix format of changelog item Signed-off-by: Dan Hart Signed-off-by: Dan Hart (cherry picked from commit 013d8d7f3e8746ab526e2be5822f52b94aa363de) Signed-off-by: github-actions[bot] Signed-off-by: Dan Hart Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../client/json/UnionDeserializer.java | 22 ++++--- .../integTest/AbstractRequestIT.java | 60 +++++++++++++++++++ 3 files changed, 75 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2913554b..9515dc5a3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) - Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) - Add support for OpenSearch Serverless ([#339](https://github.com/opensearch-project/opensearch-java/pull/339)) +- Fix issue where completion suggestions were failing, due to being parsed as term suggestions ([#107](https://github.com/opensearch-project/opensearch-java/issues/107)) ### Deprecated diff --git a/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java index dc54bf43e6..3905139a80 100644 --- a/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java @@ -48,6 +48,8 @@ import java.util.Map; import java.util.Set; import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.stream.Collectors; public class UnionDeserializer implements JsonpDeserializer { @@ -169,14 +171,8 @@ public Builder addMember(Kind tag, JsonpDeserializer unwrapped = DelegatingDeserializer.unwrap(deserializer); if (unwrapped instanceof ObjectDeserializer) { ObjectDeserializer od = (ObjectDeserializer) unwrapped; - Set allFields = od.fieldNames(); - Set fields = new HashSet<>(allFields); // copy to update - for (UnionDeserializer.SingleMemberHandler member: objectMembers) { - // Remove respective fields on both sides to keep specific ones - fields.removeAll(member.fields); - member.fields.removeAll(allFields); - } - UnionDeserializer.SingleMemberHandler member = new SingleMemberHandler<>(tag, deserializer, fields); + UnionDeserializer.SingleMemberHandler member = + new SingleMemberHandler<>(tag, deserializer, new HashSet<>(od.fieldNames())); objectMembers.add(member); if (od.shortcutProperty() != null) { // also add it as a string @@ -194,6 +190,16 @@ public Builder addMember(Kind tag, JsonpDeserializer build() { + Map fieldFrequencies = objectMembers.stream().flatMap(m -> m.fields.stream()) + .collect( Collectors.groupingBy(Function.identity(), Collectors.counting())); + Set duplicateFields = fieldFrequencies.entrySet().stream() + .filter(entry -> entry.getValue() > 1) + .map(Map.Entry::getKey) + .collect(Collectors.toSet()); + for (UnionDeserializer.SingleMemberHandler member: objectMembers) { + member.fields.removeAll(duplicateFields); + } + // Check that no object member had all its fields removed for (UnionDeserializer.SingleMemberHandler member: objectMembers) { if (member.fields.isEmpty()) { diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index 374b3d1fc3..08ec63b009 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -55,6 +55,10 @@ import org.opensearch.client.opensearch.core.SearchRequest; import org.opensearch.client.opensearch.core.bulk.OperationType; import org.opensearch.client.opensearch.core.msearch.RequestItem; +import org.opensearch.client.opensearch.core.search.CompletionSuggester; +import org.opensearch.client.opensearch.core.search.FieldSuggester; +import org.opensearch.client.opensearch.core.search.FieldSuggesterBuilders; +import org.opensearch.client.opensearch.core.search.Suggester; import org.opensearch.client.opensearch.indices.CreateIndexResponse; import org.opensearch.client.opensearch.indices.GetIndexResponse; import org.opensearch.client.opensearch.indices.GetIndicesSettingsResponse; @@ -433,6 +437,62 @@ public void testDefaultIndexSettings() throws IOException { assertNull(settings.get(index).defaults()); } + @Test + public void testCompletionSuggester() throws IOException { + + String index = "test-completion-suggester"; + + Property intValueProp = new Property.Builder() + .long_(v -> v) + .build(); + Property msgCompletionProp = new Property.Builder() + .completion(c -> c) + .build(); + javaClient().indices().create(c -> c + .index(index) + .mappings(m -> m + .properties("intValue", intValueProp) + .properties("msg", msgCompletionProp))); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + javaClient().index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("bar"); + + javaClient().index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() + .field("msg") + .size(1) + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder() + .completion(completionSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap("msgSuggester", fieldSuggester)) + .text("foo") + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse response = javaClient().search(searchRequest, AppData.class); + assertTrue(response.suggest().size() > 0); + } + // @Test // public void testValueBodyResponse() throws Exception { // DiskUsageResponse resp = highLevelClient().indices().diskUsage(b -> b From 959d72115d0d5f6f159fd892a4547e0f8a4131b8 Mon Sep 17 00:00:00 2001 From: Benoit TELLIER Date: Thu, 26 Jan 2023 23:50:17 +0700 Subject: [PATCH 016/123] ISSUE-292 Prevent SPI calls at runtime (#351) Signed-off-by: Benoit Tellier Signed-off-by: Benoit Tellier --- CHANGELOG.md | 1 + .../client/json/jackson/JsonValueParser.java | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9515dc5a3a..506df974b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) - Add support for OpenSearch Serverless ([#339](https://github.com/opensearch-project/opensearch-java/pull/339)) - Fix issue where completion suggestions were failing, due to being parsed as term suggestions ([#107](https://github.com/opensearch-project/opensearch-java/issues/107)) +- Prevent SPI calls at runtime ([#293](https://github.com/opensearch-project/opensearch-java/pull/293)) ### Deprecated diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java index fbc9101a37..565e38e35d 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java @@ -49,11 +49,13 @@ * object (e.g. START_OBJECT, VALUE_NUMBER, etc). */ class JsonValueParser { - private final JsonProvider provider = JsonProvider.provider(); + private static class DefaultJsonProvider { + private static final JsonProvider INSTANCE = JsonProvider.provider(); + } public JsonObject parseObject(JsonParser parser) throws IOException { - JsonObjectBuilder ob = provider.createObjectBuilder(); + JsonObjectBuilder ob = DefaultJsonProvider.INSTANCE.createObjectBuilder(); JsonToken token; while((token = parser.nextToken()) != JsonToken.END_OBJECT) { @@ -68,7 +70,7 @@ public JsonObject parseObject(JsonParser parser) throws IOException { } public JsonArray parseArray(JsonParser parser) throws IOException { - JsonArrayBuilder ab = provider.createArrayBuilder(); + JsonArrayBuilder ab = DefaultJsonProvider.INSTANCE.createArrayBuilder(); while(parser.nextToken() != JsonToken.END_ARRAY) { ab.add(parseValue(parser)); @@ -94,22 +96,22 @@ public JsonValue parseValue(JsonParser parser) throws IOException { return JsonValue.NULL; case VALUE_STRING: - return provider.createValue(parser.getText()); + return DefaultJsonProvider.INSTANCE.createValue(parser.getText()); case VALUE_NUMBER_FLOAT: case VALUE_NUMBER_INT: switch(parser.getNumberType()) { case INT: - return provider.createValue(parser.getIntValue()); + return DefaultJsonProvider.INSTANCE.createValue(parser.getIntValue()); case LONG: - return provider.createValue(parser.getLongValue()); + return DefaultJsonProvider.INSTANCE.createValue(parser.getLongValue()); case FLOAT: case DOUBLE: - return provider.createValue(parser.getDoubleValue()); + return DefaultJsonProvider.INSTANCE.createValue(parser.getDoubleValue()); case BIG_DECIMAL: - return provider.createValue(parser.getDecimalValue()); + return DefaultJsonProvider.INSTANCE.createValue(parser.getDecimalValue()); case BIG_INTEGER: - return provider.createValue(parser.getBigIntegerValue()); + return DefaultJsonProvider.INSTANCE.createValue(parser.getBigIntegerValue()); } default: From 588c1ca69cac119fffa2454e49b6fc905a156d7c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 7 Feb 2023 12:02:42 -0500 Subject: [PATCH 017/123] Bulk UpdateOperation misses upsert options (#353) (#358) * Bulk UpdateOperation misses upsert options * Fix formatting --------- (cherry picked from commit fbef578684ff885e68d838389b793b79c02c7ac4) Signed-off-by: Andriy Redko Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../opensearch/core/bulk/UpdateOperation.java | 79 ++++++--- .../core/bulk/UpdateOperationData.java | 158 ++++++++++++++++++ .../opensearch/integTest/AbstractCrudIT.java | 94 ++++++++++- 4 files changed, 309 insertions(+), 23 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperationData.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 506df974b3..0e12a76ec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) - Do not double-wrap OpenSearchException on error ([#323](https://github.com/opensearch-project/opensearch-java/pull/323)) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) +- Bulk UpdateOperation misses upsert options ([#353](https://github.com/opensearch-project/opensearch-java/pull/353)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java index 7679df457b..3e1c9dd890 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java @@ -15,7 +15,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -39,6 +39,7 @@ import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializer; import org.opensearch.client.json.NdJsonpSerializable; +import org.opensearch.client.opensearch._types.Script; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; @@ -52,7 +53,7 @@ public class UpdateOperation extends BulkOperationBase implements NdJsonpSerializable, BulkOperationVariant { - private final TDocument document; + private final UpdateOperationData data; @Nullable private final Boolean requireAlias; @@ -67,8 +68,7 @@ public class UpdateOperation extends BulkOperationBase implements NdJ private UpdateOperation(Builder builder) { super(builder); - this.document = ApiTypeHelper.requireNonNull(builder.document, this, "document"); - + this.data = ApiTypeHelper.requireNonNull(builder.data, this, "data"); this.requireAlias = builder.requireAlias; this.retryOnConflict = builder.retryOnConflict; this.tDocumentSerializer = builder.tDocumentSerializer; @@ -88,16 +88,9 @@ public BulkOperation.Kind _bulkOperationKind() { return BulkOperation.Kind.Update; } - /** - * Required - API name: {@code document} - */ - public final TDocument document() { - return this.document; - } - @Override public Iterator _serializables() { - return Arrays.asList(this, this.document).iterator(); + return Arrays.asList(this, this.data).iterator(); } /** @@ -129,7 +122,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.retryOnConflict); } - } // --------------------------------------------------------------------------------------------- @@ -141,24 +133,61 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends BulkOperationBase.AbstractBuilder> implements ObjectBuilder> { + + private UpdateOperationData data; + + @Nullable private TDocument document; + @Nullable + private Boolean requireAlias; + + @Nullable + private Integer retryOnConflict; + + @Nullable + private JsonpSerializer tDocumentSerializer; + + @Nullable + private Boolean docAsUpsert; + + @Nullable + private TDocument upsert; + + @Nullable + private Script script; + /** - * Required - API name: {@code document} + * API name: {@code document} */ public final Builder document(TDocument value) { this.document = value; return this; } - @Nullable - private Boolean requireAlias; + /** + * API name: {@code docAsUpsert} + */ + public final Builder docAsUpsert(@Nullable Boolean value) { + this.docAsUpsert = value; + return this; + } - @Nullable - private Integer retryOnConflict; + /** + * API name: {@code upsert} + */ + public final Builder upsert(@Nullable TDocument value) { + this.upsert = value; + return this; + } - @Nullable - private JsonpSerializer tDocumentSerializer; + /** + * API name: {@code script} + */ + public final Builder script(@Nullable Script value) { + this.script = value; + return this; + } /** * API name: {@code require_alias} @@ -194,11 +223,19 @@ protected Builder self() { * Builds a {@link UpdateOperation}. * * @throws NullPointerException - * if some of the required fields are null. + * if some of the required fields are null. */ public UpdateOperation build() { _checkSingleUse(); + data = new UpdateOperationData.Builder() + .document(document) + .docAsUpsert(docAsUpsert) + .script(script) + .upsert(upsert) + .tDocumentSerializer(tDocumentSerializer) + .build(); + return new UpdateOperation(this); } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperationData.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperationData.java new file mode 100644 index 0000000000..e29ba6e630 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperationData.java @@ -0,0 +1,158 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.bulk; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.JsonpSerializer; +import org.opensearch.client.json.JsonpUtils; +import org.opensearch.client.opensearch._types.Script; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +public class UpdateOperationData implements JsonpSerializable { + @Nullable + private final TDocument document; + + @Nullable + private final Boolean docAsUpsert; + + @Nullable + private final TDocument upsert; + + @Nullable + private final Script script; + + @Nullable + private final JsonpSerializer tDocumentSerializer; + + private UpdateOperationData(Builder builder) { + this.document = builder.document; + this.docAsUpsert = builder.docAsUpsert; + this.script = builder.script; + this.upsert = builder.upsert; + this.tDocumentSerializer = builder.tDocumentSerializer; + + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (this.docAsUpsert != null) { + generator.writeKey("doc_as_upsert"); + generator.write(this.docAsUpsert); + } + + if (this.document != null) { + generator.writeKey("doc"); + JsonpUtils.serialize(document, generator, tDocumentSerializer, mapper); + } + + if (this.upsert != null) { + generator.writeKey("upsert"); + JsonpUtils.serialize(upsert, generator, tDocumentSerializer, mapper); + } + + if (this.script != null) { + generator.writeKey("script"); + this.script.serialize(generator, mapper); + } + } + + /** + * Builder for {@link UpdateOperationData}. + */ + public static class Builder extends BulkOperationBase.AbstractBuilder> + implements + ObjectBuilder> { + + @Nullable + private TDocument document; + + @Nullable + private JsonpSerializer tDocumentSerializer; + + @Nullable + private Boolean docAsUpsert; + + @Nullable + private TDocument upsert; + + + @Nullable + private Script script; + + /** + * API name: {@code document} + */ + public final Builder document(TDocument value) { + this.document = value; + return this; + } + + + /** + * API name: {@code docAsUpsert} + */ + public final Builder docAsUpsert(@Nullable Boolean value) { + this.docAsUpsert = value; + return this; + } + + /** + * API name: {@code upsert} + */ + public final Builder upsert(@Nullable TDocument value) { + this.upsert = value; + return this; + } + + /** + * API name: {@code script} + */ + public final Builder script(@Nullable Script value) { + this.script = value; + return this; + } + + /** + * Serializer for TDocument. If not set, an attempt will be made to find a + * serializer from the JSON context. + */ + public final Builder tDocumentSerializer(@Nullable JsonpSerializer value) { + this.tDocumentSerializer = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateOperationData}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateOperationData build() { + _checkSingleUse(); + + return new UpdateOperationData(this); + } + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java index 380a5bdd8a..dbf45cd4e6 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java @@ -11,9 +11,12 @@ import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch._types.InlineScript; import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch._types.Refresh; import org.opensearch.client.opensearch._types.Result; +import org.opensearch.client.opensearch._types.Script; import org.opensearch.client.opensearch.core.BulkRequest; import org.opensearch.client.opensearch.core.BulkResponse; import org.opensearch.client.opensearch.core.DeleteResponse; @@ -336,7 +339,7 @@ public void testBulk() throws IOException { boolean erroneous = randomBoolean(); errors[i] = erroneous; BulkOperation.Kind opType = randomFrom(BulkOperation.Kind.Delete, BulkOperation.Kind.Index, - BulkOperation.Kind.Create/*, BulkOperation.Kind.Update*/); + BulkOperation.Kind.Create, BulkOperation.Kind.Update); if (opType.equals(BulkOperation.Kind.Delete)) { if (!erroneous) { assertEquals( @@ -396,6 +399,93 @@ public void testBulk() throws IOException { validateBulkResponses(nbItems, errors, bulkResponse, bulkRequest); } + public void testBulkUpdateScript() throws IOException { + final String id = "100"; + + final AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + assertEquals( + Result.Created, + javaClient().index(b -> b.index("index").id(id).document(appData)).result() + ); + + final BulkOperation op = new BulkOperation.Builder().update(o -> o + .index("index") + .id(id) + .script(Script.of(s -> s.inline(new InlineScript.Builder() + .lang("painless") + .source("ctx._source.intValue += params.inc") + .params("inc", JsonData.of(1)) + .build()))) + ).build(); + + BulkRequest bulkRequest = new BulkRequest.Builder().operations(op).build(); + BulkResponse bulkResponse = javaClient().bulk(bulkRequest); + + assertTrue(bulkResponse.took() > 0); + assertEquals(1, bulkResponse.items().size()); + + final GetResponse getResponse = javaClient().get(b -> b.index("index").id(id), AppData.class); + assertTrue(getResponse.found()); + assertEquals(1338, getResponse.source().getIntValue()); + } + + public void testBulkUpdateScriptUpsert() throws IOException { + final String id = "100"; + + final AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + final BulkOperation op = new BulkOperation.Builder().update(o -> o + .index("index") + .id(id) + .upsert(appData) + .script(Script.of(s -> s.inline(new InlineScript.Builder() + .lang("painless") + .source("ctx._source.intValue += params.inc") + .params("inc", JsonData.of(1)) + .build()))) + ).build(); + + BulkRequest bulkRequest = new BulkRequest.Builder().operations(op).build(); + BulkResponse bulkResponse = javaClient().bulk(bulkRequest); + + assertTrue(bulkResponse.took() > 0); + assertEquals(1, bulkResponse.items().size()); + + final GetResponse getResponse = javaClient().get(b -> b.index("index").id(id), AppData.class); + assertTrue(getResponse.found()); + assertEquals(1337, getResponse.source().getIntValue()); + } + + public void testBulkUpdateUpsert() throws IOException { + final String id = "100"; + + final AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + final BulkOperation op = new BulkOperation.Builder().update(o -> o + .index("index") + .id(id) + .document(new AppData()) + .upsert(appData) + ).build(); + + BulkRequest bulkRequest = new BulkRequest.Builder().operations(op).build(); + BulkResponse bulkResponse = javaClient().bulk(bulkRequest); + + assertTrue(bulkResponse.took() > 0); + assertEquals(1, bulkResponse.items().size()); + + final GetResponse getResponse = javaClient().get(b -> b.index("index").id(id), AppData.class); + assertTrue(getResponse.found()); + assertEquals(1337, getResponse.source().getIntValue()); + } + private void validateBulkResponses(int nbItems, boolean[] errors, BulkResponse bulkResponse, BulkRequest bulkRequest) { for (int i = 0; i < nbItems; i++) { BulkResponseItem bulkResponseItem = bulkResponse.items().get(i); @@ -407,8 +497,8 @@ private void validateBulkResponses(int nbItems, boolean[] errors, BulkResponse b if (bulkOperation.isIndex() || bulkOperation.isCreate()) { assertEquals(errors[i] ? 409 : 201, bulkResponseItem.status()); } else if (bulkOperation.isUpdate()) { - assertEquals(errors[i] ? Result.NotFound.jsonValue() : Result.Updated.jsonValue(), bulkResponseItem.result()); assertEquals(errors[i] ? 404 : 200, bulkResponseItem.status()); + assertEquals(errors[i] ? null /* no result from server */ : Result.Updated.jsonValue(), bulkResponseItem.result()); } else if (bulkOperation.isDelete()) { assertEquals(errors[i] ? Result.NotFound.jsonValue() : Result.Deleted.jsonValue(), bulkResponseItem.result()); assertEquals(errors[i] ? 404 : 200, bulkResponseItem.status()); From 2b500bb26bedb314953731b4c0b0209035040061 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 7 Feb 2023 15:27:32 -0500 Subject: [PATCH 018/123] Bumps Jackson from 2.14.1 to 2.14.2 (#357) (#359) Signed-off-by: Andriy Redko --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e12a76ec8..ebecf767ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 - Update Jackson to 2.14.0 ([#259](https://github.com/opensearch-project/opensearch-java/pull/259)) +- Bumps `Jackson` from 2.14.1 to 2.14.2 ([#357](https://github.com/opensearch-project/opensearch-java/pull/357)) ### Changed - Update literature around changelog contributions in CONTRIBUTING.md ([#242](https://github.com/opensearch-project/opensearch-java/pull/242)) diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index e22bc40093..2ca2af6506 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -140,8 +140,8 @@ val integrationTest = task("integrationTest") { dependencies { val opensearchVersion = "2.4.1" - val jacksonVersion = "2.14.1" - val jacksonDatabindVersion = "2.14.1" + val jacksonVersion = "2.14.2" + val jacksonDatabindVersion = "2.14.2" // Apache 2.0 implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) From 8daf5be76f1575793597f5fd59a8fc7037514c91 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:46:57 -0800 Subject: [PATCH 019/123] Upgrading compatibility to opensearch 2.5 (#367) (#368) * Upgrading compatibility to opensearch 2.5 * latest 2.4 version * keep existing compatibility matrix rows, this pr adds a new row for versions of opensearch after 2.3.0 --------- (cherry picked from commit a924a74e02b2fc6d2d7991f3365ff97e95a20d6b) Signed-off-by: amitai stern <123amitai@gmail.com> Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .github/workflows/test-integration.yml | 2 ++ COMPATIBILITY.md | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 921815ecb8..0c170ff080 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -17,6 +17,8 @@ jobs: - { opensearch_version: 2.1.0, java: 11 } - { opensearch_version: 2.2.1, java: 11 } - { opensearch_version: 2.3.0, java: 11 } + - { opensearch_version: 2.4.1, java: 11 } + - { opensearch_version: 2.5.0, java: 11 } steps: - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v1 diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index c0b9044ee4..78b2b1372b 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -6,10 +6,11 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https://search.maven.org/artifact/org.opensearch.client/opensearch-java) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch). | Client Version | OpenSearch Version | -| --- | --- | -| 1.0.0 | 1.0.0-1.3.3 | -| 2.0.0 | 1.3.3-2.0.1 | -| 2.1.0 | 1.3.3-2.3.0 | +|----------------|--------------------| +| 1.0.0 | 1.0.0-1.3.3 | +| 2.0.0 | 1.3.3-2.0.1 | +| 2.1.0 | 1.3.3-2.3.0 | +| 2.2.0 | 1.3.3-2.5.0 | ## Upgrading From b515c9ce06ab2db5d940d7190abb1cc2b2679ac5 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 18:52:43 -0500 Subject: [PATCH 020/123] [Backport 2.x] Feature/range aggregation fix 369 (#381) * Feature/range aggregation fix 369 (#370) * test: create integration tests for date_range and range aggregation (#369) Signed-off-by: Dominik Szczepanczyk * fix: add a missing key propery to the RangeBucket (#369) Signed-off-by: Dominik Szczepanczyk * docs: add CHANGELOG entry (#369) Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk (cherry picked from commit 99d0e6a8c26eb6f3af688601f00da0555f8c5064) Signed-off-by: github-actions[bot] * Fixing compile errors Signed-off-by: Vacha Shah --------- Signed-off-by: Dominik Szczepanczyk Signed-off-by: github-actions[bot] Signed-off-by: Vacha Shah Co-authored-by: github-actions[bot] Co-authored-by: Vacha Shah --- CHANGELOG.md | 1 + .../_types/aggregations/RangeBucket.java | 29 +++ .../restclient/AggregationRequestIT.java | 173 ++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index ebecf767ac..4814395ae6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Do not double-wrap OpenSearchException on error ([#323](https://github.com/opensearch-project/opensearch-java/pull/323)) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) - Bulk UpdateOperation misses upsert options ([#353](https://github.com/opensearch-project/opensearch-java/pull/353)) +- Fix missing key property in the RangeBucket ([#370](https://github.com/opensearch-project/opensearch-java/pull/370)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java index 58b5a74b76..b8dd31a18b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java @@ -51,6 +51,9 @@ @JsonpDeserializable public class RangeBucket extends MultiBucketBase { + + @Nullable + private final String key; @Nullable private final Double from; @@ -68,6 +71,7 @@ public class RangeBucket extends MultiBucketBase { private RangeBucket(Builder builder) { super(builder); + this.key = builder.key; this.from = builder.from; this.to = builder.to; this.fromAsString = builder.fromAsString; @@ -79,6 +83,14 @@ public static RangeBucket of(Function> fn) { return fn.apply(new Builder()).build(); } + /** + * API name: {@code key} + */ + @Nullable + public final String key() { + return this.key; + } + /** * API name: {@code from} */ @@ -114,6 +126,11 @@ public final String toAsString() { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); + if (this.key != null) { + generator.writeKey("key"); + generator.write(this.key); + + } if (this.from != null) { generator.writeKey("from"); generator.write(this.from); @@ -144,6 +161,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends MultiBucketBase.AbstractBuilder implements ObjectBuilder { + + @Nullable + private String key; @Nullable private Double from; @@ -156,6 +176,14 @@ public static class Builder extends MultiBucketBase.AbstractBuilder imp @Nullable private String toAsString; + /** + * API name: {@code key} + */ + public final Builder key(String value) { + this.key = value; + return this; + } + /** * API name: {@code from} */ @@ -216,6 +244,7 @@ public RangeBucket build() { protected static void setupRangeBucketDeserializer(ObjectDeserializer op) { setupMultiBucketBaseDeserializer(op); + op.add(Builder::key, JsonpDeserializer.stringDeserializer(), "key"); op.add(Builder::from, JsonpDeserializer.doubleDeserializer(), "from"); op.add(Builder::to, JsonpDeserializer.doubleDeserializer(), "to"); op.add(Builder::fromAsString, JsonpDeserializer.stringDeserializer(), "from_as_string"); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java new file mode 100644 index 0000000000..e5f1c4b00e --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java @@ -0,0 +1,173 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.http.HttpHost; +import org.junit.Test; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.aggregations.Aggregation; +import org.opensearch.client.opensearch._types.aggregations.AggregationRange; +import org.opensearch.client.opensearch._types.aggregations.DateRangeAggregation; +import org.opensearch.client.opensearch._types.aggregations.DateRangeExpression; +import org.opensearch.client.opensearch._types.aggregations.FieldDateMath; +import org.opensearch.client.opensearch._types.aggregations.RangeAggregation; +import org.opensearch.client.opensearch.core.SearchResponse; +import org.opensearch.client.opensearch.integTest.AbstractRequestIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +import java.io.IOException; +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.util.Date; +import java.util.List; + +public class AggregationRequestIT extends AbstractRequestIT { + + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } + + @Test + public void testValueRangeAggregation() throws Exception { + var index = "test-value-range-aggregation"; + createDateRangeDocuments(index); + var searchResponse = sendAggregateRequest(index, "cost_ranges", getCostValueRangeAggregation()); + var costRangesAggregations = searchResponse.aggregations().get("cost_ranges"); + var buckets = costRangesAggregations._get() + ._toAggregate() + .range() + .buckets() + .array(); + + assertEquals(3, buckets.size()); + assertEquals(2, buckets.get(0).docCount()); + assertEquals(2, buckets.get(1).docCount()); + assertEquals(2, buckets.get(2).docCount()); + } + + @Test + public void testDateRangeAggregation() throws Exception { + var index = "test-date-range-aggregation"; + createDateRangeDocuments(index); + var searchResponse = sendAggregateRequest(index, "expiry_ranges", getExpiryDateRangeAggregation()); + var expiryRangesAggregations = searchResponse.aggregations().get("expiry_ranges"); + var buckets = expiryRangesAggregations._get() + ._toAggregate() + .dateRange() + .buckets() + .array(); + + assertEquals(3, buckets.size()); + assertEquals(2, buckets.get(0).docCount()); + assertEquals(2, buckets.get(1).docCount()); + assertEquals(2, buckets.get(2).docCount()); + } + + private Aggregation getExpiryDateRangeAggregation() { + DateRangeAggregation expiryDateRangeAggregation = new DateRangeAggregation.Builder() + .field("expDate") + .ranges(getDateAggregationRanges()) + .build(); + return new Aggregation.Builder().dateRange(expiryDateRangeAggregation).build(); + } + + private Aggregation getCostValueRangeAggregation() { + RangeAggregation costValueRangeAggregation = new RangeAggregation.Builder() + .field("cost") + .ranges(getValueAggregationRanges()) + .build(); + return new Aggregation.Builder().range(costValueRangeAggregation).build(); + } + + private SearchResponse sendAggregateRequest(String index, String key, Aggregation value) throws IOException { + return javaClient().search( + request -> request.index(index) + .size(0) + .aggregations(key, value), + Void.class); + } + + private List getDateAggregationRanges() { + return List.of( + new DateRangeExpression.Builder() + .from(builder -> builder.value((double) getDatePlusDays(1).getTime())) + .to(FieldDateMath.of(builder -> builder.value((double) getDatePlusDays(3).getTime() - 1000))) + .key("from-1-to-2-days") + .build(), + new DateRangeExpression.Builder() + .from(builder -> builder.value((double) getDatePlusDays(3).getTime())) + .to(FieldDateMath.of(builder -> builder.value((double) getDatePlusDays(5).getTime() - 1000))) + .key("from-3-to-4-days") + .build(), + new DateRangeExpression.Builder() + .from(builder -> builder.value((double) getDatePlusDays(5).getTime())) + .to(FieldDateMath.of(builder -> builder.value((double) getDatePlusDays(7).getTime() - 1000))) + .key("from-5-to-6-days") + .build() + ); + } + + private List getValueAggregationRanges() { + return List.of( + new AggregationRange.Builder().to("10").build(), + new AggregationRange.Builder().from("10").to("30").build(), + new AggregationRange.Builder().from("30").build() + ); + } + + private void createDateRangeDocuments(String index) throws IOException { + javaClient().create(_1 -> _1.index(index).id("1").document(createProduct("egg", 2, 1)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2").document(createProduct("meat", 15, 2)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3").document(createProduct("ham", 30, 3)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("4").document(createProduct("cheese", 25, 4)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("5").document(createProduct("pasta", 8, 5)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("6").document(createProduct("oil", 50, 6)).refresh(Refresh.True)); + } + + private ProductDetails createProduct(String name, int cost, int plusDays) { + return new ProductDetails(name, cost, getDatePlusDays(plusDays)); + } + + private Date getDatePlusDays(int plusDays) { + return java.sql.Date.from(LocalDateTime.of(2023, 2, 20, 0, 0, 0).plusDays(plusDays).toInstant(ZoneOffset.UTC)); + } + + public static class ProductDetails { + private String name; + private int cost; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS") + private Date expDate; + + public ProductDetails() { + } + + public ProductDetails(String name, int cost, Date expDate) { + this.name = name; + this.cost = cost; + this.expDate = expDate; + } + + public String getName() { + return name; + } + + public int getCost() { + return cost; + } + + public Date getExpDate() { + return expDate; + } + } +} From 63693abe21134c0ae182c5d8dcb34c3c21d80947 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:20:24 -0800 Subject: [PATCH 021/123] Refactor two-client usage. (#333) (#386) * Refactor two-client usage. * Avoid double-closing the client on cleanup. * Refactor constructors to take sync/async explicitly. * Corrected comments and cleaned up variable naming. (cherry picked from commit a0ca15c44150d69c3d8cc4a907ef31d831ecf0f9) Signed-off-by: dblock Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../transport/aws/AwsSdk2Transport.java | 123 ++++++------------ .../aws/AwsSdk2TransportTestCase.java | 36 ++--- 2 files changed, 51 insertions(+), 108 deletions(-) diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index 208c904434..8fd1dfa9b4 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -38,6 +38,7 @@ import software.amazon.awssdk.http.async.AsyncExecuteRequest; import software.amazon.awssdk.http.async.SdkAsyncHttpClient; import software.amazon.awssdk.regions.Region; +import software.amazon.awssdk.utils.SdkAutoCloseable; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; @@ -70,8 +71,7 @@ public class AwsSdk2Transport implements OpenSearchTransport { public static final Integer DEFAULT_REQUEST_COMPRESSION_SIZE = 8192; private static final byte[] NO_BYTES = new byte[0]; - private final SdkHttpClient httpClient; - private final SdkAsyncHttpClient asyncHttpClient; + private final SdkAutoCloseable httpClient; private final String host; private final String signingServiceName; private final Region signingRegion; @@ -79,12 +79,12 @@ public class AwsSdk2Transport implements OpenSearchTransport { private final AwsSdk2TransportOptions transportOptions; /** - * Create an {@link OpenSearchTransport} with a synchronous AWS HTTP client. + * Create an {@link OpenSearchTransport} with an asynchronous AWS HTTP client. *

* Note that asynchronous OpenSearch requests sent through this transport will be dispatched * *synchronously* on the calling thread. * - * @param httpClient HTTP client to use for OpenSearch requests. + * @param asyncHttpClient Asynchronous HTTP client to use for OpenSearch requests. * @param host The fully qualified domain name to connect to. * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. * @param options Options that apply to all requests. Can be null. Create with @@ -92,132 +92,82 @@ public class AwsSdk2Transport implements OpenSearchTransport { * compression options, etc. */ public AwsSdk2Transport( - @Nonnull SdkHttpClient httpClient, + @CheckForNull SdkAsyncHttpClient asyncHttpClient, @Nonnull String host, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - this(httpClient, null, host, "es", signingRegion, options); + this(asyncHttpClient, host, "es", signingRegion, options); } /** * Create an {@link OpenSearchTransport} with a synchronous AWS HTTP client. - *

- * Note that asynchronous OpenSearch requests sent through this transport will be dispatched - * *synchronously* on the calling thread. * - * @param httpClient HTTP client to use for OpenSearch requests. + * @param syncHttpClient Synchronous HTTP client to use for OpenSearch requests. * @param host The fully qualified domain name to connect to. - * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. * @param options Options that apply to all requests. Can be null. Create with * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, * compression options, etc. */ public AwsSdk2Transport( - @Nonnull SdkHttpClient httpClient, + @CheckForNull SdkHttpClient syncHttpClient, @Nonnull String host, - @Nonnull String signingServiceName, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - this(httpClient, null, host, signingServiceName, signingRegion, options); - } - - /** - * Create an {@link OpenSearchTransport} with an asynchronous AWS HTTP client - *

- * Note that synchronous OpenSearch requests sent through this transport will be dispatched - * using the asynchronous client, but the calling thread will block until they are complete. - * - * @param asyncHttpClient HTTP client to use for OpenSearch requests. - * @param host The target host. - * @param signingRegion The AWS region for which requests will be signed. This should typically match region in `host`. - * @param options Options that apply to all requests. Can be null. Create with - * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, - * compression options, etc. - */ - public AwsSdk2Transport( - @Nonnull SdkAsyncHttpClient asyncHttpClient, - @Nonnull String host, - @Nonnull Region signingRegion, - @CheckForNull AwsSdk2TransportOptions options) { - this(null, asyncHttpClient, host, "es", signingRegion, options); + this(syncHttpClient, host, "es", signingRegion, options); } /** * Create an {@link OpenSearchTransport} with an asynchronous AWS HTTP client. *

- * Note that synchronous OpenSearch requests sent through this transport will be dispatched - * using the asynchronous client, but the calling thread will block until they are complete. + * Note that asynchronous OpenSearch requests sent through this transport will be dispatched + * *synchronously* on the calling thread. * - * @param asyncHttpClient HTTP client to use for OpenSearch requests. - * @param host The target host. - * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). + * @param asyncHttpClient Asynchronous HTTP client to use for OpenSearch requests. + * @param host The fully qualified domain name to connect to. * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). * @param options Options that apply to all requests. Can be null. Create with * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, * compression options, etc. */ public AwsSdk2Transport( - @Nonnull SdkAsyncHttpClient asyncHttpClient, + @CheckForNull SdkAsyncHttpClient asyncHttpClient, @Nonnull String host, @Nonnull String signingServiceName, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - this(null, asyncHttpClient, host, signingServiceName, signingRegion, options); + this((SdkAutoCloseable) asyncHttpClient, host, signingServiceName, signingRegion, options); } /** - * Create an {@link OpenSearchTransport} with both synchronous and asynchronous AWS HTTP clients. - *

- * The synchronous client will be used for synchronous OpenSearch requests, and the asynchronous client - * will be used for asynchronous HTTP requests. + * Create an {@link OpenSearchTransport} with a synchronous AWS HTTP client. * - * @param httpClient HTTP client to use for OpenSearch requests. - * @param asyncHttpClient HTTP client to use for synchronous OpenSearch requests. + * @param syncHttpClient Synchronous HTTP client to use for OpenSearch requests. * @param host The fully qualified domain name to connect to. * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. + * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). * @param options Options that apply to all requests. Can be null. Create with * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, * compression options, etc. */ public AwsSdk2Transport( - @CheckForNull SdkHttpClient httpClient, - @CheckForNull SdkAsyncHttpClient asyncHttpClient, + @CheckForNull SdkHttpClient syncHttpClient, @Nonnull String host, + @Nonnull String signingServiceName, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - this(httpClient, asyncHttpClient, host, "es", signingRegion, options); + this((SdkAutoCloseable) syncHttpClient, host, signingServiceName, signingRegion, options); } - /** - * Create an {@link OpenSearchTransport} with both synchronous and asynchronous AWS HTTP clients. - *

- * The synchronous client will be used for synchronous OpenSearch requests, and the asynchronous client - * will be used for asynchronous HTTP requests. - * - * @param httpClient HTTP client to use for OpenSearch requests. - * @param asyncHttpClient HTTP client to use for synchronous OpenSearch requests. - * @param host The fully qualified domain name to connect to. - * @param signingRegion The AWS region for which requests will be signed. This should typically match the region in `host`. - * @param signingServiceName The AWS signing service name, one of `es` (Amazon OpenSearch) or `aoss` (Amazon OpenSearch Serverless). - * @param options Options that apply to all requests. Can be null. Create with - * {@link AwsSdk2TransportOptions#builder()} and use these to specify non-default credentials, - * compression options, etc. - */ - public AwsSdk2Transport( - @CheckForNull SdkHttpClient httpClient, - @CheckForNull SdkAsyncHttpClient asyncHttpClient, + private AwsSdk2Transport( + @CheckForNull SdkAutoCloseable httpClient, @Nonnull String host, @Nonnull String signingServiceName, @Nonnull Region signingRegion, @CheckForNull AwsSdk2TransportOptions options) { - if (httpClient == null && asyncHttpClient == null) - { - throw new IllegalArgumentException("At least one SdkHttpClient or SdkAsyncHttpClient must be provided"); - } Objects.requireNonNull(host, "Target OpenSearch service host must not be null"); this.httpClient = httpClient; - this.asyncHttpClient = asyncHttpClient; this.host = host; this.signingServiceName = signingServiceName; this.signingRegion = signingRegion; @@ -237,11 +187,11 @@ public ResponseT performRequest( OpenSearchRequestBodyBuffer requestBody = prepareRequestBody(request, endpoint, options); SdkHttpFullRequest clientReq = prepareRequest(request, endpoint, options, requestBody); - if (httpClient != null) { - return executeSync(clientReq, endpoint, options); - } else { + if (httpClient instanceof SdkHttpClient) { + return executeSync((SdkHttpClient) httpClient, clientReq, endpoint, options); + } else if (httpClient instanceof SdkAsyncHttpClient) { try { - return executeAsync(clientReq, requestBody, endpoint, options).get(); + return executeAsync((SdkAsyncHttpClient) httpClient, clientReq, requestBody, endpoint, options).get(); } catch (ExecutionException e) { Throwable cause = e.getCause(); if (cause != null) { @@ -257,6 +207,8 @@ public ResponseT performRequest( } catch (InterruptedException e) { throw new IOException("HttpRequest was interrupted", e); } + } else { + throw new IOException("invalid httpClient: " + httpClient); } } @@ -269,11 +221,13 @@ public CompletableFuture performRequest try { OpenSearchRequestBodyBuffer requestBody = prepareRequestBody(request, endpoint, options); SdkHttpFullRequest clientReq = prepareRequest(request, endpoint, options, requestBody); - if (asyncHttpClient != null) { - return executeAsync(clientReq, requestBody, endpoint, options); - } else { - ResponseT result = executeSync(clientReq, endpoint, options); + if (httpClient instanceof SdkAsyncHttpClient) { + return executeAsync((SdkAsyncHttpClient) httpClient, clientReq, requestBody, endpoint, options); + } else if (httpClient instanceof SdkHttpClient) { + ResponseT result = executeSync((SdkHttpClient) httpClient, clientReq, endpoint, options); return CompletableFuture.completedFuture(result); + } else { + throw new IOException("invalid httpClient: " + httpClient); } } catch (Throwable e) { CompletableFuture cf = new CompletableFuture<>(); @@ -421,6 +375,7 @@ private void applyOptionsHeaders(SdkHttpFullRequest.Builder builder, TransportOp } private ResponseT executeSync( + SdkHttpClient syncHttpClient, SdkHttpFullRequest httpRequest, Endpoint endpoint, TransportOptions options @@ -430,7 +385,7 @@ private ResponseT executeSync( if (httpRequest.contentStreamProvider().isPresent()) { executeRequest.contentStreamProvider(httpRequest.contentStreamProvider().get()); } - HttpExecuteResponse executeResponse = httpClient.prepareRequest(executeRequest.build()).call(); + HttpExecuteResponse executeResponse = syncHttpClient.prepareRequest(executeRequest.build()).call(); AbortableInputStream bodyStream = null; try { bodyStream = executeResponse.responseBody().orElse(null); @@ -444,6 +399,7 @@ private ResponseT executeSync( } private CompletableFuture executeAsync( + SdkAsyncHttpClient asyncHttpClient, SdkHttpFullRequest httpRequest, @CheckForNull OpenSearchRequestBodyBuffer requestBody, Endpoint endpoint, @@ -546,7 +502,6 @@ private ResponseT parseResponse( ResponseT response = (ResponseT) new BooleanResponse(bep.getResult(statusCode)); return response; } else if (endpoint instanceof JsonEndpoint) { - @SuppressWarnings("unchecked") JsonEndpoint jsonEndpoint = (JsonEndpoint) endpoint; // Successful response ResponseT response = null; diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java index fa1d33f39a..8adcd4300b 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2TransportTestCase.java @@ -8,7 +8,6 @@ package org.opensearch.client.opensearch.integTest.aws; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -42,7 +41,6 @@ import java.util.Objects; import java.util.concurrent.CompletableFuture; - public abstract class AwsSdk2TransportTestCase { public static final String TEST_INDEX = "opensearch-java-integtest"; @@ -85,16 +83,14 @@ protected OpenSearchClient getClient( getTestClusterHost(), getTestClusterServiceName(), getTestClusterRegion(), - getTransportOptions().build() - ); + getTransportOptions().build()); } else { transport = new AwsSdk2Transport( getHttpClient(), getTestClusterHost(), getTestClusterServiceName(), getTestClusterRegion(), - getTransportOptions().build() - ); + getTransportOptions().build()); } return new OpenSearchClient(transport); } @@ -111,16 +107,14 @@ protected OpenSearchAsyncClient getAsyncClient( getTestClusterHost(), getTestClusterServiceName(), getTestClusterRegion(), - getTransportOptions().build() - ); + getTransportOptions().build()); } else { transport = new AwsSdk2Transport( getHttpClient(), getTestClusterHost(), getTestClusterServiceName(), getTestClusterRegion(), - getTransportOptions().build() - ); + getTransportOptions().build()); } return new OpenSearchAsyncClient(transport); } @@ -137,16 +131,14 @@ protected OpenSearchIndicesClient getIndexesClient( getTestClusterHost(), getTestClusterServiceName(), getTestClusterRegion(), - getTransportOptions().build() - ); + getTransportOptions().build()); } else { transport = new AwsSdk2Transport( getHttpClient(), getTestClusterHost(), getTestClusterServiceName(), getTestClusterRegion(), - getTransportOptions().build() - ); + getTransportOptions().build()); } return new OpenSearchIndicesClient(transport); } @@ -171,6 +163,7 @@ public static void cleanupClients() throws IOException { if (httpClient != null) { try { httpClient.close(); + httpClient = null; } catch (Throwable e) { // Not our problem } @@ -178,6 +171,7 @@ public static void cleanupClients() throws IOException { if (asyncHttpClient != null) { try { asyncHttpClient.close(); + asyncHttpClient = null; } catch (Throwable e) { // Not our problem } @@ -204,10 +198,8 @@ public void resetTestIndex(boolean async) throws Exception { IndexState indexInfo = client.get(b -> b.index(TEST_INDEX)).get(TEST_INDEX); if (indexInfo != null) { indexExists = true; - } - } catch ( - OpenSearchException e) { + } catch (OpenSearchException e) { if (e.status() != 404) { throw e; } @@ -237,17 +229,14 @@ protected SearchResponse query(OpenSearchClient client, String title .ignoreThrottled(false) .sort( new SortOptions.Builder().score(o -> o.order(SortOrder.Desc)).build(), - new SortOptions.Builder().doc(o -> o.order(SortOrder.Desc)).build() - ) + new SortOptions.Builder().doc(o -> o.order(SortOrder.Desc)).build()) .query(query); - return client.search(req.build(), SimplePojo.class); } protected CompletableFuture> query( - OpenSearchAsyncClient client, String title, String text - ) { + OpenSearchAsyncClient client, String title, String text) { var query = Query.of(qb -> { if (title != null) { qb.match(mb -> mb.field("title").query(vb -> vb.stringValue(title))); @@ -264,8 +253,7 @@ protected CompletableFuture> query( .ignoreThrottled(false) .sort( new SortOptions.Builder().score(o -> o.order(SortOrder.Desc)).build(), - new SortOptions.Builder().doc(o -> o.order(SortOrder.Desc)).build() - ) + new SortOptions.Builder().doc(o -> o.order(SortOrder.Desc)).build()) .query(query); try { From faebdf7453eb99bbba3eb2891ce9b5153313467e Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 15:59:10 -0800 Subject: [PATCH 022/123] Adding bulk request example in user guide (#373) (#384) (cherry picked from commit 75c5e595f01014942482464d00a84311ea28f962) Signed-off-by: Vacha Shah Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- USER_GUIDE.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 186d22de6d..5d3f5ceec6 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -10,6 +10,7 @@ - [Index data](#index-data) - [Search for the documents](#search-for-the-documents) - [Search documents using a match query](#search-documents-using-a-match-query) + - [Bulk requests](#bulk-requests) - [Aggregations](#aggregations) - [Delete the document](#delete-the-document) - [Delete the index](#delete-the-index) @@ -131,6 +132,30 @@ for (int i = 0; i < searchResponse.hits().hits().size(); i++) { } ``` +## Bulk requests + +```java +ArrayList ops = new ArrayList<>(); +SimplePojo doc1 = new SimplePojo("Document 1", "The text of document 1"); +ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(TEST_INDEX).id("id1").document(doc1)) +).build()); +SimplePojo doc2 = new SimplePojo("Document 2", "The text of document 2"); +ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(TEST_INDEX).id("id2").document(doc2)) +).build()); +SimplePojo doc3 = getLongDoc("Long Document 3", 100000); +ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(TEST_INDEX).id("id3").document(doc3)) +).build()); + +BulkRequest.Builder bulkReq = new BulkRequest.Builder() + .index(index) + .operations(ops) + .refresh(Refresh.WaitFor); +BulkResponse bulkResponse = client.bulk(bulkReq.build()); +``` + ## Aggregations ```java From 684f216dd5d4a5c06d30938952a888684c50e4f3 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 15:06:09 -0800 Subject: [PATCH 023/123] Adding an example to use raw JSON class instead of target classes (#385) (#393) (cherry picked from commit b61467d96b64064a079b43b8d3417d20471b39e0) Signed-off-by: Vacha Shah Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- USER_GUIDE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 5d3f5ceec6..5c8a4be197 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -9,6 +9,7 @@ - [Create an index](#create-an-index) - [Index data](#index-data) - [Search for the documents](#search-for-the-documents) + - [Get raw JSON results](#get-raw-json-results) - [Search documents using a match query](#search-documents-using-a-match-query) - [Bulk requests](#bulk-requests) - [Aggregations](#aggregations) @@ -119,6 +120,17 @@ for (int i = 0; i < searchResponse.hits().hits().size(); i++) { } ``` +### Get raw JSON results + +When the target class is not defined or if the response result is a semi-structured data not tied to an object definition, use a raw JSON data representation as the target class. For example, the below snippet uses `ObjectNode` from jackson. + +```java +SearchResponse searchResponse = client.search(b -> b.index(index), ObjectNode.class); +for (int i = 0; i < searchResponse.hits().hits().size(); i++) { + System.out.println(searchResponse.hits().hits().get(i).source()); +} +``` + ## Search documents using a match query ```java From 68ef7a72341d163f83afaf85614da77a69a1a1a8 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 19:53:19 -0800 Subject: [PATCH 024/123] Update Gradle to 8.0.2 (#392) (#397) (cherry picked from commit 9b9ec0081b2adf99c538ee54c39ec9fceda2a16c) Signed-off-by: Andriy Redko Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- gradle/wrapper/gradle-wrapper.jar | Bin 61574 -> 61608 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa754578e88a3dae77fce6e3dea56edbf..ccebba7710deaf9f98673a68957ea02138b60d0a 100644 GIT binary patch delta 5094 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 delta 5107 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 I6Xdi10eY*&F8}}l diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bae4d14379..054eda1ddc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -28,7 +28,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b +distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 diff --git a/gradlew b/gradlew index 65dcd68d65..79a61d421c 100755 --- a/gradlew +++ b/gradlew @@ -144,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac From 2e7de621104e59f0e2ceb95aba6a61fbe86cd487 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 8 Mar 2023 05:45:19 -0800 Subject: [PATCH 025/123] Bumping classgraph from 4.8.149 to 4.8.156 (#395) Signed-off-by: Vacha Shah --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4814395ae6..1b8e3260a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 - Update Jackson to 2.14.0 ([#259](https://github.com/opensearch-project/opensearch-java/pull/259)) - Bumps `Jackson` from 2.14.1 to 2.14.2 ([#357](https://github.com/opensearch-project/opensearch-java/pull/357)) +- Bumps `classgraph` from 4.8.149 to 4.8.156 ([#395](https://github.com/opensearch-project/opensearch-java/pull/395)) ### Changed - Update literature around changelog contributions in CONTRIBUTING.md ([#242](https://github.com/opensearch-project/opensearch-java/pull/242)) diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 2ca2af6506..c9dedde6c1 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -186,7 +186,7 @@ dependencies { implementation("org.eclipse", "yasson", "2.0.2") // https://github.com/classgraph/classgraph - testImplementation("io.github.classgraph:classgraph:4.8.149") + testImplementation("io.github.classgraph:classgraph:4.8.156") // Eclipse 1.0 testImplementation("junit", "junit" , "4.13.2") { From a058ada81db797a9a4c084a67c2ce805595fd56f Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 8 Mar 2023 05:45:42 -0800 Subject: [PATCH 026/123] Add 2PR approval to release workflow (#383) (#394) Signed-off-by: Sayali Gaikawad Signed-off-by: Vacha Shah Co-authored-by: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> --- .github/workflows/release-drafter.yml | 12 ++++++++++++ CHANGELOG.md | 1 + RELEASING.md | 6 ++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 6e8fb0c948..72bc8a69ca 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -12,6 +12,18 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + - id: get_data + run: | + echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT + echo "version=$(cat gradle.properties | grep "systemProp.version" | cut -d'=' -f2)" >> $GITHUB_OUTPUT + - uses: trstringer/manual-approval@v1 + with: + secret: ${{ github.TOKEN }} + approvers: ${{ steps.get_data.outputs.approvers }} + minimum-approvals: 2 + issue-title: 'Release opensearch-java : ${{ steps.get_data.outputs.version }}' + issue-body: "Please approve or deny the release of opensearch-java. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}" + exclude-workflow-initiator-as-approver: true - name: Set up JDK 11 uses: actions/setup-java@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b8e3260a0..b846e6d74d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add support for signing service name in AwsSdk2Transport ([#324](https://github.com/opensearch-project/opensearch-java/pull/324)) - Add new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) - Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321)) +- Require two maintainers to approve release ([#383](https://github.com/opensearch-project/opensearch-java/pull/383)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/RELEASING.md b/RELEASING.md index 0d0729e578..b19130399b 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -34,5 +34,7 @@ Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md). 1. Create a tag, e.g. `v2.1.0`, and push it to the GitHub repo. -2. This creates a draft release which triggers the [opensearch-java-maven-sign-and-release/](https://build.ci.opensearch.org/job/opensearch-java-maven-sign-and-release/) jenkins workflow. The artifacts will be automcatically signed and published to maven. -3. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push. \ No newline at end of file +1. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and is responsible for drafting a new release on GitHub containing release artifacts. +1. Before creating a draft release, this workflow creates a GitHub issue asking for approval from the [maintainers](MAINTAINERS.md). See sample [issue](https://github.com/gaiksaya/opensearch-java/issues/1). The maintainers need to approve in order to continue the workflow run. +1. Once a release is drafted [opensearch-java-maven-sign-and-release/](https://build.ci.opensearch.org/job/opensearch-java-maven-sign-and-release/) jenkins workflow is triggered. The artifacts will be automcatically signed and published to maven. +1. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push. \ No newline at end of file From 607ebfe094855dbd30b9d750132b7fd4f6c418d4 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 11:54:10 -0700 Subject: [PATCH 027/123] Add "mappings" field to IndexSettings object (#382) (#400) (cherry picked from commit 4c2d39dca36785f428f40a55db84fd07e32777c3) Signed-off-by: Ilya Lukyanovich Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../opensearch/indices/IndexSettings.java | 36 +++ .../indices/IndexSettingsMapping.java | 262 ++++++++++++++++++ .../indices/IndexSettingsMappingLimit.java | 106 +++++++ .../opensearch/experiments/ParsingTests.java | 57 +++- .../integTest/AbstractRequestIT.java | 98 ++++++- 6 files changed, 540 insertions(+), 20 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsMapping.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsMappingLimit.java diff --git a/CHANGELOG.md b/CHANGELOG.md index b846e6d74d..a5aaca7a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) - Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321)) - Require two maintainers to approve release ([#383](https://github.com/opensearch-project/opensearch-java/pull/383)) +- Add support for mapping limit settings ([#382](https://github.com/opensearch-project/opensearch-java/pull/382)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java index 4f0480ad28..bae7d418cb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java @@ -219,6 +219,9 @@ public class IndexSettings implements JsonpSerializable { @Nullable private final IndexSettings settings; + @Nullable + private final IndexSettingsMapping mapping; + // --------------------------------------------------------------------------------------------- private IndexSettings(Builder builder) { @@ -278,6 +281,7 @@ private IndexSettings(Builder builder) { this.topMetricsMaxSize = builder.topMetricsMaxSize; this.analysis = builder.analysis; this.settings = builder.settings; + this.mapping = builder.mapping; } @@ -724,6 +728,14 @@ public final IndexSettings settings() { return this.settings; } + /** + * API name: {@code mapping} + */ + @Nullable + public final IndexSettingsMapping mapping() { + return this.mapping; + } + /** * Serialize this object to JSON. */ @@ -1015,6 +1027,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.settings.serialize(generator, mapper); } + if (this.mapping != null) { + generator.writeKey("mapping"); + this.mapping.serialize(generator, mapper); + + } } @@ -1190,6 +1207,9 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder> fn) { + return this.mapping(fn.apply(new IndexSettingsMapping.Builder()).build()); + } + /** * Builds a {@link IndexSettings}. * @@ -1838,6 +1873,7 @@ protected static void setupIndexSettingsDeserializer(ObjectDeserializer> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code total_fields} + */ + @Nullable + public final IndexSettingsMappingLimit totalFields() { + return this.totalFields; + } + + /** + * API name: {@code depth} + */ + @Nullable + public final IndexSettingsMappingLimit depth() { + return this.depth; + } + + /** + * API name: {@code nested_fields} + */ + @Nullable + public final IndexSettingsMappingLimit nestedFields() { + return this.nestedFields; + } + + /** + * API name: {@code nested_objects} + */ + @Nullable + public final IndexSettingsMappingLimit nestedObjects() { + return this.nestedObjects; + } + + /** + * API name: {@code field_name_length} + */ + @Nullable + public final IndexSettingsMappingLimit fieldNameLength() { + return this.fieldNameLength; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (this.totalFields != null) { + generator.writeKey("total_fields"); + this.totalFields.serialize(generator, mapper); + + } + if (this.depth != null) { + generator.writeKey("depth"); + this.depth.serialize(generator, mapper); + + } + if (this.nestedFields != null) { + generator.writeKey("nested_fields"); + this.nestedFields.serialize(generator, mapper); + + } + if (this.nestedObjects != null) { + generator.writeKey("nested_objects"); + this.nestedObjects.serialize(generator, mapper); + + } + if (this.fieldNameLength != null) { + generator.writeKey("field_name_length"); + this.fieldNameLength.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IndexSettingsMapping}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private IndexSettingsMappingLimit totalFields; + + @Nullable + private IndexSettingsMappingLimit depth; + + @Nullable + private IndexSettingsMappingLimit nestedFields; + + @Nullable + private IndexSettingsMappingLimit nestedObjects; + + @Nullable + private IndexSettingsMappingLimit fieldNameLength; + + /** + * API name: {@code total_fields} + */ + public final Builder totalFields(@Nullable IndexSettingsMappingLimit value) { + this.totalFields = value; + return this; + } + + /** + * API name: {@code total_fields} + */ + public final Builder totalFields(Function> fn) { + return this.totalFields(fn.apply(new IndexSettingsMappingLimit.Builder()).build()); + } + + /** + * API name: {@code depth} + */ + public final Builder depth(@Nullable IndexSettingsMappingLimit value) { + this.depth = value; + return this; + } + + /** + * API name: {@code depth} + */ + public final Builder depth(Function> fn) { + return this.depth(fn.apply(new IndexSettingsMappingLimit.Builder()).build()); + } + + /** + * API name: {@code nested_fields} + */ + public final Builder nestedFields(@Nullable IndexSettingsMappingLimit value) { + this.nestedFields = value; + return this; + } + + /** + * API name: {@code nested_fields} + */ + public final Builder nestedFields(Function> fn) { + return this.nestedFields(fn.apply(new IndexSettingsMappingLimit.Builder()).build()); + } + + /** + * API name: {@code nested_objects} + */ + public final Builder nestedObjects(@Nullable IndexSettingsMappingLimit value) { + this.nestedObjects = value; + return this; + } + + /** + * API name: {@code nested_objects} + */ + public final Builder nestedObjects(Function> fn) { + return this.nestedObjects(fn.apply(new IndexSettingsMappingLimit.Builder()).build()); + } + + /** + * API name: {@code field_name_length} + */ + public final Builder fieldNameLength(@Nullable IndexSettingsMappingLimit value) { + this.fieldNameLength = value; + return this; + } + + /** + * API name: {@code field_name_length} + */ + public final Builder fieldNameLength(Function> fn) { + return this.fieldNameLength(fn.apply(new IndexSettingsMappingLimit.Builder()).build()); + } + + /** + * Builds a {@link IndexSettingsMapping}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IndexSettingsMapping build() { + _checkSingleUse(); + + return new IndexSettingsMapping(this); + } + } + + /** + * Json deserializer for {@link IndexSettingsMapping} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + IndexSettingsMapping::setupIndexSettingsDeserializer); + + protected static void setupIndexSettingsDeserializer(ObjectDeserializer op) { + + op.add(Builder::totalFields, IndexSettingsMappingLimit._DESERIALIZER, "total_fields"); + op.add(Builder::depth, IndexSettingsMappingLimit._DESERIALIZER, "depth"); + op.add(Builder::nestedFields, IndexSettingsMappingLimit._DESERIALIZER, "nested_fields"); + op.add(Builder::nestedObjects, IndexSettingsMappingLimit._DESERIALIZER, "nested_objects"); + op.add(Builder::fieldNameLength, IndexSettingsMappingLimit._DESERIALIZER, "field_name_length"); + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsMappingLimit.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsMappingLimit.java new file mode 100644 index 0000000000..b20238701b --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsMappingLimit.java @@ -0,0 +1,106 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import javax.annotation.Nullable; +import java.util.function.Function; + +@JsonpDeserializable +public class IndexSettingsMappingLimit implements JsonpSerializable { + + @Nullable + private final Long limit; + + private IndexSettingsMappingLimit(Builder builder) { + + this.limit = builder.limit; + + } + + public static IndexSettingsMappingLimit of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code limit} + */ + @Nullable + public final Long limit() { + return this.limit; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator) { + + if (this.limit != null) { + generator.writeKey("limit"); + generator.write(this.limit); + } + + } + + /** + * Builder for {@link IndexSettingsMappingLimit}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private Long limit; + + /** + * API name: {@code limit} + */ + public final Builder limit(@Nullable Long value) { + this.limit = value; + return this; + } + + /** + * Builds a {@link IndexSettingsMappingLimit}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IndexSettingsMappingLimit build() { + _checkSingleUse(); + + return new IndexSettingsMappingLimit(this); + } + } + + /** + * Json deserializer for {@link IndexSettingsMappingLimit} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + IndexSettingsMappingLimit::setupIndexSettingsMappingLimitDeserializer); + + protected static void setupIndexSettingsMappingLimitDeserializer(ObjectDeserializer op) { + + op.add(Builder::limit, JsonpDeserializer.longDeserializer(), "limit"); + + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java index c9dab9bdeb..6bbf1917a8 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java @@ -32,14 +32,15 @@ package org.opensearch.client.opensearch.experiments; -import org.opensearch.client.opensearch.experiments.api.FooRequest; -import org.opensearch.client.json.jsonb.JsonbJsonpMapper; import jakarta.json.spi.JsonProvider; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; import org.junit.Assert; import org.junit.Test; +import org.opensearch.client.json.jsonb.JsonbJsonpMapper; +import org.opensearch.client.opensearch.experiments.api.FooRequest; +import org.opensearch.client.opensearch.indices.IndexSettingsMapping; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -55,13 +56,13 @@ public void testFoo() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); FooRequest foo = FooRequest.builder() - .name("z") - .value(1) - .indices("a", "b", "c") - .bar(b -> b - .name("Raise the bar") - ) - .build(); + .name("z") + .value(1) + .indices("a", "b", "c") + .bar(b -> b + .name("Raise the bar") + ) + .build(); JsonProvider provider = JsonProvider.provider(); JsonGenerator generator = provider.createGenerator(baos); @@ -85,4 +86,42 @@ public void testFoo() throws Exception { throw new JsonParsingException(je.getMessage() + " at " + je.getLocation(), je, je.getLocation()); } } + + @Test + public void testIndexSettingsMappingParsing() { + + try { + + var baos = new ByteArrayOutputStream(); + + var mapping = IndexSettingsMapping.of(b -> b + .totalFields(d -> d.limit(1L)) + .depth(d -> d.limit(2L)) + .nestedFields(d -> d.limit(3L)) + .nestedObjects(d -> d.limit(4L)) + .fieldNameLength(d -> d.limit(5L))); + + var provider = JsonProvider.provider(); + var generator = provider.createGenerator(baos); + mapping.serialize(generator, new JsonbJsonpMapper()); + + generator.close(); + var str = baos.toString(); + + assertEquals("{\"total_fields\":{\"limit\":1},\"depth\":{\"limit\":2},\"nested_fields\":{\"limit\":3}," + + "\"nested_objects\":{\"limit\":4},\"field_name_length\":{\"limit\":5}}", str); + + var parser = provider.createParser(new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8))); + + var deserialized = IndexSettingsMapping._DESERIALIZER.deserialize(parser, new JsonbJsonpMapper()); + + assertEquals(mapping.totalFields().limit(), deserialized.totalFields().limit()); + assertEquals(mapping.depth().limit(), deserialized.depth().limit()); + assertEquals(mapping.nestedFields().limit(), deserialized.nestedFields().limit()); + assertEquals(mapping.nestedObjects().limit(), deserialized.nestedObjects().limit()); + assertEquals(mapping.fieldNameLength().limit(), deserialized.fieldNameLength().limit()); + } catch (JsonParsingException je) { + throw new JsonParsingException(je.getMessage() + " at " + je.getLocation(), je, je.getLocation()); + } + } } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index 08ec63b009..0ca4db2b4b 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -51,8 +51,8 @@ import org.opensearch.client.opensearch.core.IndexResponse; import org.opensearch.client.opensearch.core.InfoResponse; import org.opensearch.client.opensearch.core.MsearchResponse; -import org.opensearch.client.opensearch.core.SearchResponse; import org.opensearch.client.opensearch.core.SearchRequest; +import org.opensearch.client.opensearch.core.SearchResponse; import org.opensearch.client.opensearch.core.bulk.OperationType; import org.opensearch.client.opensearch.core.msearch.RequestItem; import org.opensearch.client.opensearch.core.search.CompletionSuggester; @@ -76,6 +76,7 @@ import java.util.concurrent.TimeUnit; public abstract class AbstractRequestIT extends OpenSearchJavaClientTestCase { + @Test public void testCount() throws Exception { @@ -105,6 +106,70 @@ public void testIndexCreation() throws Exception { assertNotNull(indices.get("my-index")); } + @Test + public void testIndexSettingsMapping() throws Exception { + var createResponse = javaClient().indices() + .create(r -> r.index("test-settings") + .settings(s -> s + .mapping(m -> m + .fieldNameLength(f -> f.limit(300L)) + .totalFields(f -> f.limit(30L)) + .nestedFields(f -> f.limit(10L)) + .depth(f -> f.limit(3L)) + .nestedObjects(f -> f.limit(9L))))); + assertTrue(createResponse.acknowledged()); + assertTrue(createResponse.shardsAcknowledged()); + + var createdSettings = javaClient().indices().getSettings(r -> r.index("test-settings")); + + var createdIndexSettings = createdSettings.get("test-settings"); + assertNotNull(createdIndexSettings); + assertNotNull(createdIndexSettings.settings()); + assertNotNull(createdIndexSettings.settings().index()); + var createdMappingSettings = createdIndexSettings.settings().index().mapping(); + assertNotNull(createdMappingSettings); + assertNotNull(createdMappingSettings.fieldNameLength()); + assertEquals(300L, (Object) createdMappingSettings.fieldNameLength().limit()); + assertNotNull(createdMappingSettings.totalFields()); + assertEquals(30L, (Object) createdMappingSettings.totalFields().limit()); + assertNotNull(createdMappingSettings.nestedFields()); + assertEquals(10L, (Object) createdMappingSettings.nestedFields().limit()); + assertNotNull(createdMappingSettings.depth()); + assertEquals(3L, (Object) createdMappingSettings.depth().limit()); + assertNotNull(createdMappingSettings.nestedObjects()); + assertEquals(9L, (Object) createdMappingSettings.nestedObjects().limit()); + + var putSettingsResponse = javaClient().indices().putSettings(r -> r + .index("test-settings") + .settings(s -> s + .mapping(m -> m + .fieldNameLength(f -> f.limit(400L)) + .totalFields(f -> f.limit(130L)) + .nestedFields(f -> f.limit(110L)) + .depth(f -> f.limit(13L)) + .nestedObjects(f -> f.limit(19L))))); + assertTrue(putSettingsResponse.acknowledged()); + + var updatedSettings = javaClient().indices().getSettings(r -> r.index("test-settings")); + + var updatedIndexSettings = updatedSettings.get("test-settings"); + assertNotNull(updatedIndexSettings); + assertNotNull(updatedIndexSettings.settings()); + assertNotNull(updatedIndexSettings.settings().index()); + var updatedMappingSettings = updatedIndexSettings.settings().index().mapping(); + assertNotNull(updatedMappingSettings); + assertNotNull(updatedMappingSettings.fieldNameLength()); + assertEquals(400L, (Object) updatedMappingSettings.fieldNameLength().limit()); + assertNotNull(updatedMappingSettings.totalFields()); + assertEquals(130L, (Object) updatedMappingSettings.totalFields().limit()); + assertNotNull(updatedMappingSettings.nestedFields()); + assertEquals(110L, (Object) updatedMappingSettings.nestedFields().limit()); + assertNotNull(updatedMappingSettings.depth()); + assertEquals(13L, (Object) updatedMappingSettings.depth().limit()); + assertNotNull(updatedMappingSettings.nestedObjects()); + assertEquals(19L, (Object) updatedMappingSettings.nestedObjects().limit()); + } + @Test public void testDataIngestion() throws Exception { @@ -207,15 +272,15 @@ public void testCatRequest() throws IOException { InfoResponse info = javaClient().info(); String version = info.version().number(); if (version.contains("SNAPSHOT")) { - version = version.split("-")[0]; + version = version.split("-")[0]; } assertEquals(1, nodes.valueBody().size()); if (Version.fromString(version).onOrAfter(Version.fromString("2.0.0"))) { - assertEquals("*", nodes.valueBody().get(0).clusterManager()); + assertEquals("*", nodes.valueBody().get(0).clusterManager()); } else { - assertEquals("*", nodes.valueBody().get(0).master()); + assertEquals("*", nodes.valueBody().get(0).master()); } - + } @Test @@ -265,7 +330,8 @@ public void testRefresh() throws IOException { assertEquals("1", ir.id()); } - @Test public void errorResponse() throws Exception { + @Test + public void errorResponse() throws Exception { BooleanResponse exists = javaClient().exists(_0 -> _0.index("doesnotexist").id("reallynot")); assertFalse(exists.value()); @@ -505,6 +571,7 @@ public void testCompletionSuggester() throws IOException { // } public static class AppData { + private int intValue; private String msg; @@ -526,10 +593,13 @@ public void setMsg(String msg) { } public static class Product { + public double price; public String color; - public Product() {} + public Product() { + } + public Product(double price) { this.price = price; } @@ -549,10 +619,12 @@ public void setPrice(double price) { } public static class Join { + public String name; public String parent; - Join() {} + Join() { + } Join(String name) { this.name = name; @@ -565,10 +637,12 @@ public static class Join { } public static class Question { + public String title; public Join join; - Question() {} + Question() { + } Question(String title) { this.title = title; @@ -577,10 +651,12 @@ public static class Question { } public static class Answer { + public String body; public Join join; - Answer() {} + Answer() { + } Answer(String body) { this.body = body; @@ -591,4 +667,4 @@ public static class Answer { this.join = new Join("answer", parent); } } -} \ No newline at end of file +} From cb11e41efb95e1ecb768d07a554193a1a85b7a9b Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Mon, 13 Mar 2023 13:26:06 -0700 Subject: [PATCH 028/123] Increment client version to 2.3.0 (#396) * Increment client version to 2.3.0 Signed-off-by: Vacha Shah * Update COMPATIBILITY.md Co-authored-by: Andriy Redko Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah Co-authored-by: Daniel (dB.) Doubrovkine Co-authored-by: Andriy Redko --- COMPATIBILITY.md | 1 + gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 78b2b1372b..440dcb4f11 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -11,6 +11,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | 2.0.0 | 1.3.3-2.0.1 | | 2.1.0 | 1.3.3-2.3.0 | | 2.2.0 | 1.3.3-2.5.0 | +| 2.3.0 | 1.3.3-2.6.0 | ## Upgrading diff --git a/gradle.properties b/gradle.properties index d11ea7ab21..921a8c7a41 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -systemProp.version = 2.2.0 +systemProp.version = 2.3.0 From af20708937c8f10c439abd63b5c014d082a80464 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 15 Mar 2023 13:34:56 -0400 Subject: [PATCH 029/123] Bump io.github.classgraph:classgraph from 4.8.156 to 4.8.157 in /java-client (#403) (#408) * Bump io.github.classgraph:classgraph in /java-client Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.156 to 4.8.157. - [Release notes](https://github.com/classgraph/classgraph/releases) - [Commits](https://github.com/classgraph/classgraph/compare/classgraph-4.8.156...classgraph-4.8.157) --- updated-dependencies: - dependency-name: io.github.classgraph:classgraph dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit 5c444d27ce8a0d45da9614ae5d138c6ff017a388) Signed-off-by: dependabot[bot] Signed-off-by: Andriy Redko Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5aaca7a93..f2fa0f4026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update Jackson to 2.14.0 ([#259](https://github.com/opensearch-project/opensearch-java/pull/259)) - Bumps `Jackson` from 2.14.1 to 2.14.2 ([#357](https://github.com/opensearch-project/opensearch-java/pull/357)) - Bumps `classgraph` from 4.8.149 to 4.8.156 ([#395](https://github.com/opensearch-project/opensearch-java/pull/395)) +- Bumps `io.github.classgraph:classgraph` from 4.8.156 to 4.8.157 ([#408](https://github.com/opensearch-project/opensearch-java/pull/408)) ### Changed - Update literature around changelog contributions in CONTRIBUTING.md ([#242](https://github.com/opensearch-project/opensearch-java/pull/242)) diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index c9dedde6c1..7f482efd60 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -186,7 +186,7 @@ dependencies { implementation("org.eclipse", "yasson", "2.0.2") // https://github.com/classgraph/classgraph - testImplementation("io.github.classgraph:classgraph:4.8.156") + testImplementation("io.github.classgraph:classgraph:4.8.157") // Eclipse 1.0 testImplementation("junit", "junit" , "4.13.2") { From 66166f7a65ff5c791307d0fcc5a7dfc5eaf9340a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:14:13 -0400 Subject: [PATCH 030/123] Add buffered lookahead for Jackson (#338) (#410) (cherry picked from commit aaeb1852c00bf221bb448e5e03f2377440a4d152) Signed-off-by: luneo7 Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../client/json/DelegatingJsonParser.java | 137 ++++++++++++++++ .../client/json/JsonLocationImpl.java | 68 ++++++++ .../opensearch/client/json/JsonpUtils.java | 49 ++++-- .../client/json/LookAheadJsonParser.java | 59 +++++++ .../client/json/NamedDeserializer.java | 14 +- .../client/json/UnionDeserializer.java | 43 ++++-- .../json/jackson/JacksonJsonpGenerator.java | 2 +- .../json/jackson/JacksonJsonpMapper.java | 12 +- .../json/jackson/JacksonJsonpParser.java | 102 +++++++++++- .../json/jackson/JacksonJsonpParserTest.java | 146 +++++++++++++++++- .../client/opensearch/model/VariantsTest.java | 8 + 12 files changed, 599 insertions(+), 42 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java create mode 100644 java-client/src/main/java/org/opensearch/client/json/JsonLocationImpl.java create mode 100644 java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java diff --git a/CHANGELOG.md b/CHANGELOG.md index f2fa0f4026..19f9f98161 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321)) - Require two maintainers to approve release ([#383](https://github.com/opensearch-project/opensearch-java/pull/383)) - Add support for mapping limit settings ([#382](https://github.com/opensearch-project/opensearch-java/pull/382)) +- Add buffered lookahead for Jackson ([#338](https://github.com/opensearch-project/opensearch-java/pull/338)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java b/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java new file mode 100644 index 0000000000..b34606e20a --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java @@ -0,0 +1,137 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.json; + +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.json.JsonValue; +import jakarta.json.stream.JsonLocation; +import jakarta.json.stream.JsonParser; + +import java.math.BigDecimal; +import java.util.Map; +import java.util.stream.Stream; + +public abstract class DelegatingJsonParser implements JsonParser { + + private final JsonParser parser; + + public DelegatingJsonParser(JsonParser parser) { + this.parser = parser; + } + + @Override + public boolean hasNext() { + return parser.hasNext(); + } + + @Override + public Event next() { + return parser.next(); + } + + @Override + public String getString() { + return parser.getString(); + } + + @Override + public boolean isIntegralNumber() { + return parser.isIntegralNumber(); + } + + @Override + public int getInt() { + return parser.getInt(); + } + + @Override + public long getLong() { + return parser.getLong(); + } + + @Override + public BigDecimal getBigDecimal() { + return parser.getBigDecimal(); + } + + @Override + public JsonLocation getLocation() { + return parser.getLocation(); + } + + @Override + public JsonObject getObject() { + return parser.getObject(); + } + + @Override + public JsonValue getValue() { + return parser.getValue(); + } + + @Override + public JsonArray getArray() { + return parser.getArray(); + } + + @Override + public Stream getArrayStream() { + return parser.getArrayStream(); + } + + @Override + public Stream> getObjectStream() { + return parser.getObjectStream(); + } + + @Override + public Stream getValueStream() { + return parser.getValueStream(); + } + + @Override + public void skipArray() { + parser.skipArray(); + } + + @Override + public void skipObject() { + parser.skipObject(); + } + + @Override + public void close() { + parser.close(); + } +} \ No newline at end of file diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonLocationImpl.java b/java-client/src/main/java/org/opensearch/client/json/JsonLocationImpl.java new file mode 100644 index 0000000000..7b3502a048 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/json/JsonLocationImpl.java @@ -0,0 +1,68 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.json; + +import jakarta.json.stream.JsonLocation; + +class JsonLocationImpl implements JsonLocation { + + private final long columnNo; + private final long lineNo; + private final long offset; + + JsonLocationImpl(long lineNo, long columnNo, long streamOffset) { + this.lineNo = lineNo; + this.columnNo = columnNo; + this.offset = streamOffset; + } + + @Override + public long getLineNumber() { + return lineNo; + } + + @Override + public long getColumnNumber() { + return columnNo; + } + + @Override + public long getStreamOffset() { + return offset; + } + + @Override + public String toString() { + return "(line no=" + lineNo + ", column no=" + columnNo + ", offset=" + offset + ")"; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java b/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java index 80c9e85baf..c6e1938999 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java @@ -37,6 +37,7 @@ import jakarta.json.JsonString; import jakarta.json.JsonValue; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonLocation; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; @@ -135,20 +136,46 @@ public static void serialize(T value, JsonGenerator generator, @Nullable Jso public static Map.Entry lookAheadFieldValue( String name, String defaultValue, JsonParser parser, JsonpMapper mapper ) { - // FIXME: need a buffering parser wrapper so that we don't roundtrip through a JsonObject and a String - // FIXME: resulting parser should return locations that are offset with the original parser's location - JsonObject object = parser.getObject(); - String result = object.getString(name, null); + JsonLocation location = parser.getLocation(); - if (result == null) { - result = defaultValue; - } + if (parser instanceof LookAheadJsonParser) { + // Fast buffered path + Map.Entry result = ((LookAheadJsonParser) parser).lookAheadFieldValue(name, defaultValue); + if (result.getKey() == null) { + throw new JsonParsingException("Property '" + name + "' not found", location); + } + return result; - if (result == null) { - throw new JsonParsingException("Property '" + name + "' not found", parser.getLocation()); + } else { + // Unbuffered path: parse the object into a JsonObject, then extract the value and parse it again + JsonObject object = parser.getObject(); + String result = object.getString(name, null); + + if (result == null) { + result = defaultValue; + } + + if (result == null) { + throw new JsonParsingException("Property '" + name + "' not found", location); + } + + JsonParser newParser = objectParser(object, mapper); + + // Pin location to the start of the look ahead, as the new parser will return locations in its own buffer + newParser = new DelegatingJsonParser(newParser) { + @Override + public JsonLocation getLocation() { + return new JsonLocationImpl(location.getLineNumber(), location.getColumnNumber(), location.getStreamOffset()) { + @Override + public String toString() { + return "(in object at " + super.toString().substring(1); + } + }; + } + }; + + return new AbstractMap.SimpleImmutableEntry<>(result, newParser); } - - return new AbstractMap.SimpleImmutableEntry<>(result, objectParser(object, mapper)); } /** diff --git a/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java b/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java new file mode 100644 index 0000000000..b4a4231d14 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java @@ -0,0 +1,59 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.json; + +import jakarta.json.stream.JsonParser; + +import java.util.Map; + +public interface LookAheadJsonParser extends JsonParser { + + /** + * Look ahead the value of a text property in the JSON stream. The parser must be on the {@code START_OBJECT} event. + * + * @param name the field name to look up. + * @param defaultValue default value if the field is not found. + * @return a pair containing the field value (or {@code null} if not found), and a parser to be used to read the JSON object. + */ + Map.Entry lookAheadFieldValue(String name, String defaultValue); + + /** + * In union types, find the variant to be used by looking up property names in the JSON stream until we find one that + * uniquely identifies the variant. + * + * @param the type of variant descriptors used by the caller. + * @param variants a map of variant descriptors, keyed by the property name that uniquely identifies the variant. + * @return a pair containing the variant descriptor (or {@code null} if not found), and a parser to be used to read the JSON object. + */ + Map.Entry findVariant(Map variants); +} diff --git a/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java index 212ee8e6ff..309295e313 100644 --- a/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java @@ -71,17 +71,19 @@ public EnumSet acceptedEvents() { @Override public T deserialize(JsonParser parser, JsonpMapper mapper) { - if (mapper.>attribute(name) == null) { - throw new JsonParsingException("Missing deserializer", parser.getLocation()); + JsonpDeserializer deserializer = mapper.attribute(name); + if (deserializer == null) { + throw new JsonParsingException("Missing deserializer for generic type: " + name, parser.getLocation()); } - return mapper.>attribute(name).deserialize(parser, mapper); + return deserializer.deserialize(parser, mapper); } @Override public T deserialize(JsonParser parser, JsonpMapper mapper, JsonParser.Event event) { - if (mapper.>attribute(name) == null) { - throw new JsonParsingException("Missing deserializer", parser.getLocation()); + JsonpDeserializer deserializer = mapper.attribute(name); + if (deserializer == null) { + throw new JsonParsingException("Missing deserializer for generic type: " + name, parser.getLocation()); } - return mapper.>attribute(name).deserialize(parser, mapper, event); + return deserializer.deserialize(parser, mapper, event); } } diff --git a/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java index 3905139a80..0e77419d46 100644 --- a/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java @@ -34,6 +34,7 @@ import org.opensearch.client.util.ObjectBuilder; import jakarta.json.JsonObject; +import jakarta.json.stream.JsonLocation; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; @@ -223,12 +224,12 @@ public JsonpDeserializer build() { private final BiFunction buildFn; private final EnumSet nativeEvents; private final Map> objectMembers; - private final Map> otherMembers; + private final Map> nonObjectMembers; private final EventHandler fallbackObjectMember; public UnionDeserializer( List> objectMembers, - Map> otherMembers, + Map> nonObjectMembers, BiFunction buildFn ) { this.buildFn = buildFn; @@ -245,17 +246,17 @@ public UnionDeserializer( } } - this.otherMembers = otherMembers; + this.nonObjectMembers = nonObjectMembers; this.nativeEvents = EnumSet.noneOf(Event.class); - for (EventHandler member: otherMembers.values()) { + for (EventHandler member: nonObjectMembers.values()) { this.nativeEvents.addAll(member.nativeEvents()); } if (objectMembers.isEmpty()) { fallbackObjectMember = null; } else { - fallbackObjectMember = this.otherMembers.remove(Event.START_OBJECT); + fallbackObjectMember = this.nonObjectMembers.remove(Event.START_OBJECT); this.nativeEvents.add(Event.START_OBJECT); } } @@ -280,17 +281,31 @@ public Union deserialize(JsonParser parser, JsonpMapper mapper) { @Override public Union deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - EventHandler member = otherMembers.get(event); + EventHandler member = nonObjectMembers.get(event); + JsonLocation location = parser.getLocation(); if (member == null && event == Event.START_OBJECT && !objectMembers.isEmpty()) { - // Parse as an object to find matching field names - JsonObject object = parser.getObject(); + if (parser instanceof LookAheadJsonParser) { + Map.Entry, JsonParser> memberAndParser = + ((LookAheadJsonParser) parser).findVariant(objectMembers); - for (String field: object.keySet()) { - member = objectMembers.get(field); - if (member != null) { - break; + member = memberAndParser.getKey(); + // Parse the buffered parser + parser = memberAndParser.getValue(); + + } else { + // Parse as an object to find matching field names + JsonObject object = parser.getObject(); + + for (String field: object.keySet()) { + member = objectMembers.get(field); + if (member != null) { + break; + } } + + // Traverse the object we have inspected + parser = JsonpUtils.objectParser(object, mapper); } if (member == null) { @@ -298,14 +313,12 @@ public Union deserialize(JsonParser parser, JsonpMapper mapper, Event event) { } if (member != null) { - // Traverse the object we have inspected - parser = JsonpUtils.objectParser(object, mapper); event = parser.next(); } } if (member == null) { - throw new JsonParsingException("Cannot determine what union member to deserialize", parser.getLocation()); + throw new JsonParsingException("Cannot determine what union member to deserialize", location); } return member.deserialize(parser, mapper, event, buildFn); diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java index 38b5f48bc5..5b6e5efdff 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java @@ -195,7 +195,7 @@ public JsonGenerator write(String name, double value) { public JsonGenerator write(String name, boolean value) { try { generator.writeFieldName(name); - generator.writeBooleanField(name, value); + generator.writeBoolean(value); } catch (IOException e) { throw JacksonUtils.convertException(e); } diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java index b6b44e66f3..3a92266ca0 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java @@ -54,18 +54,20 @@ public class JacksonJsonpMapper extends JsonpMapperBase { private final ObjectMapper objectMapper; public JacksonJsonpMapper(ObjectMapper objectMapper) { - this(objectMapper, new JsonFactory()); + // Creating the json factory from the mapper ensures it will be returned by JsonParser.getCodec() + this(objectMapper, objectMapper.getFactory()); } public JacksonJsonpMapper(ObjectMapper objectMapper, JsonFactory jsonFactory) { this.provider = new JacksonJsonProvider(jsonFactory); - this.objectMapper = objectMapper - .configure(SerializationFeature.INDENT_OUTPUT, false) - .setSerializationInclusion(JsonInclude.Include.NON_NULL); + this.objectMapper = objectMapper; } public JacksonJsonpMapper() { - this(new ObjectMapper()); + this(new ObjectMapper() + .configure(SerializationFeature.INDENT_OUTPUT, false) + .setSerializationInclusion(JsonInclude.Include.NON_NULL) + ); } /** diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java index de95dbce0e..eb75a2bb63 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java @@ -33,15 +33,20 @@ package org.opensearch.client.json.jackson; import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.util.JsonParserSequence; +import com.fasterxml.jackson.databind.util.TokenBuffer; import jakarta.json.JsonArray; import jakarta.json.JsonObject; import jakarta.json.JsonValue; import jakarta.json.stream.JsonLocation; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; +import org.opensearch.client.json.LookAheadJsonParser; +import org.opensearch.client.json.UnexpectedJsonEventException; import java.io.IOException; import java.math.BigDecimal; +import java.util.AbstractMap; import java.util.EnumMap; import java.util.Map; import java.util.NoSuchElementException; @@ -55,7 +60,7 @@ * getter method (e.g. {@link #getInt()} or {@link #getString()} should be called until the next call to {@link #next()}. * Such calls will throw an {@code IllegalStateException}. */ -public class JacksonJsonpParser implements JsonParser { +public class JacksonJsonpParser implements LookAheadJsonParser { private final com.fasterxml.jackson.core.JsonParser parser; @@ -319,7 +324,100 @@ public Stream getArrayStream() { */ @Override public Stream getValueStream() { - return JsonParser.super.getValueStream(); + return LookAheadJsonParser.super.getValueStream(); + } + + //----- Look ahead methods + + public Map.Entry lookAheadFieldValue(String name, String defaultValue) { + + TokenBuffer tb = new TokenBuffer(parser, null); + + try { + // The resulting parser must contain the full object, including START_EVENT + tb.copyCurrentEvent(parser); + while (parser.nextToken() != JsonToken.END_OBJECT) { + + expectEvent(JsonToken.FIELD_NAME); + // Do not copy current event here, each branch will take care of it + + String fieldName = parser.getCurrentName(); + if (fieldName.equals(name)) { + // Found + tb.copyCurrentEvent(parser); + expectNextEvent(JsonToken.VALUE_STRING); + tb.copyCurrentEvent(parser); + + return new AbstractMap.SimpleImmutableEntry<>( + parser.getText(), + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + ); + } else { + tb.copyCurrentStructure(parser); + } + } + // Copy ending END_OBJECT + tb.copyCurrentEvent(parser); + } catch (IOException e) { + throw JacksonUtils.convertException(e); + } + + // Field not found + return new AbstractMap.SimpleImmutableEntry<>( + defaultValue, + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + ); + } + + @Override + public Map.Entry findVariant(Map variants) { + // We're on a START_OBJECT event + TokenBuffer tb = new TokenBuffer(parser, null); + + try { + // The resulting parser must contain the full object, including START_EVENT + tb.copyCurrentEvent(parser); + while (parser.nextToken() != JsonToken.END_OBJECT) { + + expectEvent(JsonToken.FIELD_NAME); + String fieldName = parser.getCurrentName(); + + Variant variant = variants.get(fieldName); + if (variant != null) { + tb.copyCurrentEvent(parser); + return new AbstractMap.SimpleImmutableEntry<>( + variant, + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + ); + } else { + tb.copyCurrentStructure(parser); + } + } + // Copy ending END_OBJECT + tb.copyCurrentEvent(parser); + } catch (IOException e) { + throw JacksonUtils.convertException(e); + } + + // No variant found: return the buffered parser and let the caller decide what to do. + return new AbstractMap.SimpleImmutableEntry<>( + null, + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + ); + } + + private void expectNextEvent(JsonToken expected) throws IOException { + JsonToken event = parser.nextToken(); + if (event != expected) { + throw new UnexpectedJsonEventException(this, tokenToEvent.get(event), tokenToEvent.get(expected)); + } + } + + private void expectEvent(JsonToken expected) { + JsonToken event = parser.currentToken(); + if (event != expected) { + throw new UnexpectedJsonEventException(this, tokenToEvent.get(event), tokenToEvent.get(expected)); + } } } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/json/jackson/JacksonJsonpParserTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/json/jackson/JacksonJsonpParserTest.java index 33c736b168..21d7ff3fa2 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/json/jackson/JacksonJsonpParserTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/json/jackson/JacksonJsonpParserTest.java @@ -32,15 +32,25 @@ package org.opensearch.client.opensearch.json.jackson; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpMapperBase; import org.opensearch.client.json.jackson.JacksonJsonProvider; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.core.MsearchResponse; +import org.opensearch.client.opensearch.model.ModelTestCase; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; -import org.junit.Assert; import org.junit.Test; +import javax.annotation.Nullable; import java.io.StringReader; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; -public class JacksonJsonpParserTest extends Assert { +public class JacksonJsonpParserTest extends ModelTestCase { private static final String json = "{ 'foo': 'fooValue', 'bar': { 'baz': 1}, 'quux': [true] }".replace('\'', '"'); @@ -108,4 +118,136 @@ public void testForbidValueGettersAfterHasNext() { // expected } } + + @Test + public void testMultiSearchResponse() { + String json = + "{\n" + + " \"took\" : 1,\n" + + " \"responses\" : [\n" + + " {\n" + + " \"error\" : {\n" + + " \"root_cause\" : [\n" + + " {\n" + + " \"type\" : \"index_not_found_exception\",\n" + + " \"reason\" : \"no such index [foo_bar]\",\n" + + " \"resource.type\" : \"index_or_alias\",\n" + + " \"resource.id\" : \"foo_bar\",\n" + + " \"index_uuid\" : \"_na_\",\n" + + " \"index\" : \"foo_bar\"\n" + + " }\n" + + " ],\n" + + " \"type\" : \"index_not_found_exception\",\n" + + " \"reason\" : \"no such index [foo_bar]\",\n" + + " \"resource.type\" : \"index_or_alias\",\n" + + " \"resource.id\" : \"foo_bar\",\n" + + " \"index_uuid\" : \"_na_\",\n" + + " \"index\" : \"foo_bar\"\n" + + " },\n" + + " \"status\" : 404\n" + + " },\n" + + " {\n" + + " \"took\" : 1,\n" + + " \"timed_out\" : false,\n" + + " \"_shards\" : {\n" + + " \"total\" : 1,\n" + + " \"successful\" : 1,\n" + + " \"skipped\" : 0,\n" + + " \"failed\" : 0\n" + + " },\n" + + " \"hits\" : {\n" + + " \"total\" : {\n" + + " \"value\" : 5,\n" + + " \"relation\" : \"eq\"\n" + + " },\n" + + " \"max_score\" : 1.0,\n" + + " \"hits\" : [\n" + + " {\n" + + " \"_index\" : \"foo\",\n" + + " \"_id\" : \"Wr0ApoEBa_iiaABtVM57\",\n" + + " \"_score\" : 1.0,\n" + + " \"_source\" : {\n" + + " \"x\" : 1,\n" + + " \"y\" : true\n" + + " }\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"status\" : 200\n" + + " }\n" + + " ]\n" + + "}\n"; + + JsonpMapper mapper = new AttributedJacksonJsonpMapper() + .withAttribute("org.opensearch.client:Deserializer:_global.msearch.TDocument", JsonpDeserializer.of(Foo.class)); + + @SuppressWarnings("unchecked") + MsearchResponse response = fromJson(json, MsearchResponse.class, mapper); + + assertEquals(2, response.responses().size()); + assertEquals(404, response.responses().get(0).failure().status()); + assertEquals(200, response.responses().get(1).result().status()); + } + + public static class AttributedJacksonJsonpMapper extends JacksonJsonpMapper { + private Map attributes; + + public AttributedJacksonJsonpMapper() { + super(); + } + + public AttributedJacksonJsonpMapper(ObjectMapper objectMapper) { + super(objectMapper); + } + + @Nullable + @Override + @SuppressWarnings("unchecked") + public T attribute(String name) { + return attributes == null ? null : (T)attributes.get(name); + } + + /** + * Updates attributes to a copy of the current ones with an additional key/value pair. + * Mutates the current mapper, intended to be used in implementations of {@link #withAttribute(String, Object)} + */ + protected JsonpMapperBase addAttribute(String name, Object value) { + if (attributes == null) { + this.attributes = Collections.singletonMap(name, value); + } else { + Map newAttrs = new HashMap<>(attributes.size() + 1); + newAttrs.putAll(attributes); + newAttrs.put(name, value); + this.attributes = newAttrs; + } + return this; + } + + @Override + public JsonpMapper withAttribute(String name, T value) { + return new AttributedJacksonJsonpMapper(objectMapper()).addAttribute(name, value); + } + } + + public static class Foo { + private int x; + private boolean y; + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public boolean isY() { + return y; + } + + public void setY(boolean y) { + this.y = y; + } + } + } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java index 86732b5524..2124f3e729 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java @@ -190,6 +190,14 @@ public void testNestedTaggedUnionWithDefaultTag() { assertEquals(256, mappings.properties().get("id").text().fields().get("keyword").keyword().ignoreAbove().longValue()); } + @Test + public void testEmptyProperty() { + // Edge case where we have a property with no fields and no type + String json = "{}"; + Property property = fromJson(json, Property.class); + assertEquals(Property.Kind.Object, property._kind()); + } + @Test public void testNestedVariantsWithContainerProperties() { From 402c6b9555ee6bba19e9e65106a788a8e412b125 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:21:34 -0400 Subject: [PATCH 031/123] Add option to set headers and sort options in cat requests (#412) (#413) * Adding x-amz-content-sha256 header for signed requests (#339) * Adding X-Amz-Content-Sha256 header for signed requests * Adding CHANGELOG entry * Adding documentation comment * Adding tests * Addressing comments * Addressing comments * Removing refresh policy for integ tests for Sigv4 * Updating the developer guide * Fix issue with completion suggester being parsed as term suggester. (#347) * Fix issue with completion suggester being parsed as term suggester. This commit fixes the issue where a completion suggester search request was being parsed as a term suggester and failing due to "Missing required property 'TermSuggestOption.score'" This solution was originally proposed by Github user @apatrida * Remove commented code * Fix format of changelog item * Update USER_GUIDE to use exact AWS brand names (#352) Minor update to use exact brand names. "OpenSearch" is rather overloaded to I find it less confusing to be precise in the naming. * Bumps Jackson from 2.14.1 to 2.14.2 (#357) * Bulk UpdateOperation misses upsert options (#353) * Bulk UpdateOperation misses upsert options * Fix formatting --------- * Upgrading compatibility to opensearch 2.5 (#367) * Upgrading compatibility to opensearch 2.5 * latest 2.4 version * keep existing compatibility matrix rows, this pr adds a new row for versions of opensearch after 2.3.0 --------- * add option to set columns into cat indices request * add changelog * changes in CatRequestBase, IndicesRequest, NodesRequest, RecoveryRequest and add tests * Feature/range aggregation fix 369 (#370) * test: create integration tests for date_range and range aggregation (#369) * fix: add a missing key propery to the RangeBucket (#369) * docs: add CHANGELOG entry (#369) --------- * Fixing integration tests (#375) * Fixing integration tests * Updating the test with a non-exact check --------- * Adding bulk request example in user guide (#373) * Fixing issue when tracktotalhits is disabled (#372) * Fixing issue when tracktotalhits is disabled * Update Changelog --------- * changes changelog * Bump io.github.classgraph:classgraph from 4.8.154 to 4.8.156 (#390) * Bump io.github.classgraph:classgraph from 4.8.154 to 4.8.156 Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.154 to 4.8.156. - [Release notes](https://github.com/classgraph/classgraph/releases) - [Commits](https://github.com/classgraph/classgraph/compare/classgraph-4.8.154...classgraph-4.8.156) --- updated-dependencies: - dependency-name: io.github.classgraph:classgraph dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- * Add 2PR approval to release workflow (#383) * Adding an example to use raw JSON class instead of target classes (#385) * Update Gradle to 8.0.2 (#392) * Add "mappings" field to IndexSettings object (#382) * Created untriaged issue workflow. (#364) * Bump io.github.classgraph:classgraph from 4.8.156 to 4.8.157 in /java-client (#403) * Bump io.github.classgraph:classgraph in /java-client Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.156 to 4.8.157. - [Release notes](https://github.com/classgraph/classgraph/releases) - [Commits](https://github.com/classgraph/classgraph/compare/classgraph-4.8.156...classgraph-4.8.157) --- updated-dependencies: - dependency-name: io.github.classgraph:classgraph dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- * Add buffered lookahead for Jackson (#338) * Mask env values for snapshots (#411) * option to set headers and sort into cat requests * fix test * fix changelog * add cat examples into USER_GUID --------- (cherry picked from commit 938170a69a21bb711ff861a0cf1178a8db6a4b90) Signed-off-by: Vacha Shah Signed-off-by: MarinaRazumovsky Signed-off-by: Dan Hart Signed-off-by: Andrew Ross Signed-off-by: Andriy Redko Signed-off-by: amitai stern <123amitai@gmail.com> Signed-off-by: Dominik Szczepanczyk Signed-off-by: dependabot[bot] Signed-off-by: Sayali Gaikawad Signed-off-by: Ilya Lukyanovich Signed-off-by: dblock Signed-off-by: luneo7 Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Vacha Shah Co-authored-by: Danny Hart Co-authored-by: Andrew Ross Co-authored-by: Andriy Redko Co-authored-by: amitai stern <123amitai@gmail.com> Co-authored-by: szczepanczykd <48957041+szczepanczykd@users.noreply.github.com> Co-authored-by: Daniel (dB.) Doubrovkine Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Co-authored-by: Ilya Lukyanovich Co-authored-by: Lucas Rogerio Caetano Ferreira --- CHANGELOG.md | 1 + USER_GUIDE.md | 29 + .../client/opensearch/cat/AliasesRequest.java | 15 +- .../opensearch/cat/AllocationRequest.java | 15 +- .../client/opensearch/cat/CatRequestBase.java | 94 ++- .../opensearch/cat/ClusterManagerRequest.java | 15 +- .../client/opensearch/cat/CountRequest.java | 20 +- .../opensearch/cat/FielddataRequest.java | 15 +- .../client/opensearch/cat/HealthRequest.java | 15 +- .../client/opensearch/cat/HelpRequest.java | 49 +- .../client/opensearch/cat/IndicesRequest.java | 584 +++++++++--------- .../opensearch/cat/NodeattrsRequest.java | 49 +- .../client/opensearch/cat/NodesRequest.java | 241 ++++---- .../opensearch/cat/PendingTasksRequest.java | 8 +- .../client/opensearch/cat/PluginsRequest.java | 8 +- .../opensearch/cat/RecoveryRequest.java | 430 ++++++------- .../opensearch/cat/RepositoriesRequest.java | 8 +- .../opensearch/cat/SegmentsRequest.java | 15 +- .../client/opensearch/cat/ShardsRequest.java | 15 +- .../opensearch/cat/SnapshotsRequest.java | 15 +- .../client/opensearch/cat/TasksRequest.java | 15 +- .../opensearch/cat/TemplatesRequest.java | 20 +- .../opensearch/cat/ThreadPoolRequest.java | 15 +- .../integTest/AbstractCatClientIT.java | 219 +++++++ .../OpenSearchJavaClientTestCase.java | 2 +- .../integTest/httpclient5/CatIT.java | 16 + .../integTest/restclient/CatIT.java | 26 + 27 files changed, 1153 insertions(+), 801 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f9f98161..192ddf5999 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Require two maintainers to approve release ([#383](https://github.com/opensearch-project/opensearch-java/pull/383)) - Add support for mapping limit settings ([#382](https://github.com/opensearch-project/opensearch-java/pull/382)) - Add buffered lookahead for Jackson ([#338](https://github.com/opensearch-project/opensearch-java/pull/338)) +- Add support for headers and sort parameters in cat requests ([#388](https://github.com/opensearch-project/opensearch-java/issues/388)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 5c8a4be197..21b4b11c58 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -15,6 +15,10 @@ - [Aggregations](#aggregations) - [Delete the document](#delete-the-document) - [Delete the index](#delete-the-index) + - [Cat API](#cat-api) + - [Cat Indices](#cat-indices) + - [Cat Aliases](#cat-aliases) + - [Cat Nodes](#cat-nodes) - [Using different transport options](#using-different-transport-options) - [Amazon Managed OpenSearch](#amazon-managed-opensearch) @@ -199,6 +203,31 @@ DeleteIndexRequest deleteIndexRequest = new DeleteRequest.Builder().index(index) DeleteIndexResponse deleteIndexResponse = client.indices().delete(deleteIndexRequest); ``` +## Cat API + +### Cat Indices +The following sample code cat indices with required headers and sorted by creation date + +```java +IndicesRequest indicesRequest = new IndicesRequest.Builder() + .headers("index,health,status,pri,rep,doc.count,creation.date,creation.date.string").sort("creation.date").build(); +IndicesResponse indicesResponse = javaClient().cat().indices(indicesRequest); +``` + + +### Cat aliases +The following sample code cat aliases with name "test-alias" and sorted by index +```java +AliasesRequest aliasesRequest = new AliasesRequest.Builder().name("test-alias").sort("index").build(); +AliasesResponse aliasesResponse = javaClient().cat().aliases(aliasesRequest); +``` + +### Cat nodes +The following sample code cat nodes sorted by cpu +```java +NodesResponse nodesResponse = javaClient().cat().nodes(r -> r.sort("cpu")); +``` + # Using different transport options ## Amazon Managed OpenSearch diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java index bcd93f57a7..07bee1a2db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java @@ -42,14 +42,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.aliases.Request @@ -67,7 +66,7 @@ public class AliasesRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private AliasesRequest(Builder builder) { - + super(builder); this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.name = ApiTypeHelper.unmodifiable(builder.name); @@ -102,7 +101,7 @@ public final List name() { * Builder for {@link AliasesRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private List expandWildcards; @@ -170,6 +169,11 @@ public AliasesRequest build() { return new AliasesRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -214,8 +218,7 @@ public AliasesRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream() diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java index 16681a809e..31c94269e7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java @@ -42,14 +42,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.allocation.Request @@ -68,7 +67,7 @@ public class AllocationRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private AllocationRequest(Builder builder) { - + super(builder); this.bytes = builder.bytes; this.nodeId = ApiTypeHelper.unmodifiable(builder.nodeId); @@ -103,7 +102,7 @@ public final List nodeId() { * Builder for {@link AllocationRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private Bytes bytes; @@ -155,6 +154,11 @@ public AllocationRequest build() { return new AllocationRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -200,8 +204,7 @@ public AllocationRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java index 1ff2f96ce0..1cbb1d9fab 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java @@ -37,21 +37,99 @@ package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -// typedef: cat._types.CatRequestBase +import javax.annotation.Nullable; +import java.util.HashMap; +import java.util.Map; +// typedef: cat._types.CatRequestBase public abstract class CatRequestBase extends RequestBase { - public CatRequestBase() { - } - protected abstract static class AbstractBuilder> - extends - ObjectBuilderBase { - protected abstract BuilderT self(); + @Nullable + private final String headers; + + @Nullable + private final String sort; + + public CatRequestBase() { + this.headers = null; + this.sort = null; + } + + public CatRequestBase(CatRequestBaseBuilder builder) { + this.headers = builder.headers; + this.sort = builder.sort; + } + + protected final Map queryParameters() { + Map params = new HashMap<>(); + if (headers != null && !headers.isBlank()) { + params.put("h", headers); + } + if(sort != null && !sort.isBlank()) { + params.put("s", sort); + } + params.put("format", "json"); + return params; + } + + + /** + * A comma-separated list of headers to limit the returned information + *

+ * API name: {@code h} + */ + public final String headers() { + return this.headers; + } + + /** + * A comma-separated list of headers to sort the returned information + *

+ * API name: {@code s} + *

+ */ + public final String sort() { + return this.sort; + } + + + protected abstract static class CatRequestBaseBuilder extends ObjectBuilderBase implements ObjectBuilder { + + @Nullable + protected String headers; + + @Nullable + protected String sort; + + protected abstract BuilderT self(); + + /** + * A comma-separated list of specific headers to limits the output + *

+ * API name: {@code h} + *

+ */ + public final BuilderT headers(@Nullable String headers) { + this.headers = headers; + return self(); + } + + /** + * A comma-separated list of headers to sort the returned information + *

+ * API name: {@code s} + *

+ */ + public final BuilderT sort(@Nullable String sort) { + this.sort = sort; + return self(); + } - } + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java index 513c6d7cfe..72e6803405 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java @@ -41,7 +41,6 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import java.util.HashMap; -import java.util.Map; // typedef: cat.cluster_manager.Request @@ -79,12 +78,7 @@ public ClusterManagerRequest() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, ClusterManagerResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, ClusterManagerResponse._DESERIALIZER); /** * Endpoint "{@code cat.cluster_manager}". @@ -104,10 +98,5 @@ public ClusterManagerRequest() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, ClusterManagerResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, ClusterManagerResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java index 0925464f5b..68f48d2f41 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java @@ -41,14 +41,12 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.count.Request @@ -64,7 +62,7 @@ public class CountRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private CountRequest(Builder builder) { - + super(builder); this.index = ApiTypeHelper.unmodifiable(builder.index); } @@ -88,7 +86,7 @@ public final List index() { * Builder for {@link CountRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private List index; @@ -127,6 +125,11 @@ public CountRequest build() { return new CountRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -170,10 +173,5 @@ public CountRequest build() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, CountResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, CountResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java index b47e4d2acf..3d23f6d1e2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java @@ -42,14 +42,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.fielddata.Request @@ -68,7 +67,7 @@ public class FielddataRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private FielddataRequest(Builder builder) { - + super(builder); this.bytes = builder.bytes; this.fields = ApiTypeHelper.unmodifiable(builder.fields); @@ -103,7 +102,7 @@ public final List fields() { * Builder for {@link FielddataRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private Bytes bytes; @@ -155,6 +154,11 @@ public FielddataRequest build() { return new FielddataRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -200,8 +204,7 @@ public FielddataRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java index 114cddfcf6..a5cd535500 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java @@ -40,12 +40,11 @@ import org.opensearch.client.transport.Endpoint; import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.Map; import java.util.function.Function; -import javax.annotation.Nullable; // typedef: cat.health.Request @@ -61,7 +60,7 @@ public class HealthRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private HealthRequest(Builder builder) { - + super(builder); this.ts = builder.ts; } @@ -86,7 +85,7 @@ public final Boolean ts() { * Builder for {@link HealthRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private Boolean ts; @@ -111,6 +110,11 @@ public HealthRequest build() { return new HealthRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -134,8 +138,7 @@ public HealthRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.ts != null) { params.put("ts", String.valueOf(request.ts)); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java index c6db7f28c9..df62fd4d8a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java @@ -41,48 +41,41 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import java.util.HashMap; -import java.util.Map; // typedef: cat.help.Request /** * Returns help for the Cat APIs. - * */ public class HelpRequest extends CatRequestBase { - public HelpRequest() { - } - - /** - * Singleton instance for {@link HelpRequest}. - */ - public static final HelpRequest _INSTANCE = new HelpRequest(); + public HelpRequest() { + } - // --------------------------------------------------------------------------------------------- + /** + * Singleton instance for {@link HelpRequest}. + */ + public static final HelpRequest _INSTANCE = new HelpRequest(); - /** - * Endpoint "{@code cat.help}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // --------------------------------------------------------------------------------------------- - // Request method - request -> { - return "GET"; + /** + * Endpoint "{@code cat.help}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - }, + // Request method + request -> { + return "GET"; - // Request path - request -> { - return "/_cat"; + }, - }, + // Request path + request -> { + return "/_cat"; - // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; + }, - }, SimpleEndpoint.emptyMap(), false, HelpResponse._DESERIALIZER); + // Request parameters + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, HelpResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java index f63fdc2670..a33e0940ca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java @@ -44,310 +44,312 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.indices.Request /** * Returns information about indices: number of primaries and replicas, document * counts, disk size, ... - * */ public class IndicesRequest extends CatRequestBase { - @Nullable - private final Bytes bytes; - - private final List expandWildcards; - - @Nullable - private final HealthStatus health; - - @Nullable - private final Boolean includeUnloadedSegments; - - private final List index; - - @Nullable - private final Boolean pri; - - // --------------------------------------------------------------------------------------------- - - private IndicesRequest(Builder builder) { - - this.bytes = builder.bytes; - this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); - this.health = builder.health; - this.includeUnloadedSegments = builder.includeUnloadedSegments; - this.index = ApiTypeHelper.unmodifiable(builder.index); - this.pri = builder.pri; - - } - - public static IndicesRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * The unit in which to display byte values - *

- * API name: {@code bytes} - */ - @Nullable - public final Bytes bytes() { - return this.bytes; - } - - /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. - *

- * API name: {@code expand_wildcards} - */ - public final List expandWildcards() { - return this.expandWildcards; - } - - /** - * A health status ("green", "yellow", or "red" to - * filter only indices matching the specified health status - *

- * API name: {@code health} - */ - @Nullable - public final HealthStatus health() { - return this.health; - } - - /** - * If set to true segment stats will include stats for segments that are not - * currently loaded into memory - *

- * API name: {@code include_unloaded_segments} - */ - @Nullable - public final Boolean includeUnloadedSegments() { - return this.includeUnloadedSegments; - } - - /** - * A comma-separated list of index names to limit the returned information - *

- * API name: {@code index} - */ - public final List index() { - return this.index; - } - - /** - * Set to true to return stats only for primary shards - *

- * API name: {@code pri} - */ - @Nullable - public final Boolean pri() { - return this.pri; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link IndicesRequest}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private Bytes bytes; - - @Nullable - private List expandWildcards; - - @Nullable - private HealthStatus health; - - @Nullable - private Boolean includeUnloadedSegments; - - @Nullable - private List index; - - @Nullable - private Boolean pri; - - /** - * The unit in which to display byte values - *

- * API name: {@code bytes} - */ - public final Builder bytes(@Nullable Bytes value) { - this.bytes = value; - return this; - } - - /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. - *

- * API name: {@code expand_wildcards} - *

- * Adds all elements of list to expandWildcards. - */ - public final Builder expandWildcards(List list) { - this.expandWildcards = _listAddAll(this.expandWildcards, list); - return this; - } - - /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. - *

- * API name: {@code expand_wildcards} - *

- * Adds one or more values to expandWildcards. - */ - public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) { - this.expandWildcards = _listAdd(this.expandWildcards, value, values); - return this; - } - - /** - * A health status ("green", "yellow", or "red" to - * filter only indices matching the specified health status - *

- * API name: {@code health} - */ - public final Builder health(@Nullable HealthStatus value) { - this.health = value; - return this; - } - - /** - * If set to true segment stats will include stats for segments that are not - * currently loaded into memory - *

- * API name: {@code include_unloaded_segments} - */ - public final Builder includeUnloadedSegments(@Nullable Boolean value) { - this.includeUnloadedSegments = value; - return this; - } - - /** - * A comma-separated list of index names to limit the returned information - *

- * API name: {@code index} - *

- * Adds all elements of list to index. - */ - public final Builder index(List list) { - this.index = _listAddAll(this.index, list); - return this; - } - - /** - * A comma-separated list of index names to limit the returned information - *

- * API name: {@code index} - *

- * Adds one or more values to index. - */ - public final Builder index(String value, String... values) { - this.index = _listAdd(this.index, value, values); - return this; - } - - /** - * Set to true to return stats only for primary shards - *

- * API name: {@code pri} - */ - public final Builder pri(@Nullable Boolean value) { - this.pri = value; - return this; - } - - /** - * Builds a {@link IndicesRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public IndicesRequest build() { - _checkSingleUse(); - - return new IndicesRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code cat.indices}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - final int _index = 1 << 0; - - int propsSet = 0; - - if (ApiTypeHelper.isDefined(request.index())) - propsSet |= _index; - - if (propsSet == 0) { - StringBuilder buf = new StringBuilder(); - buf.append("/_cat"); - buf.append("/indices"); - return buf.toString(); - } - if (propsSet == (_index)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_cat"); - buf.append("/indices"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - if (ApiTypeHelper.isDefined(request.expandWildcards)) { - params.put("expand_wildcards", - request.expandWildcards.stream() - .map(v -> v.jsonValue()).collect(Collectors.joining(","))); - } - if (request.bytes != null) { - params.put("bytes", request.bytes.jsonValue()); - } - if (request.pri != null) { - params.put("pri", String.valueOf(request.pri)); - } - if (request.health != null) { - params.put("health", request.health.jsonValue()); - } - if (request.includeUnloadedSegments != null) { - params.put("include_unloaded_segments", String.valueOf(request.includeUnloadedSegments)); - } - return params; - - }, SimpleEndpoint.emptyMap(), false, IndicesResponse._DESERIALIZER); + @Nullable + private final Bytes bytes; + + private final List expandWildcards; + + @Nullable + private final HealthStatus health; + + @Nullable + private final Boolean includeUnloadedSegments; + + private final List index; + + @Nullable + private final Boolean pri; + + + // --------------------------------------------------------------------------------------------- + + private IndicesRequest(Builder builder) { + super(builder); + this.bytes = builder.bytes; + this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); + this.health = builder.health; + this.includeUnloadedSegments = builder.includeUnloadedSegments; + this.index = ApiTypeHelper.unmodifiable(builder.index); + this.pri = builder.pri; + } + + public static IndicesRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The unit in which to display byte values + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * Whether to expand wildcard expression to concrete indices that are open, + * closed or both. + *

+ * API name: {@code expand_wildcards} + */ + public final List expandWildcards() { + return this.expandWildcards; + } + + /** + * A health status ("green", "yellow", or "red" to + * filter only indices matching the specified health status + *

+ * API name: {@code health} + */ + @Nullable + public final HealthStatus health() { + return this.health; + } + + /** + * If set to true segment stats will include stats for segments that are not + * currently loaded into memory + *

+ * API name: {@code include_unloaded_segments} + */ + @Nullable + public final Boolean includeUnloadedSegments() { + return this.includeUnloadedSegments; + } + + /** + * A comma-separated list of index names to limit the returned information + *

+ * API name: {@code index} + */ + public final List index() { + return this.index; + } + + /** + * Set to true to return stats only for primary shards + *

+ * API name: {@code pri} + */ + @Nullable + public final Boolean pri() { + return this.pri; + } + + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IndicesRequest}. + */ + + public static class Builder extends CatRequestBaseBuilder { + @Nullable + private Bytes bytes; + + @Nullable + private List expandWildcards; + + @Nullable + private HealthStatus health; + + @Nullable + private Boolean includeUnloadedSegments; + + @Nullable + private List index; + + @Nullable + private Boolean pri; + + /** + * The unit in which to display byte values + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + + /** + * Whether to expand wildcard expression to concrete indices that are open, + * closed or both. + *

+ * API name: {@code expand_wildcards} + *

+ * Adds all elements of list to expandWildcards. + */ + public final Builder expandWildcards(List list) { + this.expandWildcards = _listAddAll(this.expandWildcards, list); + return this; + } + + /** + * Whether to expand wildcard expression to concrete indices that are open, + * closed or both. + *

+ * API name: {@code expand_wildcards} + *

+ * Adds one or more values to expandWildcards. + */ + public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) { + this.expandWildcards = _listAdd(this.expandWildcards, value, values); + return this; + } + + /** + * A health status ("green", "yellow", or "red" to + * filter only indices matching the specified health status + *

+ * API name: {@code health} + */ + public final Builder health(@Nullable HealthStatus value) { + this.health = value; + return this; + } + + /** + * If set to true segment stats will include stats for segments that are not + * currently loaded into memory + *

+ * API name: {@code include_unloaded_segments} + */ + public final Builder includeUnloadedSegments(@Nullable Boolean value) { + this.includeUnloadedSegments = value; + return this; + } + + /** + * A comma-separated list of index names to limit the returned information + *

+ * API name: {@code index} + *

+ * Adds all elements of list to index. + */ + public final Builder index(List list) { + this.index = _listAddAll(this.index, list); + return this; + } + + /** + * A comma-separated list of index names to limit the returned information + *

+ * API name: {@code index} + *

+ * Adds one or more values to index. + */ + public final Builder index(String value, String... values) { + this.index = _listAdd(this.index, value, values); + return this; + } + + /** + * Set to true to return stats only for primary shards + *

+ * API name: {@code pri} + */ + public final Builder pri(@Nullable Boolean value) { + this.pri = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IndicesRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public IndicesRequest build() { + _checkSingleUse(); + + return new IndicesRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code cat.indices}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + StringBuilder buf = new StringBuilder(); + buf.append("/_cat"); + buf.append("/indices"); + return buf.toString(); + } + if (propsSet == (_index)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_cat"); + buf.append("/indices"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Request parameters + request -> { + Map params = new HashMap<>(request.queryParameters()); + if (ApiTypeHelper.isDefined(request.expandWildcards)) { + params.put("expand_wildcards", + request.expandWildcards.stream() + .map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } + if (request.pri != null) { + params.put("pri", String.valueOf(request.pri)); + } + if (request.health != null) { + params.put("health", request.health.jsonValue()); + } + if (request.includeUnloadedSegments != null) { + params.put("include_unloaded_segments", String.valueOf(request.includeUnloadedSegments)); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, IndicesResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java index 9f43e1be1f..1ec4511c6e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java @@ -41,48 +41,41 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import java.util.HashMap; -import java.util.Map; // typedef: cat.nodeattrs.Request /** * Returns information about custom node attributes. - * */ public class NodeattrsRequest extends CatRequestBase { - public NodeattrsRequest() { - } + public NodeattrsRequest() { + } - /** - * Singleton instance for {@link NodeattrsRequest}. - */ - public static final NodeattrsRequest _INSTANCE = new NodeattrsRequest(); + /** + * Singleton instance for {@link NodeattrsRequest}. + */ + public static final NodeattrsRequest _INSTANCE = new NodeattrsRequest(); - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - /** - * Endpoint "{@code cat.nodeattrs}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + /** + * Endpoint "{@code cat.nodeattrs}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - // Request method - request -> { - return "GET"; + // Request method + request -> { + return "GET"; - }, + }, - // Request path - request -> { - return "/_cat/nodeattrs"; + // Request path + request -> { + return "/_cat/nodeattrs"; - }, + }, - // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, NodeattrsResponse._DESERIALIZER); + // Request parameters + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, NodeattrsResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java index 6d925aa82e..a0bf3c5d10 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java @@ -41,136 +41,137 @@ import org.opensearch.client.transport.Endpoint; import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.Map; import java.util.function.Function; -import javax.annotation.Nullable; // typedef: cat.nodes.Request /** * Returns basic statistics about performance of cluster nodes. - * */ public class NodesRequest extends CatRequestBase { - @Nullable - private final Bytes bytes; - - @Nullable - private final Boolean fullId; - - // --------------------------------------------------------------------------------------------- - - private NodesRequest(Builder builder) { - - this.bytes = builder.bytes; - this.fullId = builder.fullId; - - } - - public static NodesRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * The unit in which to display byte values - *

- * API name: {@code bytes} - */ - @Nullable - public final Bytes bytes() { - return this.bytes; - } - - /** - * Return the full node ID instead of the shortened version (default: false) - *

- * API name: {@code full_id} - */ - @Nullable - public final Boolean fullId() { - return this.fullId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link NodesRequest}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private Bytes bytes; - - @Nullable - private Boolean fullId; - - /** - * The unit in which to display byte values - *

- * API name: {@code bytes} - */ - public final Builder bytes(@Nullable Bytes value) { - this.bytes = value; - return this; - } - - /** - * Return the full node ID instead of the shortened version (default: false) - *

- * API name: {@code full_id} - */ - public final Builder fullId(@Nullable Boolean value) { - this.fullId = value; - return this; - } - - /** - * Builds a {@link NodesRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public NodesRequest build() { - _checkSingleUse(); - - return new NodesRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code cat.nodes}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - return "/_cat/nodes"; - - }, - - // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - if (request.bytes != null) { - params.put("bytes", request.bytes.jsonValue()); - } - if (request.fullId != null) { - params.put("full_id", String.valueOf(request.fullId)); - } - return params; - - }, SimpleEndpoint.emptyMap(), false, NodesResponse._DESERIALIZER); + @Nullable + private final Bytes bytes; + + @Nullable + private final Boolean fullId; + + // --------------------------------------------------------------------------------------------- + + private NodesRequest(Builder builder) { + super(builder); + this.bytes = builder.bytes; + this.fullId = builder.fullId; + + } + + public static NodesRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The unit in which to display byte values + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * Return the full node ID instead of the shortened version (default: false) + *

+ * API name: {@code full_id} + */ + @Nullable + public final Boolean fullId() { + return this.fullId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NodesRequest}. + */ + + public static class Builder extends CatRequestBaseBuilder { + @Nullable + private Bytes bytes; + + @Nullable + private Boolean fullId; + + /** + * The unit in which to display byte values + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + + /** + * Return the full node ID instead of the shortened version (default: false) + *

+ * API name: {@code full_id} + */ + public final Builder fullId(@Nullable Boolean value) { + this.fullId = value; + return this; + } + + /** + * Builds a {@link NodesRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public NodesRequest build() { + _checkSingleUse(); + + return new NodesRequest(this); + } + + @Override + protected Builder self() { + return this; + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code cat.nodes}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_cat/nodes"; + + }, + + // Request parameters + request -> { + Map params = new HashMap<>(request.queryParameters()); + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } + if (request.fullId != null) { + params.put("full_id", String.valueOf(request.fullId)); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, NodesResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java index 25e5526607..a228b5ac74 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java @@ -41,7 +41,6 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import java.util.HashMap; -import java.util.Map; // typedef: cat.pending_tasks.Request @@ -79,10 +78,5 @@ public PendingTasksRequest() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, PendingTasksResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, PendingTasksResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java index f20d504f78..f256c1db4c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java @@ -41,7 +41,6 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import java.util.HashMap; -import java.util.Map; // typedef: cat.plugins.Request @@ -79,10 +78,5 @@ public PluginsRequest() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, PluginsResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, PluginsResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java index 8762d3bcda..afb9469791 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java @@ -42,233 +42,233 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.recovery.Request /** * Returns information about index shard recoveries, both on-going completed. - * */ public class RecoveryRequest extends CatRequestBase { - @Nullable - private final Boolean activeOnly; - - @Nullable - private final Bytes bytes; - - @Nullable - private final Boolean detailed; - - private final List index; - - // --------------------------------------------------------------------------------------------- - - private RecoveryRequest(Builder builder) { - - this.activeOnly = builder.activeOnly; - this.bytes = builder.bytes; - this.detailed = builder.detailed; - this.index = ApiTypeHelper.unmodifiable(builder.index); - - } - - public static RecoveryRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * If true, the response only includes ongoing shard recoveries - *

- * API name: {@code active_only} - */ - @Nullable - public final Boolean activeOnly() { - return this.activeOnly; - } - - /** - * The unit in which to display byte values - *

- * API name: {@code bytes} - */ - @Nullable - public final Bytes bytes() { - return this.bytes; - } - - /** - * If true, the response includes detailed information about shard - * recoveries - *

- * API name: {@code detailed} - */ - @Nullable - public final Boolean detailed() { - return this.detailed; - } - - /** - * Comma-separated list or wildcard expression of index names to limit the - * returned information - *

- * API name: {@code index} - */ - public final List index() { - return this.index; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link RecoveryRequest}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private Boolean activeOnly; - - @Nullable - private Bytes bytes; - - @Nullable - private Boolean detailed; - - @Nullable - private List index; - - /** - * If true, the response only includes ongoing shard recoveries - *

- * API name: {@code active_only} - */ - public final Builder activeOnly(@Nullable Boolean value) { - this.activeOnly = value; - return this; - } - - /** - * The unit in which to display byte values - *

- * API name: {@code bytes} - */ - public final Builder bytes(@Nullable Bytes value) { - this.bytes = value; - return this; - } - - /** - * If true, the response includes detailed information about shard - * recoveries - *

- * API name: {@code detailed} - */ - public final Builder detailed(@Nullable Boolean value) { - this.detailed = value; - return this; - } - - /** - * Comma-separated list or wildcard expression of index names to limit the - * returned information - *

- * API name: {@code index} - *

- * Adds all elements of list to index. - */ - public final Builder index(List list) { - this.index = _listAddAll(this.index, list); - return this; - } - - /** - * Comma-separated list or wildcard expression of index names to limit the - * returned information - *

- * API name: {@code index} - *

- * Adds one or more values to index. - */ - public final Builder index(String value, String... values) { - this.index = _listAdd(this.index, value, values); - return this; - } - - /** - * Builds a {@link RecoveryRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public RecoveryRequest build() { - _checkSingleUse(); - - return new RecoveryRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code cat.recovery}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - final int _index = 1 << 0; - - int propsSet = 0; - - if (ApiTypeHelper.isDefined(request.index())) - propsSet |= _index; - - if (propsSet == 0) { - StringBuilder buf = new StringBuilder(); - buf.append("/_cat"); - buf.append("/recovery"); - return buf.toString(); - } - if (propsSet == (_index)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_cat"); - buf.append("/recovery"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - if (request.detailed != null) { - params.put("detailed", String.valueOf(request.detailed)); - } - if (request.activeOnly != null) { - params.put("active_only", String.valueOf(request.activeOnly)); - } - if (request.bytes != null) { - params.put("bytes", request.bytes.jsonValue()); - } - return params; - - }, SimpleEndpoint.emptyMap(), false, RecoveryResponse._DESERIALIZER); + @Nullable + private final Boolean activeOnly; + + @Nullable + private final Bytes bytes; + + @Nullable + private final Boolean detailed; + + private final List index; + + // --------------------------------------------------------------------------------------------- + + private RecoveryRequest(Builder builder) { + super(builder); + this.activeOnly = builder.activeOnly; + this.bytes = builder.bytes; + this.detailed = builder.detailed; + this.index = ApiTypeHelper.unmodifiable(builder.index); + + } + + public static RecoveryRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * If true, the response only includes ongoing shard recoveries + *

+ * API name: {@code active_only} + */ + @Nullable + public final Boolean activeOnly() { + return this.activeOnly; + } + + /** + * The unit in which to display byte values + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * If true, the response includes detailed information about shard + * recoveries + *

+ * API name: {@code detailed} + */ + @Nullable + public final Boolean detailed() { + return this.detailed; + } + + /** + * Comma-separated list or wildcard expression of index names to limit the + * returned information + *

+ * API name: {@code index} + */ + public final List index() { + return this.index; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RecoveryRequest}. + */ + + public static class Builder extends CatRequestBaseBuilder { + @Nullable + private Boolean activeOnly; + + @Nullable + private Bytes bytes; + + @Nullable + private Boolean detailed; + + @Nullable + private List index; + + /** + * If true, the response only includes ongoing shard recoveries + *

+ * API name: {@code active_only} + */ + public final Builder activeOnly(@Nullable Boolean value) { + this.activeOnly = value; + return this; + } + + /** + * The unit in which to display byte values + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + + /** + * If true, the response includes detailed information about shard + * recoveries + *

+ * API name: {@code detailed} + */ + public final Builder detailed(@Nullable Boolean value) { + this.detailed = value; + return this; + } + + /** + * Comma-separated list or wildcard expression of index names to limit the + * returned information + *

+ * API name: {@code index} + *

+ * Adds all elements of list to index. + */ + public final Builder index(List list) { + this.index = _listAddAll(this.index, list); + return this; + } + + /** + * Comma-separated list or wildcard expression of index names to limit the + * returned information + *

+ * API name: {@code index} + *

+ * Adds one or more values to index. + */ + public final Builder index(String value, String... values) { + this.index = _listAdd(this.index, value, values); + return this; + } + + /** + * Builds a {@link RecoveryRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public RecoveryRequest build() { + _checkSingleUse(); + + return new RecoveryRequest(this); + } + + @Override + protected Builder self() { + return this; + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code cat.recovery}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) propsSet |= _index; + + if (propsSet == 0) { + StringBuilder buf = new StringBuilder(); + buf.append("/_cat"); + buf.append("/recovery"); + return buf.toString(); + } + if (propsSet == (_index)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_cat"); + buf.append("/recovery"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Request parameters + request -> { + Map params = new HashMap<>(request.queryParameters()); + if (request.detailed != null) { + params.put("detailed", String.valueOf(request.detailed)); + } + if (request.activeOnly != null) { + params.put("active_only", String.valueOf(request.activeOnly)); + } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, RecoveryResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java index 49bff51dd9..c903f8285e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java @@ -41,7 +41,6 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import java.util.HashMap; -import java.util.Map; // typedef: cat.repositories.Request @@ -79,10 +78,5 @@ public RepositoriesRequest() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, RepositoriesResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, RepositoriesResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java index 6c2adce21e..10af4ad191 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java @@ -42,14 +42,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.segments.Request @@ -67,7 +66,7 @@ public class SegmentsRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private SegmentsRequest(Builder builder) { - + super(builder); this.bytes = builder.bytes; this.index = ApiTypeHelper.unmodifiable(builder.index); @@ -102,7 +101,7 @@ public final List index() { * Builder for {@link SegmentsRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private Bytes bytes; @@ -154,6 +153,11 @@ public SegmentsRequest build() { return new SegmentsRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -198,8 +202,7 @@ public SegmentsRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java index 229d47ddad..96c09ee559 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java @@ -42,14 +42,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.shards.Request @@ -67,7 +66,7 @@ public class ShardsRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private ShardsRequest(Builder builder) { - + super(builder); this.bytes = builder.bytes; this.index = ApiTypeHelper.unmodifiable(builder.index); @@ -102,7 +101,7 @@ public final List index() { * Builder for {@link ShardsRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private Bytes bytes; @@ -154,6 +153,11 @@ public ShardsRequest build() { return new ShardsRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -198,8 +202,7 @@ public ShardsRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java index ea05c89761..70bf7a5abc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java @@ -41,14 +41,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.snapshots.Request @@ -66,7 +65,7 @@ public class SnapshotsRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private SnapshotsRequest(Builder builder) { - + super(builder); this.ignoreUnavailable = builder.ignoreUnavailable; this.repository = ApiTypeHelper.unmodifiable(builder.repository); @@ -101,7 +100,7 @@ public final List repository() { * Builder for {@link SnapshotsRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private Boolean ignoreUnavailable; @@ -153,6 +152,11 @@ public SnapshotsRequest build() { return new SnapshotsRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -198,8 +202,7 @@ public SnapshotsRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.ignoreUnavailable != null) { params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java index ee1dc86744..0c7d44eb89 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java @@ -41,14 +41,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.tasks.Request @@ -72,7 +71,7 @@ public class TasksRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private TasksRequest(Builder builder) { - + super(builder); this.actions = ApiTypeHelper.unmodifiable(builder.actions); this.detailed = builder.detailed; this.nodeId = ApiTypeHelper.unmodifiable(builder.nodeId); @@ -125,7 +124,7 @@ public final Long parentTask() { * Builder for {@link TasksRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private List actions; @@ -213,6 +212,11 @@ public TasksRequest build() { return new TasksRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -236,8 +240,7 @@ public TasksRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.detailed != null) { params.put("detailed", String.valueOf(request.detailed)); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java index 8ebdfe1795..28c0aec995 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java @@ -40,12 +40,10 @@ import org.opensearch.client.transport.Endpoint; import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; -import java.util.Map; import java.util.function.Function; -import javax.annotation.Nullable; // typedef: cat.templates.Request @@ -61,7 +59,7 @@ public class TemplatesRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private TemplatesRequest(Builder builder) { - + super(builder); this.name = builder.name; } @@ -86,7 +84,7 @@ public final String name() { * Builder for {@link TemplatesRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private String name; @@ -111,6 +109,11 @@ public TemplatesRequest build() { return new TemplatesRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -154,10 +157,5 @@ public TemplatesRequest build() { }, // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("format", "json"); - return params; - - }, SimpleEndpoint.emptyMap(), false, TemplatesResponse._DESERIALIZER); + request -> new HashMap<>(request.queryParameters()), SimpleEndpoint.emptyMap(), false, TemplatesResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java index 90be667ebb..856487d47d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java @@ -42,14 +42,13 @@ import org.opensearch.client.transport.endpoints.SimpleEndpoint; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nullable; // typedef: cat.thread_pool.Request @@ -68,7 +67,7 @@ public class ThreadPoolRequest extends CatRequestBase { // --------------------------------------------------------------------------------------------- private ThreadPoolRequest(Builder builder) { - + super(builder); this.size = builder.size; this.threadPoolPatterns = ApiTypeHelper.unmodifiable(builder.threadPoolPatterns); @@ -104,7 +103,7 @@ public final List threadPoolPatterns() { * Builder for {@link ThreadPoolRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends CatRequestBaseBuilder { @Nullable private ThreadPoolSize size; @@ -158,6 +157,11 @@ public ThreadPoolRequest build() { return new ThreadPoolRequest(this); } + + @Override + protected Builder self() { + return this; + } } // --------------------------------------------------------------------------------------------- @@ -204,8 +208,7 @@ public ThreadPoolRequest build() { // Request parameters request -> { - Map params = new HashMap<>(); - params.put("format", "json"); + Map params = new HashMap<>(request.queryParameters()); if (request.size != null) { params.put("size", request.size.jsonValue()); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java new file mode 100644 index 0000000000..af9f9caeb0 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java @@ -0,0 +1,219 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import org.opensearch.client.opensearch._types.Bytes; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.Result; +import org.opensearch.client.opensearch.cat.AliasesResponse; +import org.opensearch.client.opensearch.cat.AllocationResponse; +import org.opensearch.client.opensearch.cat.IndicesResponse; +import org.opensearch.client.opensearch.cat.NodesResponse; +import org.opensearch.client.opensearch.cat.PluginsResponse; +import org.opensearch.client.opensearch.cat.RecoveryResponse; +import org.opensearch.client.opensearch.cat.SegmentsResponse; +import org.opensearch.client.opensearch.cat.ShardsResponse; +import org.opensearch.client.opensearch.cat.aliases.AliasesRecord; +import org.opensearch.client.opensearch.cat.allocation.AllocationRecord; +import org.opensearch.client.opensearch.cat.indices.IndicesRecord; +import org.opensearch.client.opensearch.cat.nodes.NodesRecord; +import org.opensearch.client.opensearch.cat.recovery.RecoveryRecord; +import org.opensearch.client.opensearch.cat.segments.SegmentsRecord; +import org.opensearch.client.opensearch.cat.shards.ShardsRecord; +import org.opensearch.client.opensearch.core.IndexResponse; +import org.opensearch.client.opensearch.indices.CreateIndexResponse; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public abstract class AbstractCatClientIT extends OpenSearchJavaClientTestCase { + + public void testCatNodes() throws Exception { + NodesResponse nodesResponse = javaClient().cat().nodes(r -> r.bytes(Bytes.Bytes).fullId(true) + .headers("id,ip,name,version,pid,heap.percent,ram.percent,cpu,load_1m,load_5m,load_15m,node.role")); + + assertNotNull(nodesResponse.valueBody()); + assertTrue(nodesResponse.valueBody().size() > 0); + + NodesRecord nodesRecord = nodesResponse.valueBody().get(0); + + assertNotNull(nodesRecord.id()); + assertNotNull(nodesRecord.ip()); + assertNotNull(nodesRecord.name()); + assertNotNull(nodesRecord.version()); + assertNotNull(nodesRecord.pid()); + assertNotNull(nodesRecord.heapPercent()); + assertNotNull(nodesRecord.ramPercent()); + assertNotNull(nodesRecord.cpu()); + assertNotNull(nodesRecord.load1m()); + assertNotNull(nodesRecord.load5m()); + assertNotNull(nodesRecord.load15m()); + assertNotNull(nodesRecord.nodeRole()); + } + + public void testCatIndices() throws Exception { + createIndex("my-index-for-cat-test"); + + IndicesResponse indicesResponse = javaClient().cat().indices(r -> r.headers("index,health,status,uuid,pri,rep,docs.count," + + "docs.deleted,store.size,pri.store.size,creation.date,creation.date.string").bytes(Bytes.Bytes)); + + assertNotNull(indicesResponse.valueBody()); + assertTrue(indicesResponse.valueBody().size() > 0); + + IndicesRecord indicesRecord = indicesResponse.valueBody().get(0); + + assertNotNull(indicesRecord.index()); + assertNotNull(indicesRecord.health()); + assertNotNull(indicesRecord.status()); + assertNotNull(indicesRecord.uuid()); + assertNotNull(indicesRecord.pri()); + assertNotNull(indicesRecord.rep()); + assertNotNull(indicesRecord.docsCount()); + assertNotNull(indicesRecord.docsDeleted()); + assertNotNull(indicesRecord.storeSize()); + assertNotNull(indicesRecord.priStoreSize()); + assertNotNull(indicesRecord.creationDate()); + assertNotNull(indicesRecord.creationDateString()); + } + + public void testCatRecovery() throws Exception { + createIndex("test-cat-recovery-index"); + RecoveryResponse recoveryResponse = javaClient().cat().recovery(r -> r.headers("index,shard,type,stage,source_host,source_node," + + "target_host,target_node,repository,snapshot,files,files_recovered,files_percent,files_total").bytes(Bytes.Bytes)); + + assertNotNull("recoveryResponse.valueBody() is null", recoveryResponse.valueBody()); + assertTrue("recoveryResponse.valueBody().size() == 0", recoveryResponse.valueBody().size() > 0); + + RecoveryRecord recoveryRecord = recoveryResponse.valueBody().get(0); + + assertNotNull(recoveryRecord.index()); + assertNotNull(recoveryRecord.shard()); + assertNotNull(recoveryRecord.type()); + assertNotNull(recoveryRecord.stage()); + assertNotNull(recoveryRecord.sourceHost()); + assertNotNull(recoveryRecord.sourceNode()); + assertNotNull(recoveryRecord.targetHost()); + assertNotNull(recoveryRecord.targetNode()); + assertNotNull(recoveryRecord.repository()); + assertNotNull(recoveryRecord.snapshot()); + assertNotNull(recoveryRecord.files()); + assertNotNull(recoveryRecord.filesRecovered()); + assertNotNull(recoveryRecord.filesPercent()); + assertNotNull(recoveryRecord.filesTotal()); + } + + public void testCatAliases() throws Exception { + String indexName = "test-aliases-index"; + String alias = "new-alias"; + createIndex(indexName); + assertTrue(javaClient().indices().putAlias(r -> r.index(indexName).name(alias).isWriteIndex(true)).acknowledged()); + + AliasesResponse aliasesResponse = javaClient().cat().aliases(r -> + r.headers("alias,index,is_write_index,routing.index,routing.search").sort("is_write_index")); + + assertNotNull(aliasesResponse.valueBody()); + assertTrue(aliasesResponse.valueBody().size() > 0); + + AliasesRecord aliasRecord = aliasesResponse.valueBody().stream().filter(aliasesRecord -> aliasesRecord.alias().equals(alias)) + .findAny().get(); + + assertTrue(aliasRecord.index().equals(indexName)); + assertTrue(aliasRecord.isWriteIndex().equals(Boolean.TRUE.toString())); + assertNotNull(aliasRecord.routingIndex()); + assertNotNull(aliasRecord.routingSearch()); + assertNull(aliasRecord.filter()); + } + + public void testCatShards() throws Exception { + createIndex("test-cat-shards-index-1"); + createIndex("test-cat-shards-index-3"); + createIndex("test-cat-shards-index-2"); + createIndex("a-test-cat-shards-index"); + + ShardsResponse shardsResponse = javaClient().cat().shards(r -> r.headers("index,shard,prirep,state,store").sort("index") + .bytes(Bytes.Bytes)); + assertNotNull(shardsResponse.valueBody()); + assertTrue(shardsResponse.valueBody().size() > 0); + + ShardsRecord shardsRecord = shardsResponse.valueBody().get(0); + + assertNotNull(shardsRecord.index()); + assertNotNull(shardsRecord.shard()); + assertNotNull(shardsRecord.prirep()); + assertNotNull(shardsRecord.state()); + assertNotNull(shardsRecord.store()); + assertNull(shardsRecord.node()); + assertNull(shardsRecord.ip()); + + List indices = shardsResponse.valueBody().stream().map(shardRecord -> shardRecord.index()).collect(Collectors.toList()); + assertTrue(indices.equals(indices.stream().sorted().collect(Collectors.toList()))); + } + + public void testCatAllocation() throws Exception { + createIndex("test-cat-allocations-index"); + + AllocationResponse allocationResponse = javaClient().cat().allocation(r -> + r.headers("ip,node,shards,disk.indices,disk.used,disk.avail,disk.total,disk.percent").sort("ip")); + assertNotNull(allocationResponse.valueBody()); + assertTrue(allocationResponse.valueBody().size() > 0); + + AllocationRecord allocationRecord = allocationResponse.valueBody().stream().filter(allocation -> + !allocation.node().equals("UNASSIGNED")).findAny().get(); + assertNotNull(allocationRecord.ip()); + assertNotNull(allocationRecord.node()); + assertNotNull(allocationRecord.shards()); + assertNotNull(allocationRecord.diskIndices()); + assertNotNull(allocationRecord.diskUsed()); + assertNotNull(allocationRecord.diskAvail()); + assertNotNull(allocationRecord.diskTotal()); + assertNotNull(allocationRecord.diskPercent()); + assertNull(allocationRecord.host()); + } + + public void testCatPlugins() throws Exception { + assumeTrue("There are no plugins installed when HTTP is used", isHttps()); + PluginsResponse pluginsResponse = javaClient().cat().plugins(); + assertNotNull(pluginsResponse.valueBody()); + assertTrue(pluginsResponse.valueBody().size() > 0); + } + + public void testCatSegments() throws Exception { + createIndex("cat-segments-test-index"); + + final IndexResponse index = javaClient().index(b -> b + .index("test-cat-segments-index") + .id("id") + .refresh(Refresh.True) + .document(Map.of("test-cat-segments-key", "test-cat-segments-value"))); + + assertTrue(index.result() == Result.Created); + + SegmentsResponse segmentsResponse = javaClient().cat().segments(r -> r.headers("index,shard,id,segment,size")); + assertNotNull("segmentsResponse.valueBody() is null", segmentsResponse.valueBody()); + assertTrue("segmentsResponse.valueBody().size() == 0", segmentsResponse.valueBody().size() > 0); + + SegmentsRecord segmentsRecord = segmentsResponse.valueBody().get(0); + + assertNotNull(segmentsRecord.id()); + assertNotNull(segmentsRecord.index()); + assertNotNull(segmentsRecord.shard()); + assertNotNull(segmentsRecord.segment()); + assertNotNull(segmentsRecord.size()); + assertNull(segmentsRecord.ip()); + assertNull(segmentsRecord.prirep()); + } + + private void createIndex(String indexName) throws Exception { + CreateIndexResponse createResponse = javaClient().indices().create(b -> b.index(indexName)); + assertTrue(createResponse.acknowledged()); + assertTrue(createResponse.shardsAcknowledged()); + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java index 11c748762f..fc6d8af05d 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -130,7 +130,7 @@ protected String getTestRestCluster() { protected void wipeAllOSIndices() throws IOException { final IndicesResponse response = adminJavaClient() .cat() - .indices(r -> r.expandWildcards(ExpandWildcard.All)); + .indices(r -> r.headers("index,creation.date").expandWildcards(ExpandWildcard.All)); for (IndicesRecord index : response.valueBody()) { if (index.index() != null && !".opendistro_security".equals(index.index())) { diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java new file mode 100644 index 0000000000..f152e23268 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractCatClientIT; + +public class CatIT extends AbstractCatClientIT implements HttpClient5TransportSupport { +} + + diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java new file mode 100644 index 0000000000..a00207e882 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java @@ -0,0 +1,26 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractCatClientIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +import java.io.IOException; + +public class CatIT extends AbstractCatClientIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } + +} From 04dc3ad2087ad3591a76a72a462cb09e42ccca24 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:51:20 -0400 Subject: [PATCH 032/123] Support DataStream APIs (#416) (#419) * Add CreateDataStream, GetDataStream, DeleteDataStream, DataStreamsStats, and support specified data stream timestamp field in PutIndexTemplate. * Add change log for data stream changes * Add data stream into user guide * add data stream to TOC of user guide --------- (cherry picked from commit 876d37905911ec872492c67ae4e9cd8845715b2b) Signed-off-by: Tanqiu Liu Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + USER_GUIDE.md | 52 ++++ .../indices/CreateDataStreamRequest.java | 106 +++++++ .../indices/CreateDataStreamResponse.java | 73 +++++ .../client/opensearch/indices/DataStream.java | 35 +++ .../indices/DataStreamIndexInfo.java | 140 +++++++++ .../opensearch/indices/DataStreamInfo.java | 279 ++++++++++++++++++ .../opensearch/indices/DataStreamStats.java | 213 +++++++++++++ .../indices/DataStreamTimestampField.java | 115 ++++++++ .../indices/DataStreamsStatsRequest.java | 169 +++++++++++ .../indices/DataStreamsStatsResponse.java | 268 +++++++++++++++++ .../indices/DeleteDataStreamRequest.java | 123 ++++++++ .../indices/DeleteDataStreamResponse.java | 73 +++++ .../indices/GetDataStreamRequest.java | 134 +++++++++ .../indices/GetDataStreamResponse.java | 117 ++++++++ .../indices/OpenSearchIndicesAsyncClient.java | 143 +++++++++ .../indices/OpenSearchIndicesClient.java | 138 +++++++++ .../integTest/AbstractIndicesClientIT.java | 82 +++++ .../OpenSearchJavaClientTestCase.java | 4 + 19 files changed, 2265 insertions(+) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamResponse.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamIndexInfo.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamInfo.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamStats.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamTimestampField.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsResponse.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamResponse.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamResponse.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 192ddf5999..6b3033aecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add support for mapping limit settings ([#382](https://github.com/opensearch-project/opensearch-java/pull/382)) - Add buffered lookahead for Jackson ([#338](https://github.com/opensearch-project/opensearch-java/pull/338)) - Add support for headers and sort parameters in cat requests ([#388](https://github.com/opensearch-project/opensearch-java/issues/388)) +- Add support for data stream operations ([#416](https://github.com/opensearch-project/opensearch-java/pull/416)) ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 21b4b11c58..6e76aa90d8 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -15,6 +15,11 @@ - [Aggregations](#aggregations) - [Delete the document](#delete-the-document) - [Delete the index](#delete-the-index) + - [Data Stream API](#data-stream-api) + - [Create a data stream](#create-a-data-stream) + - [Get data stream](#get-data-stream) + - [Data stream stats](#data-stream-stats) + - [Delete data stream](#delete-data-stream-and-backing-indices) - [Cat API](#cat-api) - [Cat Indices](#cat-indices) - [Cat Aliases](#cat-aliases) @@ -203,6 +208,53 @@ DeleteIndexRequest deleteIndexRequest = new DeleteRequest.Builder().index(index) DeleteIndexResponse deleteIndexResponse = client.indices().delete(deleteIndexRequest); ``` +## Data Stream API + +### Create a data stream +Before creating a data stream, you need to create an index template which configures a set of indices as a data stream. +A data stream must have a timestamp field. If not specified, OpenSearch uses `@timestamp` as the default timestamp field name. + +The following sample code creates an index template for data stream with a custom timestamp field, and creates a data stream +which matches the name pattern specified in the index template. +```java +String dataStreamIndexTemplateName = "sample-data-stream-template"; +String timestampFieldName = "my_timestamp_field"; +String namePattern = "sample-data-stream-*"; +String dataStreamName = "sample-data-stream-1"; + +// Create an index template which configures data stream +PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest.Builder() + .name(dataStreamIndexTemplateName) + .indexPatterns(namePattern) + .dataStream(new DataStream.Builder() + .timestampField(t -> t.name(timestampFieldName)) + .build()) + .build(); +PutIndexTemplateResponse putIndexTemplateResponse = javaClient().indices().putIndexTemplate(putIndexTemplateRequest); + +// Create a data stream +CreateDataStreamRequest createDataStreamRequest = new CreateDataStreamRequest.Builder().name(dataStreamName).build(); +CreateDataStreamResponse createDataStreamResponse = javaClient().indices().createDataStream(createDataStreamRequest); +``` + +### Get data stream +```java +GetDataStreamRequest getDataStreamRequest = new GetDataStreamRequest.Builder().name(dataStreamName).build(); +GetDataStreamResponse getDataStreamResponse = javaClient().indices().getDataStream(getDataStreamRequest); +``` + +### Data stream stats +```java +DataStreamsStatsRequest dataStreamsStatsRequest = new DataStreamsStatsRequest.Builder().name(dataStreamName).build(); +DataStreamsStatsResponse dataStreamsStatsResponse = javaClient().indices().dataStreamsStats(dataStreamsStatsRequest); +``` + +### Delete data stream and backing indices +```java +DeleteDataStreamRequest deleteDataStreamRequest = new DeleteDataStreamRequest.Builder().name(dataStreamName).build(); +DeleteDataStreamResponse deleteDataStreamResponse = javaClient().indices().deleteDataStream(deleteDataStreamRequest); +``` + ## Cat API ### Cat Indices diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamRequest.java new file mode 100644 index 0000000000..0b474f71a4 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamRequest.java @@ -0,0 +1,106 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import java.util.function.Function; + +// typedef: indices.create_data_stream.Request + +/** + * Creates a data stream + */ +public class CreateDataStreamRequest extends RequestBase { + + private final String name; + + // --------------------------------------------------------------------------------------------- + + private CreateDataStreamRequest(Builder builder) { + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + } + + public static CreateDataStreamRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The name of the data stream + *

+ * API name: {@code name} + */ + public final String name() { + return this.name; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CreateDataStreamRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + private String name; + + /** + * Required - The name of the data stream + *

+ * API name: {@code name} + */ + public final Builder name(String name) { + this.name = name; + return this; + } + + public CreateDataStreamRequest build() { + _checkSingleUse(); + + return new CreateDataStreamRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code indices.create_data_stream}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> { + return "PUT"; + }, + + // Request path + request -> { + final int _name = 1 << 0; + int propsSet = 0; + propsSet |= _name; + + if (propsSet == (_name)) { + StringBuilder sbd = new StringBuilder(); + sbd.append("/_data_stream"); + sbd.append("/"); + SimpleEndpoint.pathEncode(request.name, sbd); + return sbd.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + }, + + // Request parameters + SimpleEndpoint.emptyMap(), + + SimpleEndpoint.emptyMap(), false, CreateDataStreamResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamResponse.java new file mode 100644 index 0000000000..7ab364de6e --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateDataStreamResponse.java @@ -0,0 +1,73 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; +import org.opensearch.client.util.ObjectBuilder; + +import java.util.function.Function; + +// typedef: indices.create_data_stream.Response + +@JsonpDeserializable +public class CreateDataStreamResponse extends AcknowledgedResponseBase { + + // --------------------------------------------------------------------------------------------- + + private CreateDataStreamResponse(Builder builder) { + super(builder); + } + + public static CreateDataStreamResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CreateDataStreamResponse} + */ + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements ObjectBuilder { + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CreateDataStreamResponse}. + * + * @throws NullPointerException + * if any required field is null. + */ + public CreateDataStreamResponse build() { + _checkSingleUse(); + + return new CreateDataStreamResponse(this); + } + } + + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CreateDataStreamResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CreateDataStreamResponse::setupCreateDataStreamResponseDeserializer); + + protected static void setupCreateDataStreamResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java index 3ab5f814f5..9c942bfa15 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java @@ -56,11 +56,15 @@ public class DataStream implements JsonpSerializable { @Nullable private final Boolean hidden; + @Nullable + private final DataStreamTimestampField timestampField; + // --------------------------------------------------------------------------------------------- private DataStream(Builder builder) { this.hidden = builder.hidden; + this.timestampField = builder.timestampField; } @@ -76,6 +80,14 @@ public final Boolean hidden() { return this.hidden; } + /** + * API name: {@code timestamp_field} + */ + @Nullable + public final DataStreamTimestampField timestampField() { + return this.timestampField; + } + /** * Serialize this object to JSON. */ @@ -90,7 +102,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (this.hidden != null) { generator.writeKey("hidden"); generator.write(this.hidden); + } + if (this.timestampField != null) { + generator.writeKey("timestamp_field"); + this.timestampField.serialize(generator, mapper); } } @@ -105,6 +121,9 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder> fn) { + return this.timestampField(fn.apply(new DataStreamTimestampField.Builder()).build()); + } + /** * Builds a {@link DataStream}. * @@ -137,6 +171,7 @@ public DataStream build() { protected static void setupDataStreamDeserializer(ObjectDeserializer op) { op.add(Builder::hidden, JsonpDeserializer.booleanDeserializer(), "hidden"); + op.add(Builder::timestampField, DataStreamTimestampField._DESERIALIZER, "timestamp_field"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamIndexInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamIndexInfo.java new file mode 100644 index 0000000000..759b54d6a0 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamIndexInfo.java @@ -0,0 +1,140 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import java.util.function.Function; + +// typedef: indices._types.DataStreamIndexInfo +@JsonpDeserializable +public class DataStreamIndexInfo implements JsonpSerializable { + + private final String indexName; + + private final String indexUuid; + + // --------------------------------------------------------------------------------------------- + + private DataStreamIndexInfo(Builder builder) { + + this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); + this.indexUuid = ApiTypeHelper.requireNonNull(builder.indexUuid, this, "indexUuid"); + + } + + public static DataStreamIndexInfo of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Index name + *

+ * API name: {@code index_name} + */ + public final String indexName() { + return this.indexName; + } + + /** + * Required - Index uuid + *

+ * API name: {@code index_uuid} + */ + public final String indexUuid() { + return this.indexUuid; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("index_name"); + generator.write(this.indexName); + + generator.writeKey("index_uuid"); + generator.write(this.indexUuid); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DataStreamIndexInfo}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String indexName; + + private String indexUuid; + + /** + * Required - Index name + *

+ * API name: {@code index_name} + */ + public final Builder indexName(String value) { + this.indexName = value; + return this; + } + + /** + * Required - Index uuid + *

+ * API name: {@code index_uuid} + */ + public final Builder indexUuid(String value) { + this.indexUuid = value; + return this; + } + + /** + * Builds a {@link DataStreamIndexInfo}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DataStreamIndexInfo build() { + _checkSingleUse(); + + return new DataStreamIndexInfo(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DataStreamIndexInfo} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DataStreamIndexInfo::setupDataStreamIndexInfoDeserializer); + + protected static void setupDataStreamIndexInfoDeserializer(ObjectDeserializer op) { + + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::indexUuid, JsonpDeserializer.stringDeserializer(), "index_uuid"); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamInfo.java new file mode 100644 index 0000000000..c360cd0a8b --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamInfo.java @@ -0,0 +1,279 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.HealthStatus; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import java.util.List; +import java.util.function.Function; + +// typedef: indices._types.DataStreamInfo + +@JsonpDeserializable +public class DataStreamInfo implements JsonpSerializable { + private final String name; + + private final DataStreamTimestampField timestampField; + + private final List indices; + + private final int generation; + + private final HealthStatus status; + + private final String template; + + // --------------------------------------------------------------------------------------------- + + private DataStreamInfo(Builder builder) { + + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.timestampField = ApiTypeHelper.requireNonNull(builder.timestampField, this, "timestampField"); + this.indices = ApiTypeHelper.unmodifiableRequired(builder.indices, this, "indices"); + this.generation = ApiTypeHelper.requireNonNull(builder.generation, this, "generation"); + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.template = ApiTypeHelper.requireNonNull(builder.template, this, "template"); + } + + public static DataStreamInfo of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - data stream name + *

+ * API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - data stream timestamp field + *

+ * API name: {@code timestamp_field} + */ + public final DataStreamTimestampField timestampField() { + return this.timestampField; + } + + /** + * Required - information about data stream's backing indices + *

+ * API name: {@code indices} + */ + public final List indices() { + return this.indices; + } + + /** + * Required - generation + *

+ * API name: {@code generation} + */ + public final int generation() { + return this.generation; + } + + /** + * Required - health status of the data stream + *

+ * API name: {@code status} + */ + public final HealthStatus status() { + return this.status; + } + + /** + * Required - index template name used to create the data stream's backing indices + *

+ * API name: {@code template} + */ + public final String template() { + return this.template; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("timestamp_field"); + this.timestampField.serialize(generator, mapper); + + if (ApiTypeHelper.isDefined(this.indices)) { + generator.writeKey("indices"); + generator.writeStartArray(); + for (DataStreamIndexInfo item : this.indices) { + item.serialize(generator, mapper); + } + generator.writeEnd(); + } + + generator.writeKey("generation"); + generator.write(this.generation); + + generator.writeKey("status"); + this.status.serialize(generator, mapper); + + generator.writeKey("template"); + generator.write(this.template); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DataStreamInfo}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String name; + + private DataStreamTimestampField timestampField; + + private List indices; + + private int generation; + + private HealthStatus status; + + private String template; + + /** + * Required - data stream name + *

+ * API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - data stream timestamp field + *

+ * API name: {@code timestamp_field} + */ + public final Builder timestampField(DataStreamTimestampField value) { + this.timestampField = value; + return this; + } + + /** + * Required - data stream timestamp field + *

+ * API name: {@code timestamp_field} + */ + public final Builder timestampField(Function> fn) { + return this.timestampField(fn.apply(new DataStreamTimestampField.Builder()).build()); + } + + /** + * Required - information about data stream's backing indices + *

+ * API name: {@code indices} + */ + public final Builder indices(List list) { + this.indices = _listAddAll(this.indices, list); + return this; + } + + /** + * Required - information about data stream's backing indices + *

+ * API name: {@code indices} + */ + public final Builder indices(DataStreamIndexInfo value, DataStreamIndexInfo... values) { + this.indices = _listAdd(this.indices, value, values); + return this; + } + + + /** + * Required - generation + *

+ * API name: {@code generation} + */ + public final Builder generation(int value) { + this.generation = value; + return this; + } + + /** + * Required - health status of the data stream + *

+ * API name: {@code status} + */ + public final Builder status(HealthStatus value) { + this.status = value; + return this; + } + + /** + * Required - index template name used to create the data stream's backing indices + *

+ * API name: {@code template} + */ + public final Builder template(String value) { + this.template = value; + return this; + } + + /** + * Builds a {@link DataStreamInfo}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DataStreamInfo build() { + _checkSingleUse(); + + return new DataStreamInfo(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DataStreamInfo} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DataStreamInfo::setupDataStreamInfoDeserializer); + + protected static void setupDataStreamInfoDeserializer(ObjectDeserializer op) { + + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::timestampField, DataStreamTimestampField._DESERIALIZER, "timestamp_field"); + op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(DataStreamIndexInfo._DESERIALIZER), "indices"); + op.add(Builder::generation, JsonpDeserializer.integerDeserializer(), "generation"); + op.add(Builder::status, HealthStatus._DESERIALIZER, "status"); + op.add(Builder::template, JsonpDeserializer.stringDeserializer(), "template"); + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamStats.java new file mode 100644 index 0000000000..78da87d747 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamStats.java @@ -0,0 +1,213 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import javax.annotation.Nullable; +import java.util.function.Function; + +// typedef: indices._types.DataStreamStats + +@JsonpDeserializable +public class DataStreamStats implements JsonpSerializable { + + private final String dataStream; + + private final int backingIndices; + + private final long storeSizeBytes; + + private final long maximumTimestamp; + + @Nullable + private final String storeSize; + + // --------------------------------------------------------------------------------------------- + + private DataStreamStats(Builder builder) { + + this.dataStream = ApiTypeHelper.requireNonNull(builder.dataStream, this, "dataStream"); + this.backingIndices = ApiTypeHelper.requireNonNull(builder.backingIndices, this, "backingIndices"); + this.storeSizeBytes = ApiTypeHelper.requireNonNull(builder.storeSizeBytes, this, "storeSizeBytes"); + this.maximumTimestamp = ApiTypeHelper.requireNonNull(builder.maximumTimestamp, this, "maximumTimestamp"); + this.storeSize = builder.storeSize; + + } + + public static DataStreamStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code data_stream} + */ + public final String dataStream() { + return this.dataStream; + } + + /** + * API name: {@code backing_indices} + */ + public final int backingIndices() { + return this.backingIndices; + } + + /** + * API name: {@code store_size_bytes} + */ + public final long storeSizeBytes() { + return this.storeSizeBytes; + } + + /** + * API name: {@code maximum_timestamp} + */ + public final long maximumTimestamp() { + return this.maximumTimestamp; + } + + /** + * API name: {@code store_size} + */ + @Nullable + public final String storeSize() { + return this.storeSize; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("data_stream"); + generator.write(this.dataStream); + + generator.writeKey("backing_indices"); + generator.write(this.backingIndices); + + generator.writeKey("store_size_bytes"); + generator.write(this.storeSizeBytes); + + generator.writeKey("maximum_timestamp"); + generator.write(this.maximumTimestamp); + + if (this.storeSize != null) { + generator.writeKey("store_size"); + generator.write(this.storeSize); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DataStreamStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + private String dataStream; + + private int backingIndices; + + private long storeSizeBytes; + + private long maximumTimestamp; + + @Nullable + private String storeSize; + + /** + * API name: {@code data_stream} + */ + public final Builder dataStream(String value) { + this.dataStream = value; + return this; + } + + /** + * API name: {@code backing_indices} + */ + public final Builder backingIndices(int value) { + this.backingIndices = value; + return this; + } + + /** + * API name: {@code store_size_bytes} + */ + public final Builder storeSizeBytes(long value) { + this.storeSizeBytes = value; + return this; + } + + /** + * API name: {@code maximum_timestamp} + */ + public final Builder maximumTimestamp(long value) { + this.maximumTimestamp = value; + return this; + } + + /** + * API name: {@code store_size} + */ + public final Builder storeSize(@Nullable String value) { + this.storeSize = value; + return this; + } + + /** + * Builds a {@link DataStreamStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DataStreamStats build() { + _checkSingleUse(); + + return new DataStreamStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DataStreamStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DataStreamStats::setupDataStreamStatsDeserializer); + + protected static void setupDataStreamStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::dataStream, JsonpDeserializer.stringDeserializer(), "data_stream"); + op.add(Builder::backingIndices, JsonpDeserializer.integerDeserializer(), "backing_indices"); + op.add(Builder::storeSize, JsonpDeserializer.stringDeserializer(), "store_size"); + op.add(Builder::storeSizeBytes, JsonpDeserializer.longDeserializer(), "store_size_bytes"); + op.add(Builder::maximumTimestamp, JsonpDeserializer.longDeserializer(), "maximum_timestamp"); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamTimestampField.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamTimestampField.java new file mode 100644 index 0000000000..626aa8aff2 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamTimestampField.java @@ -0,0 +1,115 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import javax.annotation.Nullable; +import java.util.function.Function; + +// typedef: indices._types.DataStreamTimestampField + +@JsonpDeserializable +public class DataStreamTimestampField implements JsonpSerializable { + @Nullable + private final String name; + + // --------------------------------------------------------------------------------------------- + + private DataStreamTimestampField(Builder builder) { + + this.name = builder.name; + + } + + public static DataStreamTimestampField of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DataStreamTimestampField}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String name; + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * Builds a {@link DataStreamTimestampField}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DataStreamTimestampField build() { + _checkSingleUse(); + + return new DataStreamTimestampField(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DataStreamTimestampField} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DataStreamTimestampField::setupDataStreamTimestampFieldDeserializer); + + protected static void setupDataStreamTimestampFieldDeserializer(ObjectDeserializer op) { + + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsRequest.java new file mode 100644 index 0000000000..4923712003 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsRequest.java @@ -0,0 +1,169 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import javax.annotation.Nullable; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +// typedef: indices.data_streams_stats.Request + +/** + * Returns statistics of data streams + */ +public class DataStreamsStatsRequest extends RequestBase { + + private final List name; + + @Nullable + private final Boolean human; + + // --------------------------------------------------------------------------------------------- + + private DataStreamsStatsRequest(Builder builder) { + this.name = ApiTypeHelper.unmodifiable(builder.name); + this.human = builder.human; + } + + public static DataStreamsStatsRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Comma-separated list of data streams to get. + *

+ * API name: {@code name} + */ + public final List name() { + return this.name; + } + + /** + * Specify this query parameter to include human readable fields in the response. + *

+ * API name: {@code human} + */ + @Nullable + public final Boolean human() { + return this.human; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DataStreamsStatsRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + @Nullable + private List name; + + @Nullable + private Boolean human; + + /** + * Required - Comma-separated list of data streams to get. + *

+ * API name: {@code name} + *

+ * Adds all elements of list to name. + */ + public final Builder name(List list) { + this.name = _listAddAll(this.name, list); + return this; + } + + /** + * Required - Comma-separated list of data streams to get. + *

+ * API name: {@code name} + *

+ * Adds one or more values to name. + */ + public final Builder name(String value, String... values) { + this.name = _listAdd(this.name, value, values); + return this; + } + + /** + * Specify this query parameter to include human readable fields in the response. + *

+ * API name: {@code human} + */ + public final Builder human(@Nullable Boolean value) { + this.human = value; + return this; + } + + public DataStreamsStatsRequest build() { + _checkSingleUse(); + + return new DataStreamsStatsRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code indices.get_data_stream}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> { + return "GET"; + }, + + // Request path + request -> { + final int _name = 1 << 0; + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) { + propsSet |= _name; + } + + if (propsSet == 0) { + StringBuilder sbd = new StringBuilder(); + sbd.append("/_data_stream"); + sbd.append("/_stats"); + return sbd.toString(); + } + + if (propsSet == (_name)) { + StringBuilder sbd = new StringBuilder(); + sbd.append("/_data_stream"); + sbd.append("/"); + SimpleEndpoint.pathEncode(request.name.stream().map(v -> v).collect(Collectors.joining(",")), sbd); + sbd.append("/_stats"); + return sbd.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.human != null) { + params.put("human", String.valueOf(request.human)); + } + return params; + }, SimpleEndpoint.emptyMap(), false, DataStreamsStatsResponse._DESERIALIZER); + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsResponse.java new file mode 100644 index 0000000000..df71fcb0cd --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStreamsStatsResponse.java @@ -0,0 +1,268 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.ShardStatistics; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import javax.annotation.Nullable; +import java.util.List; +import java.util.function.Function; + +// typedef: indices.data_streams_stats.Response + +@JsonpDeserializable +public class DataStreamsStatsResponse implements JsonpSerializable { + + private final ShardStatistics shards; + + private final int dataStreamCount; + + private final int backingIndices; + + private final long totalStoreSizeBytes; + + @Nullable + private final String totalStoreSize; + + private final List dataStreams; + + // --------------------------------------------------------------------------------------------- + + private DataStreamsStatsResponse(Builder builder) { + + this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); + this.dataStreamCount = ApiTypeHelper.requireNonNull(builder.dataStreamCount, this, "dataStreamCount"); + this.backingIndices = ApiTypeHelper.requireNonNull(builder.backingIndices, this, "backingIndices"); + this.totalStoreSizeBytes = ApiTypeHelper.requireNonNull(builder.totalStoreSizeBytes, this, "totalStoreSizeBytes"); + this.totalStoreSize = builder.totalStoreSize; + this.dataStreams = ApiTypeHelper.unmodifiableRequired(builder.dataStreams, this, "dataStreams"); + + } + + public static DataStreamsStatsResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code _shards} + */ + public final ShardStatistics shards() { + return this.shards; + } + + /** + * Required - API name: {@code data_stream_count} + */ + public final int dataStreamCount() { + return this.dataStreamCount; + } + + /** + * Required - API name: {@code backing_indices} + */ + public final int backingIndices() { + return this.backingIndices; + } + + /** + * Required - API name: {@code total_store_size_bytes} + */ + public final long totalStoreSizeBytes() { + return this.totalStoreSizeBytes; + } + + /** + * API name: {@code total_store_size} + */ + @Nullable + public final String totalStoreSize() { + return this.totalStoreSize; + } + + /** + * API name: {@code data_streams} + */ + public final List dataStreams() { + return this.dataStreams; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("_shards"); + this.shards.serialize(generator, mapper); + + generator.writeKey("data_stream_count"); + generator.write(this.dataStreamCount); + + generator.writeKey("backing_indices"); + generator.write(this.backingIndices); + + generator.writeKey("total_store_size_bytes"); + generator.write(this.totalStoreSizeBytes); + + if (this.totalStoreSize != null) { + generator.writeKey("total_store_size"); + generator.write(this.totalStoreSize); + + } + + if (ApiTypeHelper.isDefined(this.dataStreams)) { + generator.writeKey("data_streams"); + generator.writeStartArray(); + for (DataStreamStats item : this.dataStreams) { + item.serialize(generator, mapper); + } + generator.writeEnd(); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DataStreamsStatsResponse}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + private ShardStatistics shards; + + private int dataStreamCount; + + private int backingIndices; + + private long totalStoreSizeBytes; + + @Nullable + private String totalStoreSize; + + private List dataStreams; + + /** + * Required - API name: {@code _shards} + */ + public final Builder shards(ShardStatistics value) { + this.shards = value; + return this; + } + + /** + * Required - API name: {@code _shards} + */ + public final Builder shards(Function> fn) { + return this.shards(fn.apply(new ShardStatistics.Builder()).build()); + } + + /** + * Required - API name: {@code data_stream_count} + */ + public final Builder dataStreamCount(int value) { + this.dataStreamCount = value; + return this; + } + + /** + * Required - API name: {@code backing_indices} + */ + public final Builder backingIndices(int value) { + this.backingIndices = value; + return this; + } + + /** + * Required - API name: {@code total_store_size_bytes} + */ + public final Builder totalStoreSizeBytes(int value) { + this.totalStoreSizeBytes = value; + return this; + } + + /** + * API name: {@code total_store_size} + */ + public final Builder totalStoreSize(@Nullable String value) { + this.totalStoreSize = value; + return this; + } + + /** + * API name: {@code data_streams} + */ + public final Builder dataStreams(List list) { + this.dataStreams = _listAddAll(this.dataStreams, list); + return this; + } + + /** + * API name: {@code data_streams} + */ + public final Builder dataStreams(DataStreamStats value, DataStreamStats... values) { + this.dataStreams = _listAdd(this.dataStreams, value, values); + return this; + } + + /** + * API name: {@code data_streams} + */ + public final Builder dataStreams(Function> fn) { + return dataStreams(fn.apply(new DataStreamStats.Builder()).build()); + } + + /** + * Builds a {@link DataStreamsStatsResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DataStreamsStatsResponse build() { + _checkSingleUse(); + + return new DataStreamsStatsResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DataStreamsStatsResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DataStreamsStatsResponse::setupDataStreamStatsResponseDeserializer); + + protected static void setupDataStreamStatsResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::shards, ShardStatistics._DESERIALIZER, "_shards"); + op.add(Builder::dataStreamCount, JsonpDeserializer.integerDeserializer(), "data_stream_count"); + op.add(Builder::backingIndices, JsonpDeserializer.integerDeserializer(), "backing_indices"); + op.add(Builder::totalStoreSizeBytes, JsonpDeserializer.integerDeserializer(), "total_store_size_bytes"); + op.add(Builder::totalStoreSize, JsonpDeserializer.stringDeserializer(), "total_store_size"); + op.add(Builder::dataStreams, JsonpDeserializer.arrayDeserializer(DataStreamStats._DESERIALIZER), "data_streams"); + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamRequest.java new file mode 100644 index 0000000000..3a579b8c1e --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamRequest.java @@ -0,0 +1,123 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +// typedef: indices.delete_data_stream.Request + +/** + * Deletes one or more data streams and their backing indices. + */ +public class DeleteDataStreamRequest extends RequestBase { + + private final List name; + + // --------------------------------------------------------------------------------------------- + + private DeleteDataStreamRequest(Builder builder) { + this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); + } + + public static DeleteDataStreamRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Comma-separated list of data streams to delete. + *

+ * API name: {@code name} + */ + public final List name() { + return this.name; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteDataStreamRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + private List name; + + /** + * Required - Comma-separated list of data streams to delete. + *

+ * API name: {@code name} + *

+ * Adds all elements of list to name. + */ + public final Builder name(List list) { + this.name = _listAddAll(this.name, list); + return this; + } + + /** + * Required - Comma-separated list of data streams to delete. + *

+ * API name: {@code name} + *

+ * Adds one or more values to name. + */ + public final Builder name(String value, String... values) { + this.name = _listAdd(this.name, value, values); + return this; + } + + public DeleteDataStreamRequest build() { + _checkSingleUse(); + + return new DeleteDataStreamRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code indices.delete_data_stream}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> { + return "DELETE"; + }, + + // Request path + request -> { + final int _name = 1 << 0; + int propsSet = 0; + propsSet |= _name; + + if (propsSet == (_name)) { + StringBuilder sbd = new StringBuilder(); + sbd.append("/_data_stream"); + sbd.append("/"); + SimpleEndpoint.pathEncode(request.name.stream().map(v -> v).collect(Collectors.joining(",")), sbd); + return sbd.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + }, + + // Request parameters + SimpleEndpoint.emptyMap(), + + SimpleEndpoint.emptyMap(), false, DeleteDataStreamResponse._DESERIALIZER); + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamResponse.java new file mode 100644 index 0000000000..c566895e50 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteDataStreamResponse.java @@ -0,0 +1,73 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; +import org.opensearch.client.util.ObjectBuilder; + +import java.util.function.Function; + +// typedef: indices.delete_data_stream.Response + +@JsonpDeserializable +public class DeleteDataStreamResponse extends AcknowledgedResponseBase { + + // --------------------------------------------------------------------------------------------- + + private DeleteDataStreamResponse(Builder builder) { + super(builder); + } + + public static DeleteDataStreamResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteDataStreamResponse} + */ + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements ObjectBuilder { + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteDataStreamResponse}. + * + * @throws NullPointerException + * if any required field is null. + */ + public DeleteDataStreamResponse build() { + _checkSingleUse(); + + return new DeleteDataStreamResponse(this); + } + } + + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DeleteDataStreamResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DeleteDataStreamResponse::setupDeleteDataStreamResponseDeserializer); + + protected static void setupDeleteDataStreamResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamRequest.java new file mode 100644 index 0000000000..ef12ea6c22 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamRequest.java @@ -0,0 +1,134 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import javax.annotation.Nullable; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +// typedef: indices.get_data_stream.Request + +/** + * Returns data streams + */ +public class GetDataStreamRequest extends RequestBase { + + private final List name; + + // --------------------------------------------------------------------------------------------- + + private GetDataStreamRequest(Builder builder) { + this.name = ApiTypeHelper.unmodifiable(builder.name); + } + + public static GetDataStreamRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Comma-separated list of data streams to get. + *

+ * API name: {@code name} + */ + public final List name() { + return this.name; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetDataStreamRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + @Nullable + private List name; + + /** + * Required - Comma-separated list of data streams to get. + *

+ * API name: {@code name} + *

+ * Adds all elements of list to name. + */ + public final Builder name(List list) { + this.name = _listAddAll(this.name, list); + return this; + } + + /** + * Required - Comma-separated list of data streams to get. + *

+ * API name: {@code name} + *

+ * Adds one or more values to name. + */ + public final Builder name(String value, String... values) { + this.name = _listAdd(this.name, value, values); + return this; + } + + public GetDataStreamRequest build() { + _checkSingleUse(); + + return new GetDataStreamRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code indices.get_data_stream}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> { + return "GET"; + }, + + // Request path + request -> { + final int _name = 1 << 0; + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) { + propsSet |= _name; + } + + if (propsSet == 0) { + StringBuilder sbd = new StringBuilder(); + sbd.append("/_data_stream"); + return sbd.toString(); + } + + if (propsSet == (_name)) { + StringBuilder sbd = new StringBuilder(); + sbd.append("/_data_stream"); + sbd.append("/"); + SimpleEndpoint.pathEncode(request.name.stream().map(v -> v).collect(Collectors.joining(",")), sbd); + return sbd.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + }, + + // Request parameters + SimpleEndpoint.emptyMap(), + + SimpleEndpoint.emptyMap(), false, GetDataStreamResponse._DESERIALIZER); + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamResponse.java new file mode 100644 index 0000000000..9651fb371a --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetDataStreamResponse.java @@ -0,0 +1,117 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.indices; + +import jakarta.json.stream.JsonGenerator; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import java.util.List; +import java.util.function.Function; + +// typedef: indices.get_data_stream.Response + +@JsonpDeserializable +public class GetDataStreamResponse implements JsonpSerializable { + + private final List dataStreams; + + // --------------------------------------------------------------------------------------------- + + private GetDataStreamResponse(Builder builder) { + + this.dataStreams = ApiTypeHelper.unmodifiableRequired(builder.dataStreams, this, "dataStreams"); + + } + + public static GetDataStreamResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code data_streams} + */ + public final List dataStreams() { + return this.dataStreams; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.dataStreams)) { + generator.writeKey("data_streams"); + generator.writeStartArray(); + for (DataStreamInfo item : this.dataStreams) { + item.serialize(generator, mapper); + } + generator.writeEnd(); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetDataStreamResponse}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private List dataStreams; + + /** + * API name: {@code data_streams} + */ + public final Builder dataStreams(List list) { + this.dataStreams = _listAddAll(this.dataStreams, list); + return this; + } + + /** + * Builds a {@link GetDataStreamResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetDataStreamResponse build() { + _checkSingleUse(); + + return new GetDataStreamResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GetDataStreamResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GetDataStreamResponse::setupGetDataStreamResponseDeserializer); + + protected static void setupGetDataStreamResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::dataStreams, JsonpDeserializer.arrayDeserializer(DataStreamInfo._DESERIALIZER), "data_streams"); + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java index 87ebde9b49..b1b9db407e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java @@ -287,6 +287,34 @@ public final CompletableFuture create( return create(fn.apply(new CreateIndexRequest.Builder()).build()); } + // ----- Endpoint: indices.create_data_stream + + /** + * Creates a data stream + */ + + public CompletableFuture createDataStream(CreateDataStreamRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = + (JsonEndpoint) CreateDataStreamRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates a data stream + * + * @param fn + * a function that initializes a builder to create the {@link CreateDataStreamRequest} + */ + + public CompletableFuture createDataStream( + Function> fn) + throws IOException, OpenSearchException { + return createDataStream(fn.apply(new CreateDataStreamRequest.Builder()).build()); + } + // ----- Endpoint: indices.delete /** @@ -319,6 +347,36 @@ public final CompletableFuture delete( return delete(fn.apply(new DeleteIndexRequest.Builder()).build()); } + // ----- Endpoint: indices.delete_data_stream + + /** + * Deletes one or more data streams and their backing indices. + */ + + public CompletableFuture deleteDataStream(DeleteDataStreamRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = + (JsonEndpoint) DeleteDataStreamRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes one or more data streams and their backing indices. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteDataStreamRequest} + * + */ + + public final CompletableFuture deleteDataStream( + Function> fn) + throws IOException, OpenSearchException { + return deleteDataStream(fn.apply(new DeleteDataStreamRequest.Builder()).build()); + } + // ----- Endpoint: indices.delete_alias /** @@ -692,6 +750,48 @@ public final CompletableFuture get( return get(fn.apply(new GetIndexRequest.Builder()).build()); } + // ----- Endpoint: indices.get_data_stream + + /** + * Returns information about one or more data streams. + * + * + */ + + public CompletableFuture getDataStream(GetDataStreamRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = + (JsonEndpoint) GetDataStreamRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about one or more data streams. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetDataStreamRequest} + * + */ + + public final CompletableFuture getDataStream( + Function> fn) + throws IOException, OpenSearchException { + return getDataStream(fn.apply(new GetDataStreamRequest.Builder()).build()); + } + + /** + * Returns information about one or more data streams. + * + * + */ + + public CompletableFuture getDataStream() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(new GetDataStreamRequest.Builder().build(), GetDataStreamRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: indices.get_alias /** @@ -1611,6 +1711,49 @@ public CompletableFuture stats() throws IOException, OpenS IndicesStatsRequest._ENDPOINT, this.transportOptions); } + // ----- Endpoint: indices.data_streams_stats + + /** + * Returns statistics of data streams + * + * + */ + + public CompletableFuture dataStreamsStats( + DataStreamsStatsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = + (JsonEndpoint) DataStreamsStatsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns statistics of data streams + * + * @param fn + * a function that initializes a builder to create the + * {@link DataStreamsStatsRequest} + * + */ + + public final CompletableFuture dataStreamsStats( + Function> fn) + throws IOException, OpenSearchException { + return dataStreamsStats(fn.apply(new DataStreamsStatsRequest.Builder()).build()); + } + + /** + * Returns statistics of data streams + * + * + */ + + public CompletableFuture dataStreamsStats() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(new DataStreamsStatsRequest.Builder().build(), DataStreamsStatsRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: indices.update_aliases /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java index bd1ee0db85..3d1122a3aa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java @@ -262,6 +262,33 @@ public final CreateIndexResponse create(Function endpoint = + (JsonEndpoint) CreateDataStreamRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates a data stream + * + * @param fn + * a function that initializes a builder to create the {@link CreateDataStreamRequest} + */ + + public final CreateDataStreamResponse createDataStream( + Function> fn) + throws IOException, OpenSearchException { + return createDataStream(fn.apply(new CreateDataStreamRequest.Builder()).build()); + } + // ----- Endpoint: indices.delete /** @@ -292,6 +319,35 @@ public final DeleteIndexResponse delete(Function endpoint = + (JsonEndpoint) DeleteDataStreamRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes one or more data streams and their backing indices. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteDataStreamRequest} + * + */ + + public final DeleteDataStreamResponse deleteDataStream( + Function> fn) + throws IOException, OpenSearchException { + return deleteDataStream(fn.apply(new DeleteDataStreamRequest.Builder()).build()); + } + // ----- Endpoint: indices.delete_alias /** @@ -655,6 +711,47 @@ public final GetIndexResponse get(Function endpoint = + (JsonEndpoint) GetDataStreamRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about one or more data streams. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetDataStreamRequest} + * + */ + + public final GetDataStreamResponse getDataStream(Function> fn) + throws IOException, OpenSearchException { + return getDataStream(fn.apply(new GetDataStreamRequest.Builder()).build()); + } + + /** + * Returns information about one or more data streams. + * + * + */ + + public GetDataStreamResponse getDataStream() throws IOException, OpenSearchException { + return this.transport.performRequest(new GetDataStreamRequest.Builder().build(), GetDataStreamRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: indices.get_alias /** @@ -1551,6 +1648,47 @@ public IndicesStatsResponse stats() throws IOException, OpenSearchException { this.transportOptions); } + // ----- Endpoint: indices.data_streams_stats + + /** + * Returns statistics of data streams + * + * + */ + + public DataStreamsStatsResponse dataStreamsStats(DataStreamsStatsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = + (JsonEndpoint) DataStreamsStatsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns statistics of data streams + * + * @param fn + * a function that initializes a builder to create the + * {@link DataStreamsStatsRequest} + * + */ + + public final DataStreamsStatsResponse dataStreamsStats(Function> fn) + throws IOException, OpenSearchException { + return dataStreamsStats(fn.apply(new DataStreamsStatsRequest.Builder()).build()); + } + + /** + * Returns statistics of data streams + * + * + */ + + public DataStreamsStatsResponse dataStreamsStats() throws IOException, OpenSearchException { + return this.transport.performRequest(new DataStreamsStatsRequest.Builder().build(), DataStreamsStatsRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: indices.update_aliases /** diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java index c56556770a..f17d7b6167 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java @@ -10,11 +10,17 @@ import org.opensearch.client.opensearch.OpenSearchAsyncClient; import org.opensearch.client.opensearch._types.OpenSearchException; +import org.opensearch.client.opensearch.indices.CreateDataStreamResponse; import org.opensearch.client.opensearch.indices.CreateIndexResponse; +import org.opensearch.client.opensearch.indices.DataStream; +import org.opensearch.client.opensearch.indices.DataStreamsStatsResponse; +import org.opensearch.client.opensearch.indices.DeleteDataStreamResponse; +import org.opensearch.client.opensearch.indices.GetDataStreamResponse; import org.opensearch.client.opensearch.indices.GetIndexRequest; import org.opensearch.client.opensearch.indices.GetIndexResponse; import org.opensearch.client.opensearch.indices.GetIndicesSettingsRequest; import org.opensearch.client.opensearch.indices.IndexState; +import org.opensearch.client.opensearch.indices.PutIndexTemplateResponse; import org.opensearch.common.settings.Settings; import java.io.IOException; @@ -106,4 +112,80 @@ public void testGetSettingsNonExistentIndex() throws IOException { "no such index [index_that_doesnt_exist]"); } } + + public void testDataStream() throws IOException { + String dataStreamIndexTemplateName = "test-data-stream-template"; + String timestampFieldName = "my_timestamp_field"; + String namePattern = "test_data_stream-*"; + String dataStreamName = "test_data_stream-1"; + + // create an index template before creating data streams + PutIndexTemplateResponse putIndexTemplateResponse = javaClient().indices() + .putIndexTemplate(b -> b.name(dataStreamIndexTemplateName) + .dataStream(new DataStream.Builder() + .timestampField(bd -> bd.name(timestampFieldName)) + .build()) + .indexPatterns(namePattern)); + assertTrue(putIndexTemplateResponse.acknowledged()); + + // create data streams follow the index pattern + CreateDataStreamResponse createDataStreamResponse1 = javaClient().indices() + .createDataStream(b -> b.name(dataStreamName)); + assertTrue(createDataStreamResponse1.acknowledged()); + + // get data stream + GetDataStreamResponse getDataStreamResponse = javaClient().indices() + .getDataStream(b -> b.name(dataStreamName)); + assertEquals(1, getDataStreamResponse.dataStreams().size()); + assertEquals(dataStreamName, getDataStreamResponse.dataStreams().get(0).name()); + assertEquals(timestampFieldName, getDataStreamResponse.dataStreams().get(0).timestampField().name()); + assertEquals(dataStreamIndexTemplateName, getDataStreamResponse.dataStreams().get(0).template()); + assertNotNull(getDataStreamResponse.dataStreams().get(0).status()); + + // get all data streams + GetDataStreamResponse getAllDataStreamsResponse = javaClient().indices().getDataStream(); + assertEquals(1, getAllDataStreamsResponse.dataStreams().size()); + + // get one data stream stats + DataStreamsStatsResponse dataStreamStatsResponse = javaClient().indices() + .dataStreamsStats(b -> b.name(dataStreamName).human(true)); + assertNotNull(dataStreamStatsResponse.shards()); + assertEquals(1, dataStreamStatsResponse.dataStreamCount()); + assertEquals(1, dataStreamStatsResponse.backingIndices()); + assertTrue(dataStreamStatsResponse.totalStoreSizeBytes() > 0L); + assertNotNull(dataStreamStatsResponse.totalStoreSize()); + assertEquals(1, dataStreamStatsResponse.dataStreams().size()); + assertEquals(dataStreamName, dataStreamStatsResponse.dataStreams().get(0).dataStream()); + assertEquals(1, dataStreamStatsResponse.dataStreams().get(0).backingIndices()); + assertTrue(dataStreamStatsResponse.dataStreams().get(0).storeSizeBytes() > 0); + assertNotNull(dataStreamStatsResponse.dataStreams().get(0).storeSize()); + + // get all data streams stats + DataStreamsStatsResponse allDataStreamsStatsResponse = javaClient().indices() + .dataStreamsStats(b -> b.human(true)); + assertNotNull(allDataStreamsStatsResponse.shards()); + assertEquals(1, allDataStreamsStatsResponse.dataStreamCount()); + assertEquals(1, allDataStreamsStatsResponse.backingIndices()); + assertTrue(allDataStreamsStatsResponse.totalStoreSizeBytes() > 0L); + assertNotNull(allDataStreamsStatsResponse.totalStoreSize()); + assertEquals(1, allDataStreamsStatsResponse.dataStreams().size()); + assertEquals(dataStreamName, allDataStreamsStatsResponse.dataStreams().get(0).dataStream()); + assertEquals(1, allDataStreamsStatsResponse.dataStreams().get(0).backingIndices()); + assertTrue(allDataStreamsStatsResponse.dataStreams().get(0).storeSizeBytes() > 0); + assertNotNull(allDataStreamsStatsResponse.dataStreams().get(0).storeSize()); + + // delete data stream + DeleteDataStreamResponse deleteDataStreamResponse = javaClient().indices() + .deleteDataStream(b -> b.name(namePattern)); + assertTrue(deleteDataStreamResponse.acknowledged()); + + // verify data stream is deleted + try { + javaClient().indices().getDataStream(b -> b.name(dataStreamName)); + fail(); + } catch (OpenSearchException ex) { + assertNotNull(ex); + assertEquals(ex.status(), 404); + } + } } \ No newline at end of file diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java index fc6d8af05d..7a02d980d5 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -128,6 +128,10 @@ protected String getTestRestCluster() { @After protected void wipeAllOSIndices() throws IOException { + // wipe all data streams first, otherwise deleting backing indices will encounter exception + adminJavaClient().indices().deleteDataStream(b -> b.name("*")); + + // wipe all indices final IndicesResponse response = adminJavaClient() .cat() .indices(r -> r.headers("index,creation.date").expandWildcards(ExpandWildcard.All)); From defaa447942ad04cb0495c8d2b9c7256070399ee Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:04:46 -0400 Subject: [PATCH 033/123] Fix compilation issues (after changes in main) (#423) (#427) (cherry picked from commit 76916f4fc20044e771b3e7123989e6b39acf5ce9) Signed-off-by: Andriy Redko Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../opensearch/client/opensearch/IOUtils.java | 24 +++++++++++++++++++ .../OpenSearchJavaClientTestCase.java | 6 ++--- .../opensearch/json/JsonpMapperTest.java | 5 ++-- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/IOUtils.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/IOUtils.java b/java-client/src/test/java/org/opensearch/client/opensearch/IOUtils.java new file mode 100644 index 0000000000..b88bb3abbe --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/IOUtils.java @@ -0,0 +1,24 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch; + +import java.io.Closeable; +import java.io.IOException; + +public final class IOUtils { + public static void closeQueitly(final Closeable closeable) { + try { + if (closeable != null) { + closeable.close(); + } + } catch (final IOException | RuntimeException e) { + // Do nothing + } + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java index 7a02d980d5..6dacb20f41 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -11,6 +11,7 @@ import org.opensearch.Version; import org.opensearch.client.RestClient; import org.opensearch.client.RestClientBuilder; +import org.opensearch.client.opensearch.IOUtils; import org.opensearch.client.opensearch.OpenSearchClient; import org.opensearch.client.opensearch._types.ExpandWildcard; import org.opensearch.client.opensearch.cat.IndicesResponse; @@ -28,7 +29,6 @@ import org.junit.AfterClass; import org.junit.Before; import org.opensearch.common.settings.Settings; -import org.opensearch.core.internal.io.IOUtils; import org.opensearch.test.rest.OpenSearchRestTestCase; import java.io.IOException; @@ -147,11 +147,11 @@ protected void wipeAllOSIndices() throws IOException { public static void cleanupJavaClient() throws IOException { try { if (javaClient != null) { - IOUtils.close(javaClient._transport()); + IOUtils.closeQueitly(javaClient._transport()); } if (adminJavaClient != null) { - IOUtils.close(adminJavaClient._transport()); + IOUtils.closeQueitly(adminJavaClient._transport()); } } finally { clusterHosts = null; diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java index c365ff2632..f7b69e4082 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java @@ -36,6 +36,8 @@ import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.jackson.JacksonJsonpMapper; import org.opensearch.client.json.jsonb.JsonbJsonpMapper; +import org.opensearch.client.opensearch.IOUtils; + import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.databind.MappingJsonFactory; @@ -49,7 +51,6 @@ import jakarta.json.stream.JsonParser; import org.junit.Assert; import org.junit.Test; -import org.opensearch.core.internal.io.IOUtils; import java.io.StringReader; import java.io.StringWriter; @@ -116,7 +117,7 @@ public void testJacksonCustomJsonFactory() { } testDeserialize(mapper, writer.toString()); - IOUtils.closeWhileHandlingException(writer); + IOUtils.closeQueitly(writer); } @Test From 4230a1e28951af11b4b064736b2c353475e05fdd Mon Sep 17 00:00:00 2001 From: szczepanczykd <48957041+szczepanczykd@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:53:39 +0200 Subject: [PATCH 034/123] =?UTF-8?q?refactor:=20create=20AbstractAggregatio?= =?UTF-8?q?nRequestIT=20class=20+=20fail=20with=20OpenS=E2=80=A6=20(#436)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: create AbstractAggregationRequestIT class + fail with OpenS… (#421) * refactor: create AbstractAggregationRequestIT class + fail with OpenSearchException details if thrown (#407) Signed-off-by: Dominik Szczepanczyk * feature: upload IntegrationTests reports Signed-off-by: Dominik Szczepanczyk * fix: fixed workflow file Signed-off-by: Dominik Szczepanczyk * fix: upload reports on failure Signed-off-by: Dominik Szczepanczyk * refactor: add more error details to tests Signed-off-by: Dominik Szczepanczyk * feat: update github workflows with name and retention-days Signed-off-by: Dominik Szczepanczyk * test: create index with manual mappings Signed-off-by: Dominik Szczepanczyk * refactor: change expDate type from Date to String Signed-off-by: Dominik Szczepanczyk * refactor: stability check Signed-off-by: Dominik Szczepanczyk * refactor: stability check 2 Signed-off-by: Dominik Szczepanczyk * fix: change retention-days to 7 for uploaded artifacts Signed-off-by: Dominik Szczepanczyk * refactor: change expDate type to Long Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk (cherry picked from commit 765c80351113dae0650db15d3f7c254f2673e112) * fix: use HttpHost from apache package Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk --- .../workflows/test-integration-unreleased.yml | 8 + .github/workflows/test-integration.yml | 8 + .../AbstractAggregationRequestIT.java | 187 ++++++++++++++++++ .../httpclient5/AggregationRequestIT.java | 14 ++ .../restclient/AggregationRequestIT.java | 152 +------------- 5 files changed, 219 insertions(+), 150 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java diff --git a/.github/workflows/test-integration-unreleased.yml b/.github/workflows/test-integration-unreleased.yml index a136ed906c..7fd53b1eb1 100644 --- a/.github/workflows/test-integration-unreleased.yml +++ b/.github/workflows/test-integration-unreleased.yml @@ -55,3 +55,11 @@ jobs: run: | cd opensearch-java ./gradlew clean integrationTest -Dhttps=false + + - name: Upload Reports + if: failure() + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: opensearch-java/java-client/build/reports/ + retention-days: 7 diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 0c170ff080..0a554ccf31 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -36,6 +36,14 @@ jobs: - name: Run Integration Test run: ./gradlew clean integrationTest + - name: Upload Reports + if: failure() + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: java-client/build/reports/ + retention-days: 7 + - name: Stop Docker run: | docker-compose --project-directory .ci/opensearch down \ No newline at end of file diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java new file mode 100644 index 0000000000..1530024c6a --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java @@ -0,0 +1,187 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import org.junit.Test; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.aggregations.Aggregation; +import org.opensearch.client.opensearch._types.aggregations.AggregationRange; +import org.opensearch.client.opensearch._types.aggregations.DateRangeAggregation; +import org.opensearch.client.opensearch._types.aggregations.DateRangeExpression; +import org.opensearch.client.opensearch._types.aggregations.FieldDateMath; +import org.opensearch.client.opensearch._types.aggregations.RangeAggregation; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch.core.SearchResponse; + +import java.io.IOException; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.util.List; + +public abstract class AbstractAggregationRequestIT extends OpenSearchJavaClientTestCase { + + @Test + public void testValueRangeAggregation() throws Exception { + var index = "test-value-range-aggregation"; + createDateRangeDocuments(index); + var searchResponse = sendAggregateRequest(index, "cost_ranges", getCostValueRangeAggregation()); + var costRangesAggregations = searchResponse.aggregations().get("cost_ranges"); + var buckets = costRangesAggregations._get() + ._toAggregate() + .range() + .buckets() + .array(); + + assertEquals(3, buckets.size()); + assertEquals(2, buckets.get(0).docCount()); + assertEquals(2, buckets.get(1).docCount()); + assertEquals(2, buckets.get(2).docCount()); + } + + @Test + public void testDateRangeAggregation() throws Exception { + var index = "test-date-range-aggregation"; + createDateRangeDocuments(index); + var searchResponse = sendAggregateRequest(index, "expiry_ranges", getExpiryDateRangeAggregation()); + var expiryRangesAggregations = searchResponse.aggregations().get("expiry_ranges"); + var buckets = expiryRangesAggregations._get() + ._toAggregate() + .dateRange() + .buckets() + .array(); + + assertEquals(3, buckets.size()); + assertEquals(2, buckets.get(0).docCount()); + assertEquals(2, buckets.get(1).docCount()); + assertEquals(2, buckets.get(2).docCount()); + } + + private Aggregation getExpiryDateRangeAggregation() { + DateRangeAggregation expiryDateRangeAggregation = new DateRangeAggregation.Builder() + .field("expDate") + .ranges(getDateAggregationRanges()) + .build(); + return new Aggregation.Builder().dateRange(expiryDateRangeAggregation).build(); + } + + private Aggregation getCostValueRangeAggregation() { + RangeAggregation costValueRangeAggregation = new RangeAggregation.Builder() + .field("cost") + .ranges(getValueAggregationRanges()) + .build(); + return new Aggregation.Builder().range(costValueRangeAggregation).build(); + } + + private SearchResponse sendAggregateRequest(String index, String key, Aggregation value) throws IOException { + return javaClient().search( + request -> request.index(index) + .size(0) + .aggregations(key, value), + Void.class); + } + + private List getDateAggregationRanges() { + return List.of( + new DateRangeExpression.Builder() + .from(builder -> builder.value((double) getDatePlusDays(1).toEpochMilli())) + .to(FieldDateMath.of( + builder -> builder.value((double) getDatePlusDays(3).toEpochMilli() - 1000)) + ) + .key("from-1-to-2-days") + .build(), + new DateRangeExpression.Builder() + .from(builder -> builder.value((double) getDatePlusDays(3).toEpochMilli())) + .to(FieldDateMath.of( + builder -> builder.value((double) getDatePlusDays(5).toEpochMilli() - 1000)) + ) + .key("from-3-to-4-days") + .build(), + new DateRangeExpression.Builder() + .from(builder -> builder.value((double) getDatePlusDays(5).toEpochMilli())) + .to(FieldDateMath.of( + builder -> builder.value((double) getDatePlusDays(7).toEpochMilli() - 1000)) + ) + .key("from-5-to-6-days") + .build() + ); + } + + private List getValueAggregationRanges() { + return List.of( + new AggregationRange.Builder().to("10").build(), + new AggregationRange.Builder().from("10").to("30").build(), + new AggregationRange.Builder().from("30").build() + ); + } + + private void createDateRangeDocuments(String index) throws IOException { + createIndex(index); + javaClient().create(_1 -> _1.index(index).id("1").document(createProduct("egg", 2, 1)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2").document(createProduct("meat", 15, 2)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3").document(createProduct("ham", 30, 3)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("4").document(createProduct("cheese", 25, 4)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("5").document(createProduct("pasta", 8, 5)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("6").document(createProduct("oil", 50, 6)).refresh(Refresh.True)); + } + + private void createIndex(String index) throws IOException { + Property nameValueProp = new Property.Builder() + .text(v -> v) + .build(); + Property costValueProp = new Property.Builder() + .integer(v -> v) + .build(); + Property expDateKeywordProp = new Property.Builder() + .date(v -> v) + .build(); + javaClient().indices().create(c -> c.index(index) + .mappings(m -> m.properties("name", nameValueProp) + .properties("cost", costValueProp) + .properties("expDate", expDateKeywordProp) + ) + ); + } + + private ProductDetails createProduct(String name, int cost, int plusDays) { + return new ProductDetails(name, cost, getDatePlusDays(plusDays).toEpochMilli()); + } + + private Instant getDatePlusDays(int plusDays) { + return LocalDateTime.of(2023, 2, 20, 0, 0, 0, 0).plusDays(plusDays).toInstant(ZoneOffset.UTC); + } + + public static class ProductDetails { + private String name; + private int cost; + private Long expDate; + + public ProductDetails() { + } + + public ProductDetails(String name, int cost, Long expDate) { + this.name = name; + this.cost = cost; + this.expDate = expDate; + } + + public String getName() { + return name; + } + + public int getCost() { + return cost; + } + + public Long getExpDate() { + return expDate; + } + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java new file mode 100644 index 0000000000..b91aec9819 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractAggregationRequestIT; + +public class AggregationRequestIT extends AbstractAggregationRequestIT implements HttpClient5TransportSupport{ +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java index e5f1c4b00e..ff15c5d2a3 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java @@ -8,166 +8,18 @@ package org.opensearch.client.opensearch.integTest.restclient; -import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.http.HttpHost; -import org.junit.Test; import org.opensearch.client.json.jackson.JacksonJsonpMapper; -import org.opensearch.client.opensearch._types.Refresh; -import org.opensearch.client.opensearch._types.aggregations.Aggregation; -import org.opensearch.client.opensearch._types.aggregations.AggregationRange; -import org.opensearch.client.opensearch._types.aggregations.DateRangeAggregation; -import org.opensearch.client.opensearch._types.aggregations.DateRangeExpression; -import org.opensearch.client.opensearch._types.aggregations.FieldDateMath; -import org.opensearch.client.opensearch._types.aggregations.RangeAggregation; -import org.opensearch.client.opensearch.core.SearchResponse; -import org.opensearch.client.opensearch.integTest.AbstractRequestIT; +import org.opensearch.client.opensearch.integTest.AbstractAggregationRequestIT; import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.rest_client.RestClientTransport; import org.opensearch.common.settings.Settings; import java.io.IOException; -import java.time.LocalDateTime; -import java.time.ZoneOffset; -import java.util.Date; -import java.util.List; - -public class AggregationRequestIT extends AbstractRequestIT { +public class AggregationRequestIT extends AbstractAggregationRequestIT { @Override public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); } - - @Test - public void testValueRangeAggregation() throws Exception { - var index = "test-value-range-aggregation"; - createDateRangeDocuments(index); - var searchResponse = sendAggregateRequest(index, "cost_ranges", getCostValueRangeAggregation()); - var costRangesAggregations = searchResponse.aggregations().get("cost_ranges"); - var buckets = costRangesAggregations._get() - ._toAggregate() - .range() - .buckets() - .array(); - - assertEquals(3, buckets.size()); - assertEquals(2, buckets.get(0).docCount()); - assertEquals(2, buckets.get(1).docCount()); - assertEquals(2, buckets.get(2).docCount()); - } - - @Test - public void testDateRangeAggregation() throws Exception { - var index = "test-date-range-aggregation"; - createDateRangeDocuments(index); - var searchResponse = sendAggregateRequest(index, "expiry_ranges", getExpiryDateRangeAggregation()); - var expiryRangesAggregations = searchResponse.aggregations().get("expiry_ranges"); - var buckets = expiryRangesAggregations._get() - ._toAggregate() - .dateRange() - .buckets() - .array(); - - assertEquals(3, buckets.size()); - assertEquals(2, buckets.get(0).docCount()); - assertEquals(2, buckets.get(1).docCount()); - assertEquals(2, buckets.get(2).docCount()); - } - - private Aggregation getExpiryDateRangeAggregation() { - DateRangeAggregation expiryDateRangeAggregation = new DateRangeAggregation.Builder() - .field("expDate") - .ranges(getDateAggregationRanges()) - .build(); - return new Aggregation.Builder().dateRange(expiryDateRangeAggregation).build(); - } - - private Aggregation getCostValueRangeAggregation() { - RangeAggregation costValueRangeAggregation = new RangeAggregation.Builder() - .field("cost") - .ranges(getValueAggregationRanges()) - .build(); - return new Aggregation.Builder().range(costValueRangeAggregation).build(); - } - - private SearchResponse sendAggregateRequest(String index, String key, Aggregation value) throws IOException { - return javaClient().search( - request -> request.index(index) - .size(0) - .aggregations(key, value), - Void.class); - } - - private List getDateAggregationRanges() { - return List.of( - new DateRangeExpression.Builder() - .from(builder -> builder.value((double) getDatePlusDays(1).getTime())) - .to(FieldDateMath.of(builder -> builder.value((double) getDatePlusDays(3).getTime() - 1000))) - .key("from-1-to-2-days") - .build(), - new DateRangeExpression.Builder() - .from(builder -> builder.value((double) getDatePlusDays(3).getTime())) - .to(FieldDateMath.of(builder -> builder.value((double) getDatePlusDays(5).getTime() - 1000))) - .key("from-3-to-4-days") - .build(), - new DateRangeExpression.Builder() - .from(builder -> builder.value((double) getDatePlusDays(5).getTime())) - .to(FieldDateMath.of(builder -> builder.value((double) getDatePlusDays(7).getTime() - 1000))) - .key("from-5-to-6-days") - .build() - ); - } - - private List getValueAggregationRanges() { - return List.of( - new AggregationRange.Builder().to("10").build(), - new AggregationRange.Builder().from("10").to("30").build(), - new AggregationRange.Builder().from("30").build() - ); - } - - private void createDateRangeDocuments(String index) throws IOException { - javaClient().create(_1 -> _1.index(index).id("1").document(createProduct("egg", 2, 1)).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("2").document(createProduct("meat", 15, 2)).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("3").document(createProduct("ham", 30, 3)).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("4").document(createProduct("cheese", 25, 4)).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("5").document(createProduct("pasta", 8, 5)).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("6").document(createProduct("oil", 50, 6)).refresh(Refresh.True)); - } - - private ProductDetails createProduct(String name, int cost, int plusDays) { - return new ProductDetails(name, cost, getDatePlusDays(plusDays)); - } - - private Date getDatePlusDays(int plusDays) { - return java.sql.Date.from(LocalDateTime.of(2023, 2, 20, 0, 0, 0).plusDays(plusDays).toInstant(ZoneOffset.UTC)); - } - - public static class ProductDetails { - private String name; - private int cost; - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS") - private Date expDate; - - public ProductDetails() { - } - - public ProductDetails(String name, int cost, Date expDate) { - this.name = name; - this.cost = cost; - this.expDate = expDate; - } - - public String getName() { - return name; - } - - public int getCost() { - return cost; - } - - public Date getExpDate() { - return expDate; - } - } } From e2869c07e8655e3845fe9660c9bbaa6e5e484f30 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Tue, 11 Apr 2023 10:48:27 -0700 Subject: [PATCH 035/123] Increment version to 2.4.0 (#438) Signed-off-by: Vacha Shah --- COMPATIBILITY.md | 1 + gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 440dcb4f11..6e640f7016 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -12,6 +12,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | 2.1.0 | 1.3.3-2.3.0 | | 2.2.0 | 1.3.3-2.5.0 | | 2.3.0 | 1.3.3-2.6.0 | +| 2.4.0 | 1.3.3-2.6.0 | ## Upgrading diff --git a/gradle.properties b/gradle.properties index 921a8c7a41..0600970b08 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -systemProp.version = 2.3.0 +systemProp.version = 2.4.0 From 7c021c286377dd5f06883b0c46d44218fac42567 Mon Sep 17 00:00:00 2001 From: szczepanczykd <48957041+szczepanczykd@users.noreply.github.com> Date: Wed, 12 Apr 2023 19:36:15 +0200 Subject: [PATCH 036/123] Backport/backport 442 to 2.x (#445) * fix: add missing highlight and source field in MultisearchBody.Builder (#442) * fix: add missing highlight and source field in MultisearchBody.Builder Signed-off-by: Dominik Szczepanczyk * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk * fix: use apache HttpHost Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk --- CHANGELOG.md | 1 + .../core/msearch/MultisearchBody.java | 77 +++++++ .../AbstractMultiSearchRequestIT.java | 196 ++++++++++++++++++ .../httpclient5/MultiSearchRequestIT.java | 14 ++ .../restclient/MultiSearchRequestIT.java | 25 +++ 5 files changed, 313 insertions(+) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b3033aecf..eb4771c7c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) - Bulk UpdateOperation misses upsert options ([#353](https://github.com/opensearch-project/opensearch-java/pull/353)) - Fix missing key property in the RangeBucket ([#370](https://github.com/opensearch-project/opensearch-java/pull/370)) +- Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java index 24b6fa98f7..8fb418a153 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java @@ -38,6 +38,8 @@ import org.opensearch.client.opensearch._types.aggregations.Aggregation; import org.opensearch.client.opensearch._types.query_dsl.Query; +import org.opensearch.client.opensearch.core.search.Highlight; +import org.opensearch.client.opensearch.core.search.SourceConfig; import org.opensearch.client.opensearch.core.search.Suggester; import org.opensearch.client.opensearch.core.search.TrackHits; import org.opensearch.client.json.JsonpDeserializable; @@ -77,6 +79,12 @@ public class MultisearchBody implements JsonpSerializable { @Nullable private final Suggester suggest; + @Nullable + private Highlight highlight; + + @Nullable + private SourceConfig source; + // --------------------------------------------------------------------------------------------- private MultisearchBody(Builder builder) { @@ -87,6 +95,8 @@ private MultisearchBody(Builder builder) { this.size = builder.size; this.trackTotalHits = builder.trackTotalHits; this.suggest = builder.suggest; + this.highlight = builder.highlight; + this.source = builder.source; } @@ -141,6 +151,22 @@ public final Suggester suggest() { return this.suggest; } + /** + * API name: {@code highlight} + */ + @Nullable + public final Highlight highlight() { + return this.highlight; + } + + /** + * API name: {@code _source} + */ + @Nullable + public final SourceConfig source() { + return this.source; + } + /** * Serialize this object to JSON. */ @@ -189,6 +215,18 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } + if (this.highlight != null) { + generator.writeKey("highlight"); + this.highlight.serialize(generator, mapper); + + } + + if (this.source != null) { + generator.writeKey("_source"); + this.source.serialize(generator, mapper); + + } + } // --------------------------------------------------------------------------------------------- @@ -216,6 +254,13 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder @@ -306,6 +351,36 @@ public final Builder suggest(Function> fn) { + return this.highlight(fn.apply(new Highlight.Builder()).build()); + } + + /** + * API name: {@code _source} + */ + public final Builder source(@Nullable SourceConfig value) { + this.source = value; + return this; + } + + /** + * API name: {@code _source} + */ + public final Builder source(Function> fn) { + return this.source(fn.apply(new SourceConfig.Builder()).build()); + } + /** * Builds a {@link MultisearchBody}. * @@ -336,6 +411,8 @@ protected static void setupMultisearchBodyDeserializer(ObjectDeserializer response = sendMSearchRequest(index, List.of(largeItemsQuery, mediumItemsQuery, smallItemsQuery)); + assertEquals(3, response.responses().size()); + assertEquals(2, response.responses().get(0).result().hits().hits().size()); + assertEquals(2, response.responses().get(1).result().hits().hits().size()); + assertEquals(2, response.responses().get(2).result().hits().hits().size()); + } + + @Test + public void shouldReturnHighlightsInMultipleSearches() throws Exception { + String index = "multiple_searches_request_with_highlights"; + createTestDocuments(index); + + RequestItem largeItemsQuery = createMSearchQueryWithHighlight("large"); + RequestItem mediumItemsQuery = createMSearchQueryWithHighlight("medium"); + RequestItem smallItemsQuery = createMSearchQueryWithHighlight("small"); + + MsearchResponse response = sendMSearchRequest(index, List.of(largeItemsQuery, mediumItemsQuery, smallItemsQuery)); + assertEquals(3, response.responses().size()); + assertResponseHighlights(response.responses().get(0)); + assertResponseHighlights(response.responses().get(1)); + assertResponseHighlights(response.responses().get(2)); + } + + @Test + public void shouldReturnMultiSearchesWithSelectedSourceFieldsOnly() throws Exception { + String index = "multiple_searches_request_with_sources"; + createTestDocuments(index); + + RequestItem largeItemsQuery = createMSearchQueryWithSelectedSourceFields("large"); + RequestItem mediumItemsQuery = createMSearchQueryWithSelectedSourceFields("medium"); + RequestItem smallItemsQuery = createMSearchQueryWithSelectedSourceFields("small"); + + MsearchResponse response = sendMSearchRequest(index, List.of(largeItemsQuery, mediumItemsQuery, smallItemsQuery)); + assertEquals(3, response.responses().size()); + assertResponseSources(response.responses().get(0)); + assertResponseSources(response.responses().get(1)); + assertResponseSources(response.responses().get(2)); + } + + private void assertResponseSources(MultiSearchResponseItem response) { + List> hitsWithHighlights = response.result().hits().hits(); + assertEquals(2, hitsWithHighlights.size()); + for (Hit shopItemHit : hitsWithHighlights) { + assertNotNull(shopItemHit.source()); + assertNotNull(shopItemHit.source().getName()); + assertNotNull(shopItemHit.source().getSize()); + assertNull(shopItemHit.source().getCompany()); + } + } + + private void assertResponseHighlights(MultiSearchResponseItem response) { + List> hitsWithHighlights = response.result().hits().hits(); + assertEquals(2, hitsWithHighlights.size()); + assertEquals(1, hitsWithHighlights.get(0).highlight().size()); + assertEquals(1, hitsWithHighlights.get(1).highlight().size()); + } + + private RequestItem createMSearchQuery(String itemSize) { + return createMSearchQuery(itemSize, null, List.of()); + } + + private RequestItem createMSearchQueryWithHighlight(String itemSize) { + return createMSearchQuery(itemSize, "size", List.of()); + } + + private RequestItem createMSearchQueryWithSelectedSourceFields(String itemSize) { + return createMSearchQuery(itemSize, null, List.of("name", "size")); + } + + private RequestItem createMSearchQuery(String itemSize, String fieldName, List sources) { + return RequestItem.of(item -> item.header(header -> header) + .body(body -> body.query(createItemSizeSearchQuery(itemSize)) + .highlight(createHighlight(fieldName)) + .source(createSourcesConfig(sources)) + ) + ); + } + + private SourceConfig createSourcesConfig(List sources) { + return sources.isEmpty() ? null : SourceConfig.of(builder -> builder.filter(filter -> filter.includes(sources))); + } + + private Highlight createHighlight(String fieldName) { + return fieldName != null ? Highlight.of( + builder -> builder.fields( + fieldName, HighlightField.of( + field -> field.preTags("") + .postTags("") + ) + ) + ) : null; + } + + private Query createItemSizeSearchQuery(String itemSize) { + return Query.of(query -> query.bool(builder -> builder.filter( + filter -> filter.term( + TermQuery.of(term -> term.field("size") + .value(FieldValue.of(itemSize)) + ) + ) + ))); + } + + private MsearchResponse sendMSearchRequest(String index, List searches) throws IOException { + return javaClient().msearch(builder -> builder.index(List.of(index)).searches(searches), ShopItem.class); + } + + private void createTestDocuments(String index) throws IOException { + javaClient().create(_1 -> _1.index(index).id("1").document(createItem("hammer", "large", "yes")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2").document(createItem("drill", "large", "yes")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3").document(createItem("jack", "medium", "yes")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("4").document(createItem("wrench", "medium", "no")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("5").document(createItem("screws", "small", "no")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("6").document(createItem("nuts", "small", "no")).refresh(Refresh.True)); + } + + private ShopItem createItem(String name, String size, String company) { + return new ShopItem(name, size, company); + } + + public static class ShopItem { + private String name; + private String size; + private String company; + + public ShopItem() { + } + + public ShopItem(String name, String size, String company) { + this.name = name; + this.size = size; + this.company = company; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size; + } + + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company; + } + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java new file mode 100644 index 0000000000..e4b85a7891 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractMultiSearchRequestIT; + +public class MultiSearchRequestIT extends AbstractMultiSearchRequestIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java new file mode 100644 index 0000000000..606cf8be2d --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractMultiSearchRequestIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +import java.io.IOException; + +public class MultiSearchRequestIT extends AbstractMultiSearchRequestIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} From 573ac7f39eb4c309695164d6b91fb9910fb4fd73 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 12 Apr 2023 14:34:44 -0700 Subject: [PATCH 037/123] Fixing changelog for the 2.x branch (#447) Signed-off-by: Vacha Shah --- CHANGELOG.md | 87 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4771c7c7..d6935e56a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,35 +3,86 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +### Added + +### Dependencies + +### Changed + +### Deprecated + +### Removed + +### Fixed +- Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) + +### Security + +## [2.4.0] - 04/11/2023 + +### Added +- Add buffered lookahead for Jackson ([#338](https://github.com/opensearch-project/opensearch-java/pull/338)) +- Add support for headers and sort parameters in cat requests ([#413](https://github.com/opensearch-project/opensearch-java/pull/413)) +- Add support for data stream operations ([#419](https://github.com/opensearch-project/opensearch-java/pull/419)) + +### Dependencies +- Bumps `io.github.classgraph:classgraph` from 4.8.156 to 4.8.157 ([#408](https://github.com/opensearch-project/opensearch-java/pull/408)) + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + +## [2.3.0] - 03/15/2023 + +### Added +- Require two maintainers to approve release ([#383](https://github.com/opensearch-project/opensearch-java/pull/383)) +- Add support for mapping limit settings ([#382](https://github.com/opensearch-project/opensearch-java/pull/382)) + +### Dependencies +- Bumps `Jackson` from 2.14.1 to 2.14.2 ([#357](https://github.com/opensearch-project/opensearch-java/pull/357)) +- Bumps `classgraph` from 4.8.149 to 4.8.156 ([#395](https://github.com/opensearch-project/opensearch-java/pull/395)) + +### Changed +- Prevent SPI calls at runtime ([#293](https://github.com/opensearch-project/opensearch-java/pull/293)) + +### Deprecated + +### Removed + +### Fixed +- Fix issue where completion suggestions were failing, due to being parsed as term suggestions ([#350](https://github.com/opensearch-project/opensearch-java/pull/350)) +- Bulk UpdateOperation misses upsert options ([#353](https://github.com/opensearch-project/opensearch-java/pull/353)) +- Fix missing key property in the RangeBucket ([#381](https://github.com/opensearch-project/opensearch-java/pull/381)) + +### Security + +## [2.2.0] - 01/23/2023 + ### Added - Add Github workflow for changelog verification ([#239](https://github.com/opensearch-project/opensearch-java/pull/239)) - Add Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247)) - Add support for signing service name in AwsSdk2Transport ([#324](https://github.com/opensearch-project/opensearch-java/pull/324)) - Add new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328)) - Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321)) -- Require two maintainers to approve release ([#383](https://github.com/opensearch-project/opensearch-java/pull/383)) -- Add support for mapping limit settings ([#382](https://github.com/opensearch-project/opensearch-java/pull/382)) -- Add buffered lookahead for Jackson ([#338](https://github.com/opensearch-project/opensearch-java/pull/338)) -- Add support for headers and sort parameters in cat requests ([#388](https://github.com/opensearch-project/opensearch-java/issues/388)) -- Add support for data stream operations ([#416](https://github.com/opensearch-project/opensearch-java/pull/416)) - +- Add support for OpenSearch Serverless ([#339](https://github.com/opensearch-project/opensearch-java/pull/339)) +- Add support to parse sub-aggregations from filter/nested aggregations ([#234](https://github.com/opensearch-project/opensearch-java/pull/234)) + ### Dependencies - Bumps `grgit-gradle` from 4.0.1 to 5.0.0 - Update Jackson to 2.14.0 ([#259](https://github.com/opensearch-project/opensearch-java/pull/259)) -- Bumps `Jackson` from 2.14.1 to 2.14.2 ([#357](https://github.com/opensearch-project/opensearch-java/pull/357)) -- Bumps `classgraph` from 4.8.149 to 4.8.156 ([#395](https://github.com/opensearch-project/opensearch-java/pull/395)) -- Bumps `io.github.classgraph:classgraph` from 4.8.156 to 4.8.157 ([#408](https://github.com/opensearch-project/opensearch-java/pull/408)) +- Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) ### Changed - Update literature around changelog contributions in CONTRIBUTING.md ([#242](https://github.com/opensearch-project/opensearch-java/pull/242)) - Update tests to use JUnit's Assert ([#244](https://github.com/opensearch-project/opensearch-java/pull/244)) -- Add support to parse sub-aggregations from filter/nested aggregations ([#234](https://github.com/opensearch-project/opensearch-java/pull/234)) - Add timeout and throttle to the jenkins workflows ([#231](https://github.com/opensearch-project/opensearch-java/pull/231)) - Update maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) -- Update Gradle to 7.6 ([#311](https://github.com/opensearch-project/opensearch-java/pull/311)) -- Add support for OpenSearch Serverless ([#339](https://github.com/opensearch-project/opensearch-java/pull/339)) -- Fix issue where completion suggestions were failing, due to being parsed as term suggestions ([#107](https://github.com/opensearch-project/opensearch-java/issues/107)) -- Prevent SPI calls at runtime ([#293](https://github.com/opensearch-project/opensearch-java/pull/293)) ### Deprecated @@ -43,10 +94,12 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix /_nodes/stats, /_nodes/info throwing serialization error ([#315](https://github.com/opensearch-project/opensearch-java/pull/315)) - Do not double-wrap OpenSearchException on error ([#323](https://github.com/opensearch-project/opensearch-java/pull/323)) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) -- Bulk UpdateOperation misses upsert options ([#353](https://github.com/opensearch-project/opensearch-java/pull/353)) -- Fix missing key property in the RangeBucket ([#370](https://github.com/opensearch-project/opensearch-java/pull/370)) - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) ### Security -[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/2.0...HEAD + +[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/v2.4.0...2.x +[2.4.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.3.0...v2.4.0 +[2.3.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.2.0...v2.3.0 +[2.2.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.1.0...v2.2.0 From d358a5a303dc9fce0daec3f95a967efd4c0dcf6e Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 12 Apr 2023 17:40:18 -0700 Subject: [PATCH 038/123] Fixing issue when tracktotalhits is disabled (#372) (#449) * Fixing issue when tracktotalhits is disabled * Update Changelog --------- Signed-off-by: Vacha Shah Co-authored-by: Daniel (dB.) Doubrovkine --- CHANGELOG.md | 1 + .../opensearch/core/search/HitsMetadata.java | 16 ++++++---- .../integTest/AbstractRequestIT.java | 32 +++++++++++++++++++ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6935e56a4..161be7d318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) +- Fix search failure with missing required property HitsMetadata.total when trackTotalHits is disabled ([#372](https://github.com/opensearch-project/opensearch-java/pull/372)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java index caf3a255a5..86bd9dce6f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java @@ -56,6 +56,7 @@ public class HitsMetadata implements JsonpSerializable { + @Nullable private final TotalHits total; private final List> hits; @@ -70,7 +71,7 @@ public class HitsMetadata implements JsonpSerializable { private HitsMetadata(Builder builder) { - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.total = builder.total; this.hits = ApiTypeHelper.unmodifiableRequired(builder.hits, this, "hits"); this.maxScore = builder.maxScore; this.tSerializer = builder.tSerializer; @@ -82,7 +83,7 @@ public static HitsMetadata of(Function, ObjectBuilder extends ObjectBuilderBase implements ObjectBuilder> { + @Nullable private TotalHits total; private List> hits; @@ -153,7 +157,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilde private JsonpSerializer tSerializer; /** - * Required - API name: {@code total} + * API name: {@code total} */ public final Builder total(TotalHits value) { this.total = value; @@ -161,7 +165,7 @@ public final Builder total(TotalHits value) { } /** - * Required - API name: {@code total} + * API name: {@code total} */ public final Builder total(Function> fn) { return this.total(fn.apply(new TotalHits.Builder()).build()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index 0ca4db2b4b..586abd49d9 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -58,6 +58,7 @@ import org.opensearch.client.opensearch.core.search.CompletionSuggester; import org.opensearch.client.opensearch.core.search.FieldSuggester; import org.opensearch.client.opensearch.core.search.FieldSuggesterBuilders; +import org.opensearch.client.opensearch.core.search.Hit; import org.opensearch.client.opensearch.core.search.Suggester; import org.opensearch.client.opensearch.indices.CreateIndexResponse; import org.opensearch.client.opensearch.indices.GetIndexResponse; @@ -314,6 +315,37 @@ public void testBulkRequest() throws IOException { assertEquals(42, javaClient().get(b -> b.index("foo").id("abc"), AppData.class).source().getIntValue()); } + @Test + public void testTrackTotalHitsFalse() throws Exception { + // https://github.com/opensearch-project/opensearch-java/issues/354 + String index = "ingest-test"; + + javaClient().indices().create(b -> b.index(index)); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + javaClient().index(b -> b + .index(index) + .id("myId") + .document(appData) + .refresh(Refresh.True) // Make it visible for search + ).id(); + + // Search + SearchResponse search = javaClient().search(b -> b + .index(index) + .trackTotalHits(t -> t.enabled(false)) + , AppData.class + ); + + List> hits = search.hits().hits(); + AppData appDataResult = search.hits().hits().get(0).source(); + assertEquals(1337, appDataResult.getIntValue()); + assertEquals("foo", appDataResult.getMsg()); + } + @Test public void testRefresh() throws IOException { AppData appData = new AppData(); From 7a80b89a739c87f9f06d4ee3ba6361c6b73b6dd2 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 12 Apr 2023 17:40:35 -0700 Subject: [PATCH 039/123] Add javadoc link for the client (#448) Signed-off-by: Vacha Shah --- README.md | 1 + USER_GUIDE.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a0563ca3d7..6b2638a067 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Please see the [USER_GUIDE](USER_GUIDE.md) for code snippets. * [Project Website](https://opensearch.org/) * [Documentation](https://opensearch.org/docs/latest/clients/java/) +* [JavaDoc](https://www.javadoc.io/doc/org.opensearch.client/opensearch-java/latest/index.html) * [Maven Central](https://search.maven.org/artifact/org.opensearch.client/opensearch-java) * [Snapshot Builds](https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/client/opensearch-java/) * Need help? Try [Forums](https://discuss.opendistrocommunity.dev/) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 6e76aa90d8..c024320632 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -19,11 +19,11 @@ - [Create a data stream](#create-a-data-stream) - [Get data stream](#get-data-stream) - [Data stream stats](#data-stream-stats) - - [Delete data stream](#delete-data-stream-and-backing-indices) + - [Delete data stream and backing indices](#delete-data-stream-and-backing-indices) - [Cat API](#cat-api) - [Cat Indices](#cat-indices) - - [Cat Aliases](#cat-aliases) - - [Cat Nodes](#cat-nodes) + - [Cat aliases](#cat-aliases) + - [Cat nodes](#cat-nodes) - [Using different transport options](#using-different-transport-options) - [Amazon Managed OpenSearch](#amazon-managed-opensearch) From f0d3f7d9366782d4aef5c051c98d3dbee9eaa8c1 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Thu, 13 Apr 2023 14:05:59 -0700 Subject: [PATCH 040/123] Backport workflow improvements and increment version (#446) * Improve time taken by Github actions (#439) * Improve time taken by Github actions Signed-off-by: Vacha Shah * Add Changelog Signed-off-by: Vacha Shah * Fixing distribution and adding cache Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah * Fixing Changelog Signed-off-by: Vacha Shah * Increment to version 2.5.0 Signed-off-by: Vacha Shah * Fixing Changelog Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah --- .github/workflows/build.yml | 10 +++-- .github/workflows/checkstyle.yml | 8 +++- .github/workflows/dependabot_pr.yml | 2 +- .github/workflows/links.yml | 2 +- .github/workflows/release-drafter.yml | 6 ++- .../workflows/test-integration-unreleased.yml | 43 +++++++++++++------ .github/workflows/test-integration.yml | 10 +++-- .github/workflows/test-unit.yml | 10 +++-- CHANGELOG.md | 1 + gradle.properties | 2 +- 10 files changed, 63 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 668fc8b7b5..b51c25c85a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,13 +10,15 @@ jobs: java: [ 11 ] os: [ubuntu-latest, windows-latest, macOS-latest] steps: + - name: Checkout Java Client + uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} - - - name: Checkout Branch - uses: actions/checkout@v2 + distribution: 'temurin' + cache: 'gradle' - name: Build with Gradle run: ./gradlew clean build -x test diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml index ecc9129902..eb0ea0b887 100644 --- a/.github/workflows/checkstyle.yml +++ b/.github/workflows/checkstyle.yml @@ -9,12 +9,16 @@ jobs: matrix: java: [ 11 ] steps: + - name: Checkout Java Client + uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: 'gradle' - - uses: actions/checkout@v2 - name: Check style and license headers run: | ./gradlew checkstyleMain checkstyleTest diff --git a/.github/workflows/dependabot_pr.yml b/.github/workflows/dependabot_pr.yml index f13889c13d..ffcdd521c1 100644 --- a/.github/workflows/dependabot_pr.yml +++ b/.github/workflows/dependabot_pr.yml @@ -18,7 +18,7 @@ jobs: installation_id: 22958780 - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ steps.github_app_token.outputs.token }} diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 2b1a29fb3d..f5d2b8dd6e 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: lychee Link Checker id: lychee uses: lycheeverse/lychee-action@v1.5.0 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 72bc8a69ca..4374158a6c 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -25,9 +25,11 @@ jobs: issue-body: "Please approve or deny the release of opensearch-java. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}" exclude-workflow-initiator-as-approver: true - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: '11' + distribution: 'temurin' + cache: 'gradle' - name: Build with Gradle run: | export VERSION=`cat gradle.properties | grep "systemProp.version" | tr -d " " | cut -d '=' -f2` diff --git a/.github/workflows/test-integration-unreleased.yml b/.github/workflows/test-integration-unreleased.yml index 7fd53b1eb1..d1509fc039 100644 --- a/.github/workflows/test-integration-unreleased.yml +++ b/.github/workflows/test-integration-unreleased.yml @@ -18,36 +18,55 @@ jobs: - { opensearch_ref: '1.x', java: 11 } - { opensearch_ref: '2.x', java: 11 } - { opensearch_ref: '2.x', java: 17 } - - { opensearch_ref: '2.0', java: 11 } - { opensearch_ref: 'main', java: 11 } - { opensearch_ref: 'main', java: 17 } steps: - name: Set up JDK ${{ matrix.entry.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.entry.java }} + distribution: 'temurin' - name: Checkout OpenSearch - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: opensearch-project/OpenSearch ref: ${{ matrix.entry.opensearch_ref }} path: opensearch + - name: Get OpenSearch branch top + id: get-key + working-directory: opensearch + run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT + + - name: Restore cached build + id: cache-restore + uses: actions/cache/restore@v3 + with: + path: opensearch/distribution/archives/linux-tar/build/distributions + key: ${{ steps.get-key.outputs.key }} + - name: Assemble OpenSearch - run: | - cd opensearch - ./gradlew assemble + if: steps.cache-restore.outputs.cache-hit != 'true' + working-directory: opensearch + run: ./gradlew :distribution:archives:linux-tar:assemble + + - name: Save cached build + if: steps.cache-restore.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: opensearch/distribution/archives/linux-tar/build/distributions + key: ${{ steps.get-key.outputs.key }} - # This step runs the docker image generated during gradle assemble in OpenSearch. It is tagged as opensearch:test. - # Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190 - - name: Run Docker Image + - name: Run OpenSearch + working-directory: opensearch/distribution/archives/linux-tar/build/distributions run: | - docker run -p 9200:9200 -p 9600:9600 -d -e "discovery.type=single-node" -e "bootstrap.memory_lock=true" opensearch:test - sleep 90 + tar xf opensearch-min-* + ./opensearch-*/bin/opensearch & + for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done - name: Checkout Java Client - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: opensearch-java diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 0a554ccf31..5f76dfd2a2 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -20,13 +20,15 @@ jobs: - { opensearch_version: 2.4.1, java: 11 } - { opensearch_version: 2.5.0, java: 11 } steps: + - name: Checkout Java Client + uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.entry.java }} - - - name: Checkout Branch - uses: actions/checkout@v2 + distribution: 'temurin' + cache: 'gradle' - name: Run Docker run: | diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index fbfe15671c..70f591553c 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -10,13 +10,15 @@ jobs: java: [ 11 ] os: [ubuntu-latest, windows-latest, macOS-latest] steps: + - name: Checkout Java Client + uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} - - - name: Checkout Branch - uses: actions/checkout@v2 + distribution: 'temurin' + cache: 'gradle' - name: Run Unit Test run: ./gradlew clean unitTest diff --git a/CHANGELOG.md b/CHANGELOG.md index 161be7d318..074bea5cba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies ### Changed +- Improve time taken by Github actions by using cache ([#439](https://github.com/opensearch-project/opensearch-java/pull/439)) ### Deprecated diff --git a/gradle.properties b/gradle.properties index 0600970b08..e6f6009118 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -systemProp.version = 2.4.0 +systemProp.version = 2.5.0 From 34e544f4d74867f0da018065eeaaa49983a3fca5 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 14 Apr 2023 11:44:39 -0700 Subject: [PATCH 041/123] [Backport 2.x] Publish snapshots from 2.x branch (#451) (#454) * Publish snapshots from 2.x branch (#451) Signed-off-by: Vacha Shah * Add Changelog Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah --- .github/workflows/publish-snapshots.yml | 34 +++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/publish-snapshots.yml diff --git a/.github/workflows/publish-snapshots.yml b/.github/workflows/publish-snapshots.yml new file mode 100644 index 0000000000..3fb806f6d7 --- /dev/null +++ b/.github/workflows/publish-snapshots.yml @@ -0,0 +1,34 @@ +name: Publish snapshots to maven + +on: + push: + branches: + - main + - '2.x' + +jobs: + build-and-publish-snapshots: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: 'gradle' + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} + aws-region: us-east-1 + - name: publish snapshots to maven + run: | + export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) + export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) + echo "::add-mask::$SONATYPE_USERNAME" + echo "::add-mask::$SONATYPE_PASSWORD" + ./gradlew --no-daemon publishPublishMavenPublicationToSnapshotsRepository \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 074bea5cba..27c01e60ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added +- Add workflow to publish snapshots via GHA ([#454](https://github.com/opensearch-project/opensearch-java/pull/454)) ### Dependencies From 1320f3e05005e4579abdf50768514a2911d42715 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 14 Apr 2023 12:10:34 -0700 Subject: [PATCH 042/123] [Backport 2.x] Add workflow to publish snapshots via GHA (#325) (#455) * Add workflow to publish snapshots via GHA (#325) * Add workflow to publish snapshots via GHA Signed-off-by: Sayali Gaikawad * Fix task name Signed-off-by: Sayali Gaikawad * Fix conflict and add documentation Signed-off-by: Sayali Gaikawad Signed-off-by: Sayali Gaikawad Signed-off-by: Vacha Shah * Fixing documentation for snapshot builds Signed-off-by: Vacha Shah --------- Signed-off-by: Sayali Gaikawad Signed-off-by: Vacha Shah Co-authored-by: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> --- README.md | 6 +++- java-client/build.gradle.kts | 7 ++-- jenkins/publish-snapshot.jenkinsfile | 50 ---------------------------- 3 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 jenkins/publish-snapshot.jenkinsfile diff --git a/README.md b/README.md index 6b2638a067..1c73fe5a95 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ OpenSearch Java Client - [Project Resources](#project-resources) - [Code of Conduct](#code-of-conduct) - [User Guide](#user-guide) +- [Snapshot Builds](#snapshot-builds) - [Compatibility with OpenSearch](#compatibility-with-opensearch) - [Security](#security) - [License](#license) @@ -35,7 +36,7 @@ Please see the [USER_GUIDE](USER_GUIDE.md) for code snippets. * [Documentation](https://opensearch.org/docs/latest/clients/java/) * [JavaDoc](https://www.javadoc.io/doc/org.opensearch.client/opensearch-java/latest/index.html) * [Maven Central](https://search.maven.org/artifact/org.opensearch.client/opensearch-java) -* [Snapshot Builds](https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/client/opensearch-java/) +* [Snapshot Builds](#snapshot-builds) * Need help? Try [Forums](https://discuss.opendistrocommunity.dev/) * [Project Principles](https://opensearch.org/#principles) * [Contributing to OpenSearch](CONTRIBUTING.md) @@ -52,6 +53,9 @@ This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUC See [User Guide](USER_GUIDE.md). +## Snapshot Builds +The [snapshots builds](https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/client/opensearch-java/) are published to sonatype using [publish-snapshots.yml](./.github/workflows/publish-snapshots.yml) workflow. + ## Compatibility with OpenSearch See [Compatibility](COMPATIBILITY.md). diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 7f482efd60..463e7b0f18 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -260,8 +260,11 @@ publishing { repositories{ if (version.toString().endsWith("SNAPSHOT")) { maven("https://aws.oss.sonatype.org/content/repositories/snapshots/") { - name = "snapshotRepo" - credentials(PasswordCredentials::class) + name = "Snapshots" + credentials { + username = System.getenv("SONATYPE_USERNAME") + password = System.getenv("SONATYPE_PASSWORD") + } } } maven("${rootProject.buildDir}/repository") { diff --git a/jenkins/publish-snapshot.jenkinsfile b/jenkins/publish-snapshot.jenkinsfile deleted file mode 100644 index 73ffdce604..0000000000 --- a/jenkins/publish-snapshot.jenkinsfile +++ /dev/null @@ -1,50 +0,0 @@ -pipeline { - options { - timeout(time: 30, unit: 'MINUTES') - throttleJobProperty( - categories: [], - limitOneJobWithMatchingParams: false, - maxConcurrentPerNode: 0, - maxConcurrentTotal: 1, - paramsToUseForLimit: '', - throttleEnabled: true, - throttleOption: 'project', - ) - } - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image 'opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2' - args '-e JAVA_HOME=/opt/java/openjdk-11' - alwaysPull true - } - } - triggers { - GenericTrigger( - genericVariables: [ - [key: 'ref', value: '$.ref'], - ], - tokenCredentialId: 'jenkins-opensearch-java-generic-webhook-token', - causeString: 'A commit was pushed on opensearch-project/opensearch-java repository main branch causing this workflow to run', - printContributedVariables: false, - printPostContent: false, - regexpFilterText: '$ref', - regexpFilterExpression: '^(refs/heads/main)$' - ) - } - stages { - stage('Publish to Sonatype Snapshots Repo') { - steps { - git url: 'https://github.com/opensearch-project/opensearch-java.git', branch: 'main' - withCredentials([usernamePassword(credentialsId: 'jenkins-sonatype-creds', usernameVariable: 'ORG_GRADLE_PROJECT_snapshotRepoUsername', passwordVariable: 'ORG_GRADLE_PROJECT_snapshotRepoPassword')]) { - sh './gradlew --no-daemon publishPublishMavenPublicationToSnapshotRepoRepository' - } - } - post { - always { - cleanWs disableDeferredWipeout: true, deleteDirs: true - } - } - } - } -} From dd902af6a24f78bf72a03dfe297a077c592c82b8 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 14:47:05 -0700 Subject: [PATCH 043/123] Fixing issues when deserializing response for tasks API (#463) (#467) * Fix failure when deserializing response for tasks API * Add changelog * Marking the fields Nullable --------- (cherry picked from commit 4b9bcbc75ce4816cc762975222a33d65a111f8f2) Signed-off-by: Vacha Shah Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../client/opensearch/_types/BaseNode.java | 37 +++++++++++-------- .../opensearch/integTest/AbstractNodesIT.java | 9 +++++ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c01e60ed..bd880a8cd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) - Fix search failure with missing required property HitsMetadata.total when trackTotalHits is disabled ([#372](https://github.com/opensearch-project/opensearch-java/pull/372)) +- Fix failure when deserialing response for tasks API ([#463](https://github.com/opensearch-project/opensearch-java/pull/463)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java index ccf876ba38..534dcab79c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java @@ -67,38 +67,38 @@ public abstract class BaseNode implements JsonpSerializable { protected BaseNode(AbstractBuilder builder) { - this.attributes = ApiTypeHelper.unmodifiableRequired(builder.attributes, this, "attributes"); - this.host = ApiTypeHelper.requireNonNull(builder.host, this, "host"); - this.ip = ApiTypeHelper.requireNonNull(builder.ip, this, "ip"); - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.attributes = ApiTypeHelper.unmodifiable(builder.attributes); + this.host = builder.host; + this.ip = builder.ip; + this.name = builder.name; this.roles = ApiTypeHelper.unmodifiable(builder.roles); - this.transportAddress = ApiTypeHelper.requireNonNull(builder.transportAddress, this, "transportAddress"); + this.transportAddress = builder.transportAddress; } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} */ public final Map attributes() { return this.attributes; } /** - * Required - API name: {@code host} + * API name: {@code host} */ public final String host() { return this.host; } /** - * Required - API name: {@code ip} + * API name: {@code ip} */ public final String ip() { return this.ip; } /** - * Required - API name: {@code name} + * API name: {@code name} */ public final String name() { return this.name; @@ -112,7 +112,7 @@ public final List roles() { } /** - * Required - API name: {@code transport_address} + * API name: {@code transport_address} */ public final String transportAddress() { return this.transportAddress; @@ -166,21 +166,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends ObjectBuilderBase { + @Nullable private Map attributes; + @Nullable private String host; + @Nullable private String ip; + @Nullable private String name; @Nullable private List roles; + @Nullable private String transportAddress; /** - * Required - API name: {@code attributes} + * API name: {@code attributes} *

* Adds all entries of map to attributes. */ @@ -190,7 +195,7 @@ public final BuilderT attributes(Map map) { } /** - * Required - API name: {@code attributes} + * API name: {@code attributes} *

* Adds an entry to attributes. */ @@ -200,7 +205,7 @@ public final BuilderT attributes(String key, String value) { } /** - * Required - API name: {@code host} + * API name: {@code host} */ public final BuilderT host(String value) { this.host = value; @@ -208,7 +213,7 @@ public final BuilderT host(String value) { } /** - * Required - API name: {@code ip} + * API name: {@code ip} */ public final BuilderT ip(String value) { this.ip = value; @@ -216,7 +221,7 @@ public final BuilderT ip(String value) { } /** - * Required - API name: {@code name} + * API name: {@code name} */ public final BuilderT name(String value) { this.name = value; @@ -244,7 +249,7 @@ public final BuilderT roles(NodeRole value, NodeRole... values) { } /** - * Required - API name: {@code transport_address} + * API name: {@code transport_address} */ public final BuilderT transportAddress(String value) { this.transportAddress = value; diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java index 6a00a76ac3..3cb83a6793 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java @@ -13,8 +13,11 @@ import static org.hamcrest.Matchers.anEmptyMap; import java.io.IOException; +import java.util.Arrays; import org.opensearch.client.opensearch.nodes.NodesStatsResponse; +import org.opensearch.client.opensearch.tasks.ListRequest; +import org.opensearch.client.opensearch.tasks.ListResponse; public abstract class AbstractNodesIT extends OpenSearchJavaClientTestCase { public void testNodesStats() throws IOException { @@ -22,4 +25,10 @@ public void testNodesStats() throws IOException { assertThat(response.clusterName(), not(nullValue())); assertThat(response.nodes(), not(anEmptyMap())); } + + public void testNodesList() throws IOException { + ListRequest listRequest = new ListRequest.Builder().actions(Arrays.asList("*reindex")).build(); + ListResponse listResponse = javaClient().tasks().list(); + assertThat(listResponse.nodes(), not(anEmptyMap())); + } } From a89f8a5aa5cfb6c39c610bf90aa6382c42d0b7de Mon Sep 17 00:00:00 2001 From: eNorby1 Date: Thu, 4 May 2023 14:01:07 +0200 Subject: [PATCH 044/123] [Backport 2.x] Include aggregations and suggest in SearchTemplateResponse (#468) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Include aggregations and suggest in SearchTemplateResponse (#462) * Include aggregations and suggest in SearchTemplateResponse Signed-off-by: Norbert Érsek * make SearchTemplateResponse extend SearchResponse, add test cases Signed-off-by: Norbert Érsek * Introduce intermediary SearchResult class Signed-off-by: Norbert Érsek * Fix copyright header of new class Signed-off-by: Norbert Érsek --------- Signed-off-by: Norbert Érsek (cherry picked from commit 81ed75c54408baaf837024a447bac295d7ce6ce6) Signed-off-by: github-actions[bot] * fix integration test for backporting Signed-off-by: Norbert Érsek --------- Signed-off-by: Norbert Érsek Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../opensearch/core/SearchResponse.java | 599 +---------------- .../core/SearchTemplateResponse.java | 158 +---- .../opensearch/core/search/SearchResult.java | 620 ++++++++++++++++++ .../AbstractSearchTemplateRequestIT.java | 206 ++++++ .../httpclient5/SearchTemplateRequestIT.java | 14 + .../restclient/SearchTemplateRequestIT.java | 25 + 7 files changed, 885 insertions(+), 738 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index bd880a8cd8..bf3e89b959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed - Improve time taken by Github actions by using cache ([#439](https://github.com/opensearch-project/opensearch-java/pull/439)) +- Introduce intermediary SearchResult for SearchResponse and SearchTemplateResponse classes, enabling similar response handling for both ([#462](https://github.com/opensearch-project/opensearch-java/pull/462)) ### Deprecated diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java index b54daf6bf7..06f99dcf7b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java @@ -36,331 +36,39 @@ package org.opensearch.client.opensearch.core; -import org.opensearch.client.opensearch._types.ClusterStatistics; -import org.opensearch.client.opensearch._types.ShardStatistics; -import org.opensearch.client.opensearch._types.aggregations.Aggregate; -import org.opensearch.client.opensearch.core.search.HitsMetadata; -import org.opensearch.client.opensearch.core.search.Profile; -import org.opensearch.client.opensearch.core.search.Suggestion; -import org.opensearch.client.json.ExternallyTaggedUnion; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.JsonpSerializable; -import org.opensearch.client.json.JsonpSerializer; -import org.opensearch.client.json.JsonpUtils; import org.opensearch.client.json.NamedDeserializer; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.opensearch.core.search.SearchResult; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.Map; import java.util.function.Function; import java.util.function.Supplier; -import javax.annotation.Nullable; // typedef: _global.search.Response - @JsonpDeserializable -public class SearchResponse implements JsonpSerializable { - private final long took; - - private final boolean timedOut; - - private final ShardStatistics shards; - - private final HitsMetadata hits; - - private final Map aggregations; - - @Nullable - private final ClusterStatistics clusters; - - private final List documents; - - private final Map fields; - - @Nullable - private final Double maxScore; - - @Nullable - private final Long numReducePhases; - - @Nullable - private final Profile profile; - - @Nullable - private final String pitId; - - @Nullable - private final String scrollId; - - private final Map>> suggest; - - @Nullable - private final Boolean terminatedEarly; - - @Nullable - private final JsonpSerializer tDocumentSerializer; - +public class SearchResponse extends SearchResult { // --------------------------------------------------------------------------------------------- - protected SearchResponse(AbstractBuilder builder) { - - this.took = ApiTypeHelper.requireNonNull(builder.took, this, "took"); - this.timedOut = ApiTypeHelper.requireNonNull(builder.timedOut, this, "timedOut"); - this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); - this.hits = ApiTypeHelper.requireNonNull(builder.hits, this, "hits"); - this.aggregations = ApiTypeHelper.unmodifiable(builder.aggregations); - this.clusters = builder.clusters; - this.documents = ApiTypeHelper.unmodifiable(builder.documents); - this.fields = ApiTypeHelper.unmodifiable(builder.fields); - this.maxScore = builder.maxScore; - this.numReducePhases = builder.numReducePhases; - this.profile = builder.profile; - this.pitId = builder.pitId; - this.scrollId = builder.scrollId; - this.suggest = ApiTypeHelper.unmodifiable(builder.suggest); - this.terminatedEarly = builder.terminatedEarly; - this.tDocumentSerializer = builder.tDocumentSerializer; - - } - - public static SearchResponse searchResponseOf( - Function, ObjectBuilder>> fn) { - return fn.apply(new Builder<>()).build(); - } - - /** - * Required - API name: {@code took} - */ - public final long took() { - return this.took; - } - - /** - * Required - API name: {@code timed_out} - */ - public final boolean timedOut() { - return this.timedOut; - } - - /** - * Required - API name: {@code _shards} - */ - public final ShardStatistics shards() { - return this.shards; - } - - /** - * Required - API name: {@code hits} - */ - public final HitsMetadata hits() { - return this.hits; - } - - /** - * API name: {@code aggregations} - */ - public final Map aggregations() { - return this.aggregations; - } - - /** - * API name: {@code _clusters} - */ - @Nullable - public final ClusterStatistics clusters() { - return this.clusters; - } - - /** - * API name: {@code documents} - */ - public final List documents() { - return this.documents; - } - - /** - * API name: {@code fields} - */ - public final Map fields() { - return this.fields; - } - - /** - * API name: {@code max_score} - */ - @Nullable - public final Double maxScore() { - return this.maxScore; - } - - /** - * API name: {@code num_reduce_phases} - */ - @Nullable - public final Long numReducePhases() { - return this.numReducePhases; - } - - /** - * API name: {@code profile} - */ - @Nullable - public final Profile profile() { - return this.profile; - } - - /** - * API name: {@code pit_id} - */ - @Nullable - public final String pitId() { - return this.pitId; - } - - /** - * API name: {@code _scroll_id} - */ - @Nullable - public final String scrollId() { - return this.scrollId; - } - - /** - * API name: {@code suggest} - */ - public final Map>> suggest() { - return this.suggest; - } + protected SearchResponse(SearchResult.AbstractBuilder builder) { + super(builder); - /** - * API name: {@code terminated_early} - */ - @Nullable - public final Boolean terminatedEarly() { - return this.terminatedEarly; } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("took"); - generator.write(this.took); - - generator.writeKey("timed_out"); - generator.write(this.timedOut); - - generator.writeKey("_shards"); - this.shards.serialize(generator, mapper); - - generator.writeKey("hits"); - this.hits.serialize(generator, mapper); - - if (ApiTypeHelper.isDefined(this.aggregations)) { - generator.writeKey("aggregations"); - ExternallyTaggedUnion.serializeTypedKeys(this.aggregations, generator, mapper); - - } - if (this.clusters != null) { - generator.writeKey("_clusters"); - this.clusters.serialize(generator, mapper); - - } - if (ApiTypeHelper.isDefined(this.documents)) { - generator.writeKey("documents"); - generator.writeStartArray(); - for (TDocument item0 : this.documents) { - JsonpUtils.serialize(item0, generator, tDocumentSerializer, mapper); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.fields)) { - generator.writeKey("fields"); - generator.writeStartObject(); - for (Map.Entry item0 : this.fields.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (this.maxScore != null) { - generator.writeKey("max_score"); - generator.write(this.maxScore); - - } - if (this.numReducePhases != null) { - generator.writeKey("num_reduce_phases"); - generator.write(this.numReducePhases); - - } - if (this.profile != null) { - generator.writeKey("profile"); - this.profile.serialize(generator, mapper); - - } - if (this.pitId != null) { - generator.writeKey("pit_id"); - generator.write(this.pitId); - - } - if (this.scrollId != null) { - generator.writeKey("_scroll_id"); - generator.write(this.scrollId); - - } - if (ApiTypeHelper.isDefined(this.suggest)) { - generator.writeKey("suggest"); - generator.writeStartObject(); - for (Map.Entry>> item0 : this.suggest.entrySet()) { - generator.writeKey(item0.getKey()); - generator.writeStartArray(); - if (item0.getValue() != null) { - for (Suggestion item1 : item0.getValue()) { - item1.serialize(generator, mapper); - - } - } - generator.writeEnd(); - - } - generator.writeEnd(); - - } - if (this.terminatedEarly != null) { - generator.writeKey("terminated_early"); - generator.write(this.terminatedEarly); - - } - - } + public static SearchResponse searchResponseOf( + Function, ObjectBuilder>> fn) { + return fn.apply(new Builder<>()).build(); + } // --------------------------------------------------------------------------------------------- /** * Builder for {@link SearchResponse}. */ - - public static class Builder extends SearchResponse.AbstractBuilder> + public static class Builder extends SearchResult.AbstractBuilder> implements ObjectBuilder> { @Override @@ -381,272 +89,6 @@ public SearchResponse build() { } } - protected abstract static class AbstractBuilder> - extends - ObjectBuilderBase { - private Long took; - - private Boolean timedOut; - - private ShardStatistics shards; - - private HitsMetadata hits; - - @Nullable - private Map aggregations; - - @Nullable - private ClusterStatistics clusters; - - @Nullable - private List documents; - - @Nullable - private Map fields; - - @Nullable - private Double maxScore; - - @Nullable - private Long numReducePhases; - - @Nullable - private Profile profile; - - @Nullable - private String pitId; - - @Nullable - private String scrollId; - - @Nullable - private Map>> suggest; - - @Nullable - private Boolean terminatedEarly; - - @Nullable - private JsonpSerializer tDocumentSerializer; - - /** - * Required - API name: {@code took} - */ - public final BuilderT took(long value) { - this.took = value; - return self(); - } - - /** - * Required - API name: {@code timed_out} - */ - public final BuilderT timedOut(boolean value) { - this.timedOut = value; - return self(); - } - - /** - * Required - API name: {@code _shards} - */ - public final BuilderT shards(ShardStatistics value) { - this.shards = value; - return self(); - } - - /** - * Required - API name: {@code _shards} - */ - public final BuilderT shards(Function> fn) { - return this.shards(fn.apply(new ShardStatistics.Builder()).build()); - } - - /** - * Required - API name: {@code hits} - */ - public final BuilderT hits(HitsMetadata value) { - this.hits = value; - return self(); - } - - /** - * Required - API name: {@code hits} - */ - public final BuilderT hits( - Function, ObjectBuilder>> fn) { - return this.hits(fn.apply(new HitsMetadata.Builder()).build()); - } - - /** - * API name: {@code aggregations} - *

- * Adds all entries of map to aggregations. - */ - public final BuilderT aggregations(Map map) { - this.aggregations = _mapPutAll(this.aggregations, map); - return self(); - } - - /** - * API name: {@code aggregations} - *

- * Adds an entry to aggregations. - */ - public final BuilderT aggregations(String key, Aggregate value) { - this.aggregations = _mapPut(this.aggregations, key, value); - return self(); - } - - /** - * API name: {@code aggregations} - *

- * Adds an entry to aggregations using a builder lambda. - */ - public final BuilderT aggregations(String key, Function> fn) { - return aggregations(key, fn.apply(new Aggregate.Builder()).build()); - } - - /** - * API name: {@code _clusters} - */ - public final BuilderT clusters(@Nullable ClusterStatistics value) { - this.clusters = value; - return self(); - } - - /** - * API name: {@code _clusters} - */ - public final BuilderT clusters(Function> fn) { - return this.clusters(fn.apply(new ClusterStatistics.Builder()).build()); - } - - /** - * API name: {@code documents} - *

- * Adds all elements of list to documents. - */ - public final BuilderT documents(List list) { - this.documents = _listAddAll(this.documents, list); - return self(); - } - - /** - * API name: {@code documents} - *

- * Adds one or more values to documents. - */ - public final BuilderT documents(TDocument value, TDocument... values) { - this.documents = _listAdd(this.documents, value, values); - return self(); - } - - /** - * API name: {@code fields} - *

- * Adds all entries of map to fields. - */ - public final BuilderT fields(Map map) { - this.fields = _mapPutAll(this.fields, map); - return self(); - } - - /** - * API name: {@code fields} - *

- * Adds an entry to fields. - */ - public final BuilderT fields(String key, JsonData value) { - this.fields = _mapPut(this.fields, key, value); - return self(); - } - - /** - * API name: {@code max_score} - */ - public final BuilderT maxScore(@Nullable Double value) { - this.maxScore = value; - return self(); - } - - /** - * API name: {@code num_reduce_phases} - */ - public final BuilderT numReducePhases(@Nullable Long value) { - this.numReducePhases = value; - return self(); - } - - /** - * API name: {@code profile} - */ - public final BuilderT profile(@Nullable Profile value) { - this.profile = value; - return self(); - } - - /** - * API name: {@code profile} - */ - public final BuilderT profile(Function> fn) { - return this.profile(fn.apply(new Profile.Builder()).build()); - } - - /** - * API name: {@code pit_id} - */ - public final BuilderT pitId(@Nullable String value) { - this.pitId = value; - return self(); - } - - /** - * API name: {@code _scroll_id} - */ - public final BuilderT scrollId(@Nullable String value) { - this.scrollId = value; - return self(); - } - - /** - * API name: {@code suggest} - *

- * Adds all entries of map to suggest. - */ - public final BuilderT suggest(Map>> map) { - this.suggest = _mapPutAll(this.suggest, map); - return self(); - } - - /** - * API name: {@code suggest} - *

- * Adds an entry to suggest. - */ - public final BuilderT suggest(String key, List> value) { - this.suggest = _mapPut(this.suggest, key, value); - return self(); - } - - /** - * API name: {@code terminated_early} - */ - public final BuilderT terminatedEarly(@Nullable Boolean value) { - this.terminatedEarly = value; - return self(); - } - - /** - * Serializer for TDocument. If not set, an attempt will be made to find a - * serializer from the JSON context. - */ - public final BuilderT tDocumentSerializer(@Nullable JsonpSerializer value) { - this.tDocumentSerializer = value; - return self(); - } - - protected abstract BuilderT self(); - - } - // --------------------------------------------------------------------------------------------- /** @@ -665,27 +107,10 @@ public static JsonpDeserializer> createSea public static final JsonpDeserializer> _DESERIALIZER = createSearchResponseDeserializer( new NamedDeserializer<>("org.opensearch.client:Deserializer:_global.search.TDocument")); - protected static > void setupSearchResponseDeserializer( + protected static > void setupSearchResponseDeserializer( ObjectDeserializer op, JsonpDeserializer tDocumentDeserializer) { - - op.add(AbstractBuilder::took, JsonpDeserializer.longDeserializer(), "took"); - op.add(AbstractBuilder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); - op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); - op.add(AbstractBuilder::hits, HitsMetadata.createHitsMetadataDeserializer(tDocumentDeserializer), "hits"); - op.add(AbstractBuilder::aggregations, Aggregate._TYPED_KEYS_DESERIALIZER, "aggregations"); - op.add(AbstractBuilder::clusters, ClusterStatistics._DESERIALIZER, "_clusters"); - op.add(AbstractBuilder::documents, JsonpDeserializer.arrayDeserializer(tDocumentDeserializer), "documents"); - op.add(AbstractBuilder::fields, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "fields"); - op.add(AbstractBuilder::maxScore, JsonpDeserializer.doubleDeserializer(), "max_score"); - op.add(AbstractBuilder::numReducePhases, JsonpDeserializer.longDeserializer(), "num_reduce_phases"); - op.add(AbstractBuilder::profile, Profile._DESERIALIZER, "profile"); - op.add(AbstractBuilder::pitId, JsonpDeserializer.stringDeserializer(), "pit_id"); - op.add(AbstractBuilder::scrollId, JsonpDeserializer.stringDeserializer(), "_scroll_id"); - op.add(AbstractBuilder::suggest, JsonpDeserializer.stringMapDeserializer( - JsonpDeserializer.arrayDeserializer(Suggestion.createSuggestionDeserializer(tDocumentDeserializer))), - "suggest"); - op.add(AbstractBuilder::terminatedEarly, JsonpDeserializer.booleanDeserializer(), "terminated_early"); + SearchResult.setupSearchResultDeserializer(op, tDocumentDeserializer); } - + } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java index 0e1df80476..674dff5dee 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java @@ -36,49 +36,25 @@ package org.opensearch.client.opensearch.core; -import org.opensearch.client.opensearch._types.ShardStatistics; -import org.opensearch.client.opensearch.core.search.HitsMetadata; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.JsonpSerializable; -import org.opensearch.client.json.JsonpSerializer; import org.opensearch.client.json.NamedDeserializer; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.opensearch.core.search.SearchResult; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; import java.util.function.Function; import java.util.function.Supplier; -import javax.annotation.Nullable; // typedef: _global.search_template.Response @JsonpDeserializable -public class SearchTemplateResponse implements JsonpSerializable { - private final ShardStatistics shards; - - private final boolean timedOut; - - private final int took; - - private final HitsMetadata hits; - - @Nullable - private final JsonpSerializer tDocumentSerializer; - +public class SearchTemplateResponse extends SearchResult { // --------------------------------------------------------------------------------------------- private SearchTemplateResponse(Builder builder) { - - this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); - this.timedOut = ApiTypeHelper.requireNonNull(builder.timedOut, this, "timedOut"); - this.took = ApiTypeHelper.requireNonNull(builder.took, this, "took"); - this.hits = ApiTypeHelper.requireNonNull(builder.hits, this, "hits"); - this.tDocumentSerializer = builder.tDocumentSerializer; + super(builder); } @@ -87,132 +63,16 @@ public static SearchTemplateResponse of( return fn.apply(new Builder<>()).build(); } - /** - * Required - API name: {@code _shards} - */ - public final ShardStatistics shards() { - return this.shards; - } - - /** - * Required - API name: {@code timed_out} - */ - public final boolean timedOut() { - return this.timedOut; - } - - /** - * Required - API name: {@code took} - */ - public final int took() { - return this.took; - } - - /** - * Required - API name: {@code hits} - */ - public final HitsMetadata hits() { - return this.hits; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("_shards"); - this.shards.serialize(generator, mapper); - - generator.writeKey("timed_out"); - generator.write(this.timedOut); - - generator.writeKey("took"); - generator.write(this.took); - - generator.writeKey("hits"); - this.hits.serialize(generator, mapper); - - } - // --------------------------------------------------------------------------------------------- /** * Builder for {@link SearchTemplateResponse}. */ - - public static class Builder extends ObjectBuilderBase + public static class Builder extends SearchResult.AbstractBuilder> implements ObjectBuilder> { - private ShardStatistics shards; - - private Boolean timedOut; - - private Integer took; - - private HitsMetadata hits; - - @Nullable - private JsonpSerializer tDocumentSerializer; - - /** - * Required - API name: {@code _shards} - */ - public final Builder shards(ShardStatistics value) { - this.shards = value; - return this; - } - - /** - * Required - API name: {@code _shards} - */ - public final Builder shards(Function> fn) { - return this.shards(fn.apply(new ShardStatistics.Builder()).build()); - } - - /** - * Required - API name: {@code timed_out} - */ - public final Builder timedOut(boolean value) { - this.timedOut = value; - return this; - } - - /** - * Required - API name: {@code took} - */ - public final Builder took(int value) { - this.took = value; - return this; - } - - /** - * Required - API name: {@code hits} - */ - public final Builder hits(HitsMetadata value) { - this.hits = value; - return this; - } - - /** - * Required - API name: {@code hits} - */ - public final Builder hits( - Function, ObjectBuilder>> fn) { - return this.hits(fn.apply(new HitsMetadata.Builder()).build()); - } - - /** - * Serializer for TDocument. If not set, an attempt will be made to find a - * serializer from the JSON context. - */ - public final Builder tDocumentSerializer(@Nullable JsonpSerializer value) { - this.tDocumentSerializer = value; + @Override + protected Builder self() { return this; } @@ -250,11 +110,7 @@ public static JsonpDeserializer> c protected static void setupSearchTemplateResponseDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { - - op.add(Builder::shards, ShardStatistics._DESERIALIZER, "_shards"); - op.add(Builder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); - op.add(Builder::took, JsonpDeserializer.integerDeserializer(), "took"); - op.add(Builder::hits, HitsMetadata.createHitsMetadataDeserializer(tDocumentDeserializer), "hits"); + SearchResult.setupSearchResultDeserializer(op, tDocumentDeserializer); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java new file mode 100644 index 0000000000..69933e43ee --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java @@ -0,0 +1,620 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ +package org.opensearch.client.opensearch.core.search; + +import org.opensearch.client.opensearch._types.ClusterStatistics; +import org.opensearch.client.opensearch._types.ShardStatistics; +import org.opensearch.client.opensearch._types.aggregations.Aggregate; +import org.opensearch.client.opensearch.core.search.HitsMetadata; +import org.opensearch.client.opensearch.core.search.Profile; +import org.opensearch.client.opensearch.core.search.Suggestion; +import org.opensearch.client.json.ExternallyTaggedUnion; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.JsonpSerializer; +import org.opensearch.client.json.JsonpUtils; +import org.opensearch.client.json.NamedDeserializer; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; + +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.function.Supplier; +import javax.annotation.Nullable; + +//typedef: _global.search.SearchResult + +public abstract class SearchResult implements JsonpSerializable { + + private final long took; + + private final boolean timedOut; + + private final ShardStatistics shards; + + private final HitsMetadata hits; + + private final Map aggregations; + + @Nullable + private final ClusterStatistics clusters; + + private final List documents; + + private final Map fields; + + @Nullable + private final Double maxScore; + + @Nullable + private final Long numReducePhases; + + @Nullable + private final Profile profile; + + @Nullable + private final String pitId; + + @Nullable + private final String scrollId; + + private final Map>> suggest; + + @Nullable + private final Boolean terminatedEarly; + + @Nullable + private final JsonpSerializer tDocumentSerializer; + + // --------------------------------------------------------------------------------------------- + + protected SearchResult(AbstractBuilder builder) { + + this.took = ApiTypeHelper.requireNonNull(builder.took, this, "took"); + this.timedOut = ApiTypeHelper.requireNonNull(builder.timedOut, this, "timedOut"); + this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); + this.hits = ApiTypeHelper.requireNonNull(builder.hits, this, "hits"); + this.aggregations = ApiTypeHelper.unmodifiable(builder.aggregations); + this.clusters = builder.clusters; + this.documents = ApiTypeHelper.unmodifiable(builder.documents); + this.fields = ApiTypeHelper.unmodifiable(builder.fields); + this.maxScore = builder.maxScore; + this.numReducePhases = builder.numReducePhases; + this.profile = builder.profile; + this.pitId = builder.pitId; + this.scrollId = builder.scrollId; + this.suggest = ApiTypeHelper.unmodifiable(builder.suggest); + this.terminatedEarly = builder.terminatedEarly; + this.tDocumentSerializer = builder.tDocumentSerializer; + + } + + /** + * Required - API name: {@code took} + */ + public final long took() { + return this.took; + } + + /** + * Required - API name: {@code timed_out} + */ + public final boolean timedOut() { + return this.timedOut; + } + + /** + * Required - API name: {@code _shards} + */ + public final ShardStatistics shards() { + return this.shards; + } + + /** + * Required - API name: {@code hits} + */ + public final HitsMetadata hits() { + return this.hits; + } + + /** + * API name: {@code aggregations} + */ + public final Map aggregations() { + return this.aggregations; + } + + /** + * API name: {@code _clusters} + */ + @Nullable + public final ClusterStatistics clusters() { + return this.clusters; + } + + /** + * API name: {@code documents} + */ + public final List documents() { + return this.documents; + } + + /** + * API name: {@code fields} + */ + public final Map fields() { + return this.fields; + } + + /** + * API name: {@code max_score} + */ + @Nullable + public final Double maxScore() { + return this.maxScore; + } + + /** + * API name: {@code num_reduce_phases} + */ + @Nullable + public final Long numReducePhases() { + return this.numReducePhases; + } + + /** + * API name: {@code profile} + */ + @Nullable + public final Profile profile() { + return this.profile; + } + + /** + * API name: {@code pit_id} + */ + @Nullable + public final String pitId() { + return this.pitId; + } + + /** + * API name: {@code _scroll_id} + */ + @Nullable + public final String scrollId() { + return this.scrollId; + } + + /** + * API name: {@code suggest} + */ + public final Map>> suggest() { + return this.suggest; + } + + /** + * API name: {@code terminated_early} + */ + @Nullable + public final Boolean terminatedEarly() { + return this.terminatedEarly; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("took"); + generator.write(this.took); + + generator.writeKey("timed_out"); + generator.write(this.timedOut); + + generator.writeKey("_shards"); + this.shards.serialize(generator, mapper); + + generator.writeKey("hits"); + this.hits.serialize(generator, mapper); + + if (ApiTypeHelper.isDefined(this.aggregations)) { + generator.writeKey("aggregations"); + ExternallyTaggedUnion.serializeTypedKeys(this.aggregations, generator, mapper); + + } + if (this.clusters != null) { + generator.writeKey("_clusters"); + this.clusters.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.documents)) { + generator.writeKey("documents"); + generator.writeStartArray(); + for (TDocument item0 : this.documents) { + JsonpUtils.serialize(item0, generator, tDocumentSerializer, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.fields)) { + generator.writeKey("fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.fields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.maxScore != null) { + generator.writeKey("max_score"); + generator.write(this.maxScore); + + } + if (this.numReducePhases != null) { + generator.writeKey("num_reduce_phases"); + generator.write(this.numReducePhases); + + } + if (this.profile != null) { + generator.writeKey("profile"); + this.profile.serialize(generator, mapper); + + } + if (this.pitId != null) { + generator.writeKey("pit_id"); + generator.write(this.pitId); + + } + if (this.scrollId != null) { + generator.writeKey("_scroll_id"); + generator.write(this.scrollId); + + } + if (ApiTypeHelper.isDefined(this.suggest)) { + generator.writeKey("suggest"); + generator.writeStartObject(); + for (Map.Entry>> item0 : this.suggest.entrySet()) { + generator.writeKey(item0.getKey()); + generator.writeStartArray(); + if (item0.getValue() != null) { + for (Suggestion item1 : item0.getValue()) { + item1.serialize(generator, mapper); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + } + if (this.terminatedEarly != null) { + generator.writeKey("terminated_early"); + generator.write(this.terminatedEarly); + + } + + } + + // --------------------------------------------------------------------------------------------- + + protected abstract static class AbstractBuilder> + extends + ObjectBuilderBase { + private Long took; + + private Boolean timedOut; + + private ShardStatistics shards; + + private HitsMetadata hits; + + @Nullable + private Map aggregations; + + @Nullable + private ClusterStatistics clusters; + + @Nullable + private List documents; + + @Nullable + private Map fields; + + @Nullable + private Double maxScore; + + @Nullable + private Long numReducePhases; + + @Nullable + private Profile profile; + + @Nullable + private String pitId; + + @Nullable + private String scrollId; + + @Nullable + private Map>> suggest; + + @Nullable + private Boolean terminatedEarly; + + @Nullable + private JsonpSerializer tDocumentSerializer; + + /** + * Required - API name: {@code took} + */ + public final BuilderT took(long value) { + this.took = value; + return self(); + } + + /** + * Required - API name: {@code timed_out} + */ + public final BuilderT timedOut(boolean value) { + this.timedOut = value; + return self(); + } + + /** + * Required - API name: {@code _shards} + */ + public final BuilderT shards(ShardStatistics value) { + this.shards = value; + return self(); + } + + /** + * Required - API name: {@code _shards} + */ + public final BuilderT shards(Function> fn) { + return this.shards(fn.apply(new ShardStatistics.Builder()).build()); + } + + /** + * Required - API name: {@code hits} + */ + public final BuilderT hits(HitsMetadata value) { + this.hits = value; + return self(); + } + + /** + * Required - API name: {@code hits} + */ + public final BuilderT hits( + Function, ObjectBuilder>> fn) { + return this.hits(fn.apply(new HitsMetadata.Builder()).build()); + } + + /** + * API name: {@code aggregations} + *

+ * Adds all entries of map to aggregations. + */ + public final BuilderT aggregations(Map map) { + this.aggregations = _mapPutAll(this.aggregations, map); + return self(); + } + + /** + * API name: {@code aggregations} + *

+ * Adds an entry to aggregations. + */ + public final BuilderT aggregations(String key, Aggregate value) { + this.aggregations = _mapPut(this.aggregations, key, value); + return self(); + } + + /** + * API name: {@code aggregations} + *

+ * Adds an entry to aggregations using a builder lambda. + */ + public final BuilderT aggregations(String key, Function> fn) { + return aggregations(key, fn.apply(new Aggregate.Builder()).build()); + } + + /** + * API name: {@code _clusters} + */ + public final BuilderT clusters(@Nullable ClusterStatistics value) { + this.clusters = value; + return self(); + } + + /** + * API name: {@code _clusters} + */ + public final BuilderT clusters(Function> fn) { + return this.clusters(fn.apply(new ClusterStatistics.Builder()).build()); + } + + /** + * API name: {@code documents} + *

+ * Adds all elements of list to documents. + */ + public final BuilderT documents(List list) { + this.documents = _listAddAll(this.documents, list); + return self(); + } + + /** + * API name: {@code documents} + *

+ * Adds one or more values to documents. + */ + public final BuilderT documents(TDocument value, TDocument... values) { + this.documents = _listAdd(this.documents, value, values); + return self(); + } + + /** + * API name: {@code fields} + *

+ * Adds all entries of map to fields. + */ + public final BuilderT fields(Map map) { + this.fields = _mapPutAll(this.fields, map); + return self(); + } + + /** + * API name: {@code fields} + *

+ * Adds an entry to fields. + */ + public final BuilderT fields(String key, JsonData value) { + this.fields = _mapPut(this.fields, key, value); + return self(); + } + + /** + * API name: {@code max_score} + */ + public final BuilderT maxScore(@Nullable Double value) { + this.maxScore = value; + return self(); + } + + /** + * API name: {@code num_reduce_phases} + */ + public final BuilderT numReducePhases(@Nullable Long value) { + this.numReducePhases = value; + return self(); + } + + /** + * API name: {@code profile} + */ + public final BuilderT profile(@Nullable Profile value) { + this.profile = value; + return self(); + } + + /** + * API name: {@code profile} + */ + public final BuilderT profile(Function> fn) { + return this.profile(fn.apply(new Profile.Builder()).build()); + } + + /** + * API name: {@code pit_id} + */ + public final BuilderT pitId(@Nullable String value) { + this.pitId = value; + return self(); + } + + /** + * API name: {@code _scroll_id} + */ + public final BuilderT scrollId(@Nullable String value) { + this.scrollId = value; + return self(); + } + + /** + * API name: {@code suggest} + *

+ * Adds all entries of map to suggest. + */ + public final BuilderT suggest(Map>> map) { + this.suggest = _mapPutAll(this.suggest, map); + return self(); + } + + /** + * API name: {@code suggest} + *

+ * Adds an entry to suggest. + */ + public final BuilderT suggest(String key, List> value) { + this.suggest = _mapPut(this.suggest, key, value); + return self(); + } + + /** + * API name: {@code terminated_early} + */ + public final BuilderT terminatedEarly(@Nullable Boolean value) { + this.terminatedEarly = value; + return self(); + } + + /** + * Serializer for TDocument. If not set, an attempt will be made to find a + * serializer from the JSON context. + */ + public final BuilderT tDocumentSerializer(@Nullable JsonpSerializer value) { + this.tDocumentSerializer = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + + protected static > void setupSearchResultDeserializer( + ObjectDeserializer op, JsonpDeserializer tDocumentDeserializer) { + + op.add(AbstractBuilder::took, JsonpDeserializer.longDeserializer(), "took"); + op.add(AbstractBuilder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); + op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); + op.add(AbstractBuilder::hits, HitsMetadata.createHitsMetadataDeserializer(tDocumentDeserializer), "hits"); + op.add(AbstractBuilder::aggregations, Aggregate._TYPED_KEYS_DESERIALIZER, "aggregations"); + op.add(AbstractBuilder::clusters, ClusterStatistics._DESERIALIZER, "_clusters"); + op.add(AbstractBuilder::documents, JsonpDeserializer.arrayDeserializer(tDocumentDeserializer), "documents"); + op.add(AbstractBuilder::fields, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "fields"); + op.add(AbstractBuilder::maxScore, JsonpDeserializer.doubleDeserializer(), "max_score"); + op.add(AbstractBuilder::numReducePhases, JsonpDeserializer.longDeserializer(), "num_reduce_phases"); + op.add(AbstractBuilder::profile, Profile._DESERIALIZER, "profile"); + op.add(AbstractBuilder::pitId, JsonpDeserializer.stringDeserializer(), "pit_id"); + op.add(AbstractBuilder::scrollId, JsonpDeserializer.stringDeserializer(), "_scroll_id"); + op.add(AbstractBuilder::suggest, JsonpDeserializer.stringMapDeserializer( + JsonpDeserializer.arrayDeserializer(Suggestion.createSuggestionDeserializer(tDocumentDeserializer))), + "suggest"); + op.add(AbstractBuilder::terminatedEarly, JsonpDeserializer.booleanDeserializer(), "terminated_early"); + + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java new file mode 100644 index 0000000000..4a4f82a62f --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java @@ -0,0 +1,206 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import java.io.IOException; +import java.util.Map; + +import org.junit.Test; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch.core.PutScriptRequest; +import org.opensearch.client.opensearch.core.SearchTemplateResponse; + +public abstract class AbstractSearchTemplateRequestIT + extends + OpenSearchJavaClientTestCase { + + private static final String TEST_SEARCH_TEMPLATE = "search-template-integration-test"; + + @Test + public void testTemplateSearchResults() throws Exception { + var index = "test-search-template-search"; + createDocuments(index); + + var searchResponse = sendTemplateRequest(index, "NoDocuments", false, + false); + assertEquals(0, searchResponse.hits().hits().size()); + assertEquals(0, searchResponse.suggest().size()); + assertEquals(0, searchResponse.aggregations().size()); + + searchResponse = sendTemplateRequest(index, "Document", false, false); + assertEquals(4, searchResponse.hits().hits().size()); + assertEquals(0, searchResponse.suggest().size()); + assertEquals(0, searchResponse.aggregations().size()); + + searchResponse = sendTemplateRequest(index, "1", false, false); + assertEquals(1, searchResponse.hits().hits().size()); + assertEquals(1, searchResponse.hits().hits().get(0).source().getValue().intValue()); + assertEquals(0, searchResponse.suggest().size()); + assertEquals(0, searchResponse.aggregations().size()); + } + + @Test + public void testTemplateSearchSuggest() throws Exception { + var index = "test-search-template-suggs"; + createDocuments(index); + + var searchResponse = sendTemplateRequest(index, "Document", true, false); + assertEquals(4, searchResponse.hits().hits().size()); + assertEquals(1, searchResponse.suggest().size()); + assertEquals(0, searchResponse.aggregations().size()); + + // intentional typo + searchResponse = sendTemplateRequest(index, "Docunent", true, false); + assertEquals(0, searchResponse.hits().hits().size()); + assertEquals(1, searchResponse.suggest().size()); + var options = searchResponse.suggest().get("term#test-suggest").get(0).options(); + assertEquals(1, options.size()); + assertEquals("document", options.get(0).term().text()); + assertEquals(0, searchResponse.aggregations().size()); + + } + + @Test + public void testTemplateSearchAggregations() throws Exception { + var index = "test-search-template-aggs"; + createDocuments(index); + + var searchResponse = sendTemplateRequest(index, "NoDocuments", false, true); + assertEquals(0, searchResponse.hits().hits().size()); + assertEquals(0, searchResponse.suggest().size()); + assertEquals(1, searchResponse.aggregations().size()); + + searchResponse = sendTemplateRequest(index, "Document", false, true); + assertEquals(4, searchResponse.hits().hits().size()); + assertEquals(0, searchResponse.suggest().size()); + assertEquals(1, searchResponse.aggregations().size()); + var buckets = searchResponse.aggregations().get("test-aggs").sterms().buckets().array(); + assertEquals(2, buckets.size()); + assertEquals(2, buckets.get(0).docCount()); + assertEquals(2, buckets.get(1).docCount()); + + } + + private SearchTemplateResponse sendTemplateRequest(String index, + String title, boolean suggs, boolean aggs) throws IOException { + return javaClient().searchTemplate( + request -> request + .index(index) + .id(TEST_SEARCH_TEMPLATE) + .params(Map.of( + "title", JsonData.of(title), + "suggs", JsonData.of(suggs), + "aggs", JsonData.of(aggs))), + SimpleDoc.class); + } + + private void createDocuments(String index) throws IOException { + createIndex(index); + javaClient().create(_1 -> _1.index(index).id("1") + .document(createDoc("Document 1", "The text of document 1", 1)) + .refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2") + .document(createDoc("Document 2", "The text of document 2", 1)) + .refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3") + .document(createDoc("Document 3", "The text of document 3", 2)) + .refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("4") + .document(createDoc("Document 4", "The text of document 4", 2)) + .refresh(Refresh.True)); + } + + private void createIndex(String index) throws IOException { + Property titleProp = new Property.Builder().text(v -> v).build(); + Property textProp = new Property.Builder().text(v -> v).build(); + Property valueProp = new Property.Builder().keyword(v -> v).build(); + javaClient().indices().create(c -> c.index(index) + .mappings(m -> m + .properties("title", titleProp) + .properties("text", textProp) + .properties("value", valueProp))); + createSearchTemplate(); + } + + /* + * """{ + "query": { + "match": { + "title": "{{title}}" + } + } + {{#suggs}} + ,"suggest" : { + "test-suggest" : { + "text" : "{{title}}", + "term" : { + "field" : "title" + } + } + } + {{/suggs}} + {{#aggs}} + ,"aggs": { + "test-aggs": { + "terms": { + "field": "value" + } + } + } + {{/aggs}} + }""" + */ + private void createSearchTemplate() throws IOException { + var templateReq = new PutScriptRequest.Builder() + .id(TEST_SEARCH_TEMPLATE) + .script(s -> s.lang("mustache").source( + "{ \"query\": { \"match\": { \"title\": \"{{title}}\" } } " + + "{{#suggs}},\"suggest\" : { \"test-suggest\" : { \"text\" : " + + "\"{{title}}\", \"term\" : { \"field\" : \"title\" } } } {{/suggs}}" + + "{{#aggs}} ,\"aggs\": {\"test-aggs\": { \"terms\": " + + "{ \"field\": \"value\" } } }{{/aggs}} }" + ) + ); + javaClient().putScript(templateReq.build()); + } + + private SimpleDoc createDoc(String title, String text, Integer value) { + return new SimpleDoc(title, text, value); + } + + public static class SimpleDoc { + private String title; + private String text; + private Integer value; + + public SimpleDoc() { + } + + public SimpleDoc(String title, String text, Integer value) { + this.title = title; + this.text = text; + this.value = value; + } + + public String getTitle() { + return title; + } + + public String getText() { + return text; + } + + public Integer getValue() { + return value; + } + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java new file mode 100644 index 0000000000..d0a1ebe940 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractSearchTemplateRequestIT; + +public class SearchTemplateRequestIT extends AbstractSearchTemplateRequestIT implements HttpClient5TransportSupport{ +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java new file mode 100644 index 0000000000..663c15cf4d --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractSearchTemplateRequestIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +import java.io.IOException; + +public class SearchTemplateRequestIT extends AbstractSearchTemplateRequestIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} From 9a666eb1ba551f0fe3e44b9e5de84a91add75d50 Mon Sep 17 00:00:00 2001 From: Harsha Vamsi Kalluri Date: Tue, 9 May 2023 05:39:47 -0700 Subject: [PATCH 045/123] Adds point in time APIs (#461) (#472) * Adds point in time APIs Signed-off-by: Harsha Vamsi Kalluri * Add version check for Point in time tests Signed-off-by: Harsha Vamsi Kalluri * Update point in time namespace Signed-off-by: Harsha Vamsi Kalluri * Update point in time to pit everywhere Signed-off-by: Harsha Vamsi Kalluri * Update USER_GUIDE.md Co-authored-by: Andriy Redko Signed-off-by: Harsha Vamsi Kalluri * Update USER_GUIDE.md Co-authored-by: Andriy Redko Signed-off-by: Harsha Vamsi Kalluri * Using AssumeTrue for tests for PIT Signed-off-by: Harsha Vamsi Kalluri --------- Signed-off-by: Harsha Vamsi Kalluri Co-authored-by: Andriy Redko (cherry picked from commit 4ceb43b00c314b6acba6d036132d1947d22b5f8d) --- CHANGELOG.md | 2 +- USER_GUIDE.md | 48 +++ .../opensearch/OpenSearchAsyncClient.java | 84 +++++ .../client/opensearch/OpenSearchClient.java | 83 +++++ .../cat/OpenSearchCatAsyncClient.java | 14 + .../opensearch/cat/OpenSearchCatClient.java | 41 +++ .../opensearch/cat/PitSegmentsRequest.java | 107 ++++++ .../client/opensearch/core/SearchRequest.java | 31 ++ .../opensearch/core/pit/CreatePitRequest.java | 337 ++++++++++++++++++ .../core/pit/CreatePitResponse.java | 157 ++++++++ .../opensearch/core/pit/DeletePitRecord.java | 127 +++++++ .../opensearch/core/pit/DeletePitRequest.java | 129 +++++++ .../core/pit/DeletePitResponse.java | 125 +++++++ .../core/pit/ListAllPitRequest.java | 40 +++ .../core/pit/ListAllPitResponse.java | 125 +++++++ .../client/opensearch/core/pit/PitRecord.java | 153 ++++++++ .../client/opensearch/core/search/Pit.java | 127 +++++++ .../integTest/AbstractCatClientIT.java | 59 ++- .../integTest/AbstractRequestIT.java | 61 ++++ 19 files changed, 1841 insertions(+), 9 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/cat/PitSegmentsRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/CreatePitRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/CreatePitResponse.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRecord.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitResponse.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitRequest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitResponse.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/pit/PitRecord.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/Pit.java diff --git a/CHANGELOG.md b/CHANGELOG.md index bf3e89b959..c8a2bdc407 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] - ### Added - Add workflow to publish snapshots via GHA ([#454](https://github.com/opensearch-project/opensearch-java/pull/454)) +- Added Point-In-Time APIs ([#461](https://github.com/opensearch-project/opensearch-java/pull/461)) ### Dependencies diff --git a/USER_GUIDE.md b/USER_GUIDE.md index c024320632..4d3dfc02da 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -20,10 +20,15 @@ - [Get data stream](#get-data-stream) - [Data stream stats](#data-stream-stats) - [Delete data stream and backing indices](#delete-data-stream-and-backing-indices) + - [Point-In-Time API](#point-in-time-api) + - [Creating a point in time](#creating-a-point-in-time) + - [List all point in time](#list-all-point-in-time) + - [Delete point in time](#delete-point-in-time) - [Cat API](#cat-api) - [Cat Indices](#cat-indices) - [Cat aliases](#cat-aliases) - [Cat nodes](#cat-nodes) + - [Cat point in time segments](#cat-point-in-time-segments) - [Using different transport options](#using-different-transport-options) - [Amazon Managed OpenSearch](#amazon-managed-opensearch) @@ -255,6 +260,42 @@ DeleteDataStreamRequest deleteDataStreamRequest = new DeleteDataStreamRequest.Bu DeleteDataStreamResponse deleteDataStreamResponse = javaClient().indices().deleteDataStream(deleteDataStreamRequest); ``` +## Point-In-Time API + +### Creating a point in time + +Creates a PIT. The keep_alive query parameter is required; it specifies how long to keep a PIT. + +```java +CreatePitRequest createPitRequest = new CreatePitRequest.Builder() + .targetIndexes(Collections.singletonList(index)) + .keepAlive(new Time.Builder().time("100m").build()).build(); + +CreatePitResponse createPitResponse = javaClient() + .createPit(createPitRequest); +``` + +### List all point in time + +Returns all PITs in the OpenSearch cluster. + +```java +ListAllPitResponse listAllPitResponse = javaClient().listAllPit(); +``` + +### Delete point in time + +Deletes one, several, or all PITs. PITs are automatically deleted when the keep_alive time period elapses. However, to deallocate resources, you can delete a PIT using the Delete PIT API. The Delete PIT API supports deleting a list of PITs by ID or deleting all PITs at once. + +```java +DeletePitRequest deletePitRequest = new DeletePitRequest.Builder() + .pitId(Collections.singletonList("pit_id")).build(); + +DeletePitResponse deletePitResponse = javaClient() + .deletePit(deletePitRequest); +``` + + ## Cat API ### Cat Indices @@ -280,6 +321,13 @@ The following sample code cat nodes sorted by cpu NodesResponse nodesResponse = javaClient().cat().nodes(r -> r.sort("cpu")); ``` +### Cat point in time segments +Similarly to the CAT Segments API, the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. +```java +SegmentsResponse pitSegmentsResponse = javaClient().cat() + .pitSegments(r -> r.headers("index,shard,id,segment,size")); +``` + # Using different transport options ## Amazon Managed OpenSearch diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java index 56979730b1..e6d5e3a35c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java @@ -116,6 +116,12 @@ import org.opensearch.client.opensearch.core.UpdateByQueryRethrottleResponse; import org.opensearch.client.opensearch.core.UpdateRequest; import org.opensearch.client.opensearch.core.UpdateResponse; +import org.opensearch.client.opensearch.core.pit.CreatePitRequest; +import org.opensearch.client.opensearch.core.pit.CreatePitResponse; +import org.opensearch.client.opensearch.core.pit.DeletePitRequest; +import org.opensearch.client.opensearch.core.pit.DeletePitResponse; +import org.opensearch.client.opensearch.core.pit.ListAllPitRequest; +import org.opensearch.client.opensearch.core.pit.ListAllPitResponse; import org.opensearch.client.opensearch.dangling_indices.OpenSearchDanglingIndicesAsyncClient; import org.opensearch.client.opensearch.features.OpenSearchFeaturesAsyncClient; import org.opensearch.client.opensearch.indices.OpenSearchIndicesAsyncClient; @@ -362,6 +368,39 @@ public final CompletableFuture create( return create(fn.apply(new CreateRequest.Builder()).build()); } + // ----- Endpoint: create_point_in_time + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * + */ + + public CompletableFuture createPit(CreatePitRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CreatePitRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreatePitRequest} + * + */ + + public final CompletableFuture createPit( + Function> fn) + throws IOException, OpenSearchException { + return createPit(fn.apply(new CreatePitRequest.Builder()).build()); + } + // ----- Endpoint: delete /** @@ -393,6 +432,37 @@ public final CompletableFuture delete( return delete(fn.apply(new DeleteRequest.Builder()).build()); } + // ----- Endpoint: delete_point_in_time + + /** + * Delete Point In Time + * + * + */ + + public CompletableFuture deletePit(DeletePitRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeletePitRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Delete Point In Time + * + * @param fn + * a function that initializes a builder to create the + * {@link DeletePitRequest} + * + */ + + public final CompletableFuture deletePit( + Function> fn) + throws IOException, OpenSearchException { + return deletePit(fn.apply(new DeletePitRequest.Builder()).build()); + } + // ----- Endpoint: delete_by_query /** @@ -801,6 +871,20 @@ public CompletableFuture info() throws IOException, OpenSearchExce return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); } + // ----- Endpoint: list_point_in_time + + /** + * List all Point In Time + * + * + */ + + public CompletableFuture listAllPit() + throws IOException, OpenSearchException { + return this.transport.performRequestAsync(ListAllPitRequest._INSTANCE, ListAllPitRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: mget /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java index 56ef79d5b1..12d3704293 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java @@ -116,6 +116,12 @@ import org.opensearch.client.opensearch.core.UpdateByQueryRethrottleResponse; import org.opensearch.client.opensearch.core.UpdateRequest; import org.opensearch.client.opensearch.core.UpdateResponse; +import org.opensearch.client.opensearch.core.pit.CreatePitRequest; +import org.opensearch.client.opensearch.core.pit.CreatePitResponse; +import org.opensearch.client.opensearch.core.pit.DeletePitRequest; +import org.opensearch.client.opensearch.core.pit.DeletePitResponse; +import org.opensearch.client.opensearch.core.pit.ListAllPitRequest; +import org.opensearch.client.opensearch.core.pit.ListAllPitResponse; import org.opensearch.client.opensearch.dangling_indices.OpenSearchDanglingIndicesClient; import org.opensearch.client.opensearch.features.OpenSearchFeaturesClient; import org.opensearch.client.opensearch.indices.OpenSearchIndicesClient; @@ -359,6 +365,39 @@ public final CreateResponse create( return create(fn.apply(new CreateRequest.Builder()).build()); } + // ----- Endpoint: create_point_in_time + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * + */ + + public CreatePitResponse createPit(CreatePitRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CreatePitRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreatePitRequest} + * + */ + + public final CreatePitResponse createPit( + Function> fn) + throws IOException, OpenSearchException { + return createPit(fn.apply(new CreatePitRequest.Builder()).build()); + } + // ----- Endpoint: delete /** @@ -389,6 +428,37 @@ public final DeleteResponse delete(Function endpoint = (JsonEndpoint) DeletePitRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Delete Point In Time + * + * @param fn + * a function that initializes a builder to create the + * {@link DeletePitRequest} + * + */ + + public final DeletePitResponse deletePit( + Function> fn) + throws IOException, OpenSearchException { + return deletePit(fn.apply(new DeletePitRequest.Builder()).build()); + } + // ----- Endpoint: delete_by_query /** @@ -790,6 +860,19 @@ public InfoResponse info() throws IOException, OpenSearchException { return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); } + // ----- Endpoint: list_point_in_time + + /** + * List all Point In Time + * + * + */ + + public ListAllPitResponse listAllPit() + throws IOException, OpenSearchException { + return this.transport.performRequest(ListAllPitRequest._INSTANCE, ListAllPitRequest._ENDPOINT, this.transportOptions); + } + // ----- Endpoint: mget /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java index 98af262630..41c82e73e6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java @@ -426,6 +426,20 @@ public CompletableFuture nodes() throws IOException, OpenSearchEx this.transportOptions); } + // ----- Endpoint: cat.point_in_time_segments + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * + */ + public CompletableFuture pitSegments() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(new PitSegmentsRequest.Builder().build(), + PitSegmentsRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: cat.pending_tasks /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java index d714f411b1..ea0d87bbdc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java @@ -414,6 +414,47 @@ public NodesResponse nodes() throws IOException, OpenSearchException { this.transportOptions); } + // ----- Endpoint: cat.point_in_time_segments + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * + */ + public SegmentsResponse pitSegments(PitSegmentsRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PitSegmentsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * * @param fn + * a function that initializes a builder to create the + * {@link PitSegmentsRequest} + */ + + public final SegmentsResponse pitSegments(Function> fn) + throws IOException, OpenSearchException { + return pitSegments(fn.apply(new PitSegmentsRequest.Builder()).build()); + } + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + */ + public SegmentsResponse pitSegments() throws IOException, OpenSearchException { + return this.transport.performRequest(new PitSegmentsRequest.Builder().build(), + PitSegmentsRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: cat.pending_tasks /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PitSegmentsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PitSegmentsRequest.java new file mode 100644 index 0000000000..11b9c402b4 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PitSegmentsRequest.java @@ -0,0 +1,107 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.cat; + +import java.util.List; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ObjectBuilder; + +/** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments + * + */ +public class PitSegmentsRequest extends CatRequestBase { + + @Nullable + private List pitId; + + public PitSegmentsRequest(Builder builder) { + this.pitId = builder.pitId; + } + + public static PitSegmentsRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A list of Pit IDs to get segments + *

+ * API name - {@code pit_id} + */ + @Nullable + public final List pitId() { + return this.pitId; + } + + /** + * Builder for {@link PitSegmentsRequest} + */ + public static class Builder extends CatRequestBaseBuilder { + private List pitId; + + /** + * A list of Pit IDs to get segments + *

+ * API name - {@code pit_id} + */ + public final Builder pitId(@Nullable List pitId) { + this.pitId = pitId; + return this; + } + + /** + * Builds a {@link PitSegmentsRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public PitSegmentsRequest build() { + _checkSingleUse(); + return new PitSegmentsRequest(this); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Endpoint "{@code point_in_time_segments}" + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request Method + request -> { + return "GET"; + }, + + // Request Path + request -> { + final int _all = 1 << 0; + + int propsSet = 0; + + if (request.pitId() == null) { + propsSet |= _all; + } + if (propsSet == 0) { + return "/_cat/pit_segments"; + } else { + return "/_cat/pit_segments/_all"; + } + }, + SimpleEndpoint.emptyMap(), SimpleEndpoint.emptyMap(), false, SegmentsResponse._DESERIALIZER); + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java index f7822edd3a..fe3627e74e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java @@ -51,6 +51,7 @@ import org.opensearch.client.opensearch._types.query_dsl.Query; import org.opensearch.client.opensearch.core.search.FieldCollapse; import org.opensearch.client.opensearch.core.search.Highlight; +import org.opensearch.client.opensearch.core.search.Pit; import org.opensearch.client.opensearch.core.search.Rescore; import org.opensearch.client.opensearch.core.search.SourceConfig; import org.opensearch.client.opensearch.core.search.Suggester; @@ -152,6 +153,9 @@ public class SearchRequest extends RequestBase implements JsonpSerializable { @Nullable private final Double minScore; + @Nullable + private final Pit pit; + @Nullable private final Query postFilter; @@ -252,6 +256,7 @@ private SearchRequest(Builder builder) { this.maxConcurrentShardRequests = builder.maxConcurrentShardRequests; this.minCompatibleShardNode = builder.minCompatibleShardNode; this.minScore = builder.minScore; + this.pit = builder.pit; this.postFilter = builder.postFilter; this.preFilterShardSize = builder.preFilterShardSize; this.preference = builder.preference; @@ -547,6 +552,14 @@ public final Double minScore() { return this.minScore; } + /** + * API name: {@code pit} + */ + @Nullable + public final Pit pit() { + return this.pit; + } + /** * API name: {@code post_filter} */ @@ -902,6 +915,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.minScore); } + + if (this.pit != null) { + generator.writeKey("pit"); + this.pit.serialize(generator, mapper); + } + if (this.postFilter != null) { generator.writeKey("post_filter"); this.postFilter.serialize(generator, mapper); @@ -1119,6 +1138,9 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder targetIndexes; + + private Time keepAlive; + + @Nullable + private String preference; + + @Nullable + private String routing; + + @Nullable + private List expandWildcards; + + @Nullable + private Boolean allowPartialPitCreation; + + private CreatePitRequest(Builder builder) { + this.targetIndexes = ApiTypeHelper.unmodifiableRequired(builder.targetIndexes, this, "targetIndexes"); + this.keepAlive = ApiTypeHelper.requireNonNull(builder.keepAlive, this, "keepAlive"); + this.preference = builder.preference; + this.routing = builder.routing; + this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); + this.allowPartialPitCreation = builder.allowPartialPitCreation; + } + + public static CreatePitRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The name(s) of the target index(es) for the PIT. + * May contain a comma-separated list or a wildcard index pattern. + *

+ * API name: {@code target_indexes} + */ + public final List targetIndexes() { + return this.targetIndexes; + } + + /** + * Required - The amount of time to keep the PIT. Every time you access a PIT by + * using the + * Search API, the PIT lifetime is extended by the amount of time equal to the + * keep_alive parameter. + *

+ * API name: {@code keep_alive} + */ + public final Time keepAlive() { + return this.keepAlive; + } + + /** + * The node or the shard used to perform the search. Optional. Default is + * random. + *

+ * API name: {@code preference} + */ + @Nullable + public final String preference() { + return this.preference; + } + + /** + * Specifies to route search requests to a specific shard. Optional. Default is + * the document’s _id. + *

+ * API name: {@code routing} + */ + @Nullable + public final String routing() { + return this.routing; + } + + /** + * The type of index that can match the wildcard pattern. Supports + * comma-separated values. Valid values are the following: + * - all: Match any index or data stream, including hidden ones. + * - open: Match open, non-hidden indexes or non-hidden data streams. + * - closed: Match closed, non-hidden indexes or non-hidden data streams. + * - hidden: Match hidden indexes or data streams. Must be combined with open, + * closed or both open and closed. + * - none: No wildcard patterns are accepted. + * Optional. Default is open. + *

+ * API name: {@code expand_wildcards} + */ + @Nullable + public final List expandWildcards() { + return this.expandWildcards; + } + + /** + * Specifies whether to create a PIT with partial failures. Optional. Default is + * true. + *

+ * API name: {@code allow_partial_pit_creation} + */ + @Nullable + public final Boolean allowPartialPitCreation() { + return this.allowPartialPitCreation; + } + + /** + * Builder for {@link CreatePitRequest} + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private List targetIndexes; + + private Time keepAlive; + + @Nullable + private String preference; + + @Nullable + private String routing; + + @Nullable + private List expandWildcards; + + @Nullable + private Boolean allowPartialPitCreation; + + /** + * Required - The name(s) of the target index(es) for the PIT. + * May contain a comma-separated list or a wildcard index pattern. + *

+ * API name: {@code target_indexes} + *

+ * Adds all elements of list to targetIndexes. + */ + public final Builder targetIndexes(List list) { + this.targetIndexes = _listAddAll(this.targetIndexes, list); + return this; + } + + /** + * Required - The name(s) of the target index(es) for the PIT. + * May contain a comma-separated list or a wildcard index pattern. + *

+ * API name: {@code target_indexes} + *

+ * Adds one or more values to targetIndexes. + */ + public final Builder targetIndexes(String value, String... values) { + this.targetIndexes = _listAdd(this.targetIndexes, value, values); + return this; + } + + /** + * Required - The amount of time to keep the PIT. Every time you access a PIT by + * using the + * Search API, the PIT lifetime is extended by the amount of time equal to the + * keep_alive parameter. + *

+ * API name: {@code keep_alive} + */ + public final Builder keepAlive(Time keepAlive) { + this.keepAlive = keepAlive; + return this; + } + + /** + * Required - The amount of time to keep the PIT. Every time you access a PIT by + * using the + * Search API, the PIT lifetime is extended by the amount of time equal to the + * keep_alive parameter. + *

+ * API name: {@code keep_alive} + */ + public final Builder keepAlive(Function> fn) { + return this.keepAlive(fn.apply(new Time.Builder()).build()); + } + + /** + * The node or the shard used to perform the search. Optional. Default is + * random. + *

+ * API name: {@code preference} + */ + public final Builder preference(@Nullable String preference) { + this.preference = preference; + return this; + } + + /** + * Specifies to route search requests to a specific shard. Optional. Default is + * the document’s _id. + *

+ * API name: {@code routing} + */ + public final Builder routing(@Nullable String routing) { + this.routing = routing; + return this; + } + + /** + * The type of index that can match the wildcard pattern. Supports + * comma-separated values. Valid values are the following: + * - all: Match any index or data stream, including hidden ones. + * - open: Match open, non-hidden indexes or non-hidden data streams. + * - closed: Match closed, non-hidden indexes or non-hidden data streams. + * - hidden: Match hidden indexes or data streams. Must be combined with open, + * closed or both open and closed. + * - none: No wildcard patterns are accepted. + * Optional. Default is open. + *

+ * API name: {@code expand_wildcards} + *

+ * Adds all elements of list to expandWildcards. + */ + public final Builder expandWildcards(@Nullable List list) { + this.expandWildcards = _listAddAll(this.expandWildcards, list); + return this; + } + + /** + * The type of index that can match the wildcard pattern. Supports + * comma-separated values. Valid values are the following: + * - all: Match any index or data stream, including hidden ones. + * - open: Match open, non-hidden indexes or non-hidden data streams. + * - closed: Match closed, non-hidden indexes or non-hidden data streams. + * - hidden: Match hidden indexes or data streams. Must be combined with open, + * closed or both open and closed. + * - none: No wildcard patterns are accepted. + * Optional. Default is open. + *

+ * API name: {@code expand_wildcards} + *

+ * Adds one or more values to expandWildcards. + */ + public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) { + this.expandWildcards = _listAdd(this.expandWildcards, value, values); + return this; + } + + /** + * Specifies whether to create a PIT with partial failures. Optional. Default is + * true. + *

+ * API name: {@code allow_partial_pit_creation} + */ + public final Builder allowPartialPitCreation(@Nullable Boolean allowPartialPitCreation) { + this.allowPartialPitCreation = allowPartialPitCreation; + return this; + } + + /** + * Builds a {@link CreatePitRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public CreatePitRequest build() { + _checkSingleUse(); + return new CreatePitRequest(this); + } + } + + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> { + return "POST"; + }, + + // Request Path + request -> { + + final int _targetIndexes = 1 << 0; + + int propsSet = 0; + + propsSet |= _targetIndexes; + + if (propsSet == (_targetIndexes)) { + StringBuilder buf = new StringBuilder(); + buf.append("/"); + SimpleEndpoint.pathEncode( + request.targetIndexes.stream().map(v -> v).collect(Collectors.joining(",")), buf); + buf.append("/_search/point_in_time"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + }, request -> { + Map params = new HashMap<>(); + params.put("keep_alive", request.keepAlive._toJsonString()); + + if (request.preference != null) { + params.put("preference", request.preference); + } + if (request.routing != null) { + params.put("routing", request.routing); + } + if (ApiTypeHelper.isDefined(request.expandWildcards)) { + params.put("expand_wildcards", + request.expandWildcards.stream() + .map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + if (request.allowPartialPitCreation != null) { + params.put("allow_partial_pit_creation", String.valueOf(request.allowPartialPitCreation)); + } + return params; + }, SimpleEndpoint.emptyMap(), false, CreatePitResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/CreatePitResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/CreatePitResponse.java new file mode 100644 index 0000000000..4897a96477 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/CreatePitResponse.java @@ -0,0 +1,157 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.ShardStatistics; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + + +@JsonpDeserializable +public class CreatePitResponse implements JsonpSerializable { + + private final String pitId; + + private final ShardStatistics shards; + + private final Long creationTime; + + private CreatePitResponse(Builder builder) { + this.pitId = ApiTypeHelper.requireNonNull(builder.pitId, this, "pitId"); + this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); + this.creationTime = ApiTypeHelper.requireNonNull(builder.creationTime, this, "creationTime"); + } + + public static CreatePitResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code pit_d} + */ + public final String pitId() { + return this.pitId; + } + + /** + * Required - API name: {@code _shards} + */ + public final ShardStatistics shards() { + return this.shards; + } + + /** + * Required - API name: {@code creation_time} + */ + public final Long creationTime() { + return this.creationTime; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("pit_id"); + generator.write(this.pitId); + + generator.writeKey("_shards"); + this.shards.serialize(generator, mapper); + + generator.writeKey("creation_time"); + generator.write(this.creationTime); + + } + + /** + * builder for {@link CreatePitResponse} + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String pitId; + + private ShardStatistics shards; + + private Long creationTime; + + /** + * Required - API name: {@code pit_id} + */ + public final Builder pitId(String pitId) { + this.pitId = pitId; + return this; + } + + /** + * Required - API name: {@code _shards} + */ + public final Builder shards(ShardStatistics value) { + this.shards = value; + return this; + } + + /** + * Required - API name: {@code _shards} + */ + public final Builder shards(Function> fn) { + return this.shards(fn.apply(new ShardStatistics.Builder()).build()); + } + + /** + * Required - API name: {@code creation_time} + */ + public final Builder creationTime(Long creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Builds a {@link CreatePitResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public CreatePitResponse build() { + _checkSingleUse(); + + return new CreatePitResponse(this); + } + } + + /** + * Json deserializer for {@link CreatePitResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CreatePitResponse::setupCreatePitResponseDeserializer); + + protected static void setupCreatePitResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::pitId, JsonpDeserializer.stringDeserializer(), "pit_id"); + op.add(Builder::shards, + ShardStatistics._DESERIALIZER, + "_shards"); + op.add(Builder::creationTime, JsonpDeserializer.longDeserializer(), "creation_time"); + + } +} \ No newline at end of file diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRecord.java new file mode 100644 index 0000000000..f107f52e10 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRecord.java @@ -0,0 +1,127 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class DeletePitRecord implements JsonpSerializable { + + private final String pitId; + + private final Boolean successful; + + private DeletePitRecord(Builder builder) { + this.pitId = builder.pitId; + this.successful = builder.successful; + } + + public static DeletePitRecord of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code pit_id} + */ + public final String pitId() { + return this.pitId; + } + + /** + * API name: {@code successful} + */ + public final Boolean successful() { + return this.successful; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.pitId != null) { + generator.writeKey("pit_id"); + generator.write(this.pitId); + + } + if (this.successful != null) { + generator.writeKey("successful"); + generator.write(this.successful); + + } + } + + /** + * Builder for {@link DeletePitRecord}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String pitId; + + private Boolean successful; + + /** + * API name: {@code pit_id} + */ + public final Builder pitId(String pitId) { + this.pitId = pitId; + return this; + } + + /** + * API name: {@code successful} + */ + public final Builder successful(Boolean successful) { + this.successful = successful; + return this; + } + + /** + * Builds a {@link DeletePitRecord}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeletePitRecord build() { + _checkSingleUse(); + + return new DeletePitRecord(this); + } + } + + /** + * Json deserializer for {@link DeletePitRecord} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + DeletePitRecord::setupDeletePitRecordDeserializer); + + protected static void setupDeletePitRecordDeserializer( + ObjectDeserializer op) { + + op.add(Builder::pitId, JsonpDeserializer.stringDeserializer(), "pit_id"); + op.add(Builder::successful, JsonpDeserializer.booleanDeserializer(), "successful"); + + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRequest.java new file mode 100644 index 0000000000..5ad4a39447 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitRequest.java @@ -0,0 +1,129 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import java.util.List; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + + +/** + * Deletes PITs on the OpenSearch cluster + * + */ +public class DeletePitRequest extends RequestBase implements JsonpSerializable { + + @Nullable + private List pitId; + + public DeletePitRequest(Builder builder) { + this.pitId = builder.pitId; + } + + public static DeletePitRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A list of Pit IDs to be deleted + *

+ * API name - {@code pit_id} + */ + @Nullable + public final List pitId() { + return this.pitId; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.pitId)) { + generator.writeKey("pit_id"); + generator.writeStartArray(); + for (String item0 : this.pitId) { + generator.write(item0); + } + generator.writeEnd(); + + } + + } + + /** + * Builder for {@link DeletePitRequest} + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private List pitId; + + /** + * A list of Pit IDs to be deleted + *

+ * API name - {@code pit_id} + */ + public final Builder pitId(@Nullable List pitId) { + this.pitId = pitId; + return this; + } + + /** + * Builds a {@link DeletePitRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeletePitRequest build() { + _checkSingleUse(); + return new DeletePitRequest(this); + } + } + + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request Method + request -> { + return "DELETE"; + }, + + // Request Path + request -> { + final int _all = 1 << 0; + + int propsSet = 0; + + if (request.pitId() == null) { + propsSet |= _all; + } + if (propsSet == 0) { + return "/_search/point_in_time"; + } else { + return "/_search/point_in_time/_all"; + } + }, + SimpleEndpoint.emptyMap(), SimpleEndpoint.emptyMap(), true, DeletePitResponse._DESERIALIZER); + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitResponse.java new file mode 100644 index 0000000000..bac4f55bd5 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/DeletePitResponse.java @@ -0,0 +1,125 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import java.util.List; +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class DeletePitResponse implements JsonpSerializable { + private final List pits; + + private DeletePitResponse(Builder builder) { + this.pits = ApiTypeHelper.unmodifiableRequired(builder.pits, this, "pits"); + } + + public static DeletePitResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Response value. + *

+ * API name: {@code pits} + */ + public final List pits() { + return this.pits; + } + + /** + * Serialize this value to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartArray(); + for (DeletePitRecord item0 : this.pits) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + /** + * Builder for {@link DeletePitResponse}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private List pits; + + /** + * Required - Response value. + *

+ * API name: {@code pits} + *

+ * Adds all elements of list to pits. + */ + public final Builder pits(List list) { + this.pits = _listAddAll(this.pits, list); + return this; + } + + /** + * Required - Response value. + *

+ * API name: {@code pits} + *

+ * Adds one or more values to pits. + */ + public final Builder pits(DeletePitRecord value, DeletePitRecord... values) { + this.pits = _listAdd(this.pits, value, values); + return this; + } + + /** + * Required - Response value. + *

+ * API name: {@code pits} + *

+ * Adds a value to pits using a builder lambda. + */ + public final Builder pits(Function> fn) { + return pits(fn.apply(new DeletePitRecord.Builder()).build()); + } + + /** + * Builds a {@link DeletePitResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeletePitResponse build() { + _checkSingleUse(); + + return new DeletePitResponse(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DeletePitResponse::createDeletePitResponseDeserializer); + + protected static void createDeletePitResponseDeserializer( + ObjectDeserializer op) { + + JsonpDeserializer> valueDeserializer = JsonpDeserializer + .arrayDeserializer(DeletePitRecord._DESERIALIZER); + + op.add(Builder::pits, valueDeserializer, "pits"); + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitRequest.java new file mode 100644 index 0000000000..1391046f69 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitRequest.java @@ -0,0 +1,40 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; + + +/** + * Lists all PITs on the OpenSearch cluster + * + */ +public class ListAllPitRequest { + public ListAllPitRequest() { + + } + + /** + * Singleton instance for {@link ListAllPitRequest}. + */ + public static final ListAllPitRequest _INSTANCE = new ListAllPitRequest(); + + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> { + return "GET"; + }, + + // Request Path + request -> { + return "/_search/point_in_time/_all"; + }, SimpleEndpoint.emptyMap(), SimpleEndpoint.emptyMap(), false, ListAllPitResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitResponse.java new file mode 100644 index 0000000000..8e3ce672b3 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/ListAllPitResponse.java @@ -0,0 +1,125 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import java.util.List; +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class ListAllPitResponse implements JsonpSerializable { + private final List pits; + + private ListAllPitResponse(Builder builder) { + this.pits = ApiTypeHelper.unmodifiableRequired(builder.pits, this, "pits"); + } + + public static ListAllPitResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Response value. + *

+ * API name: {@code _value_body} + */ + public final List pits() { + return this.pits; + } + + /** + * Serialize this value to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartArray(); + for (PitRecord item0 : this.pits) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + /** + * Builder for {@link ListAllPitResponse}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private List pits; + + /** + * Required - Response value. + *

+ * API name: {@code _value_body} + *

+ * Adds all elements of list to pits. + */ + public final Builder pits(List list) { + this.pits = _listAddAll(this.pits, list); + return this; + } + + /** + * Required - Response value. + *

+ * API name: {@code _value_body} + *

+ * Adds one or more values to pits. + */ + public final Builder pits(PitRecord value, PitRecord... values) { + this.pits = _listAdd(this.pits, value, values); + return this; + } + + /** + * Required - Response value. + *

+ * API name: {@code _value_body} + *

+ * Adds a value to pits using a builder lambda. + */ + public final Builder pits(Function> fn) { + return pits(fn.apply(new PitRecord.Builder()).build()); + } + + /** + * Builds a {@link ListAllPitResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public ListAllPitResponse build() { + _checkSingleUse(); + + return new ListAllPitResponse(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ListAllPitResponse::createListAllPitResponseDeserializer); + + protected static void createListAllPitResponseDeserializer( + ObjectDeserializer op) { + + JsonpDeserializer> valueDeserializer = JsonpDeserializer + .arrayDeserializer(PitRecord._DESERIALIZER); + + op.add(Builder::pits, valueDeserializer, "pits"); + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/PitRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/PitRecord.java new file mode 100644 index 0000000000..52ad829fbd --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/pit/PitRecord.java @@ -0,0 +1,153 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.pit; + +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class PitRecord implements JsonpSerializable { + + private final String pitId; + + private final Long creationTime; + + private final Long keepAlive; + + private PitRecord(Builder builder) { + this.pitId = builder.pitId; + this.creationTime = builder.creationTime; + this.keepAlive = builder.keepAlive; + } + + public static PitRecord of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code pit_id} + */ + public final String pitId() { + return this.pitId; + } + + /** + * API name: {@code creation_time} + */ + public final Long creationTime() { + return this.creationTime; + } + + /** + * API name: {@code keep_alive} + */ + public final Long keepAlive() { + return this.keepAlive; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.pitId != null) { + generator.writeKey("pit_id"); + generator.write(this.pitId); + + } + if (this.creationTime != null) { + generator.writeKey("creation_time"); + generator.write(this.creationTime); + + } + if (this.keepAlive != null) { + generator.writeKey("keep_alive"); + generator.write(this.keepAlive); + + } + } + + /** + * Builder for {@link PitRecord}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String pitId; + + private Long creationTime; + + private Long keepAlive; + + /** + * API name: {@code pit_id} + */ + public final Builder pitId(String pitId) { + this.pitId = pitId; + return this; + } + + /** + * API name: {@code creation_time} + */ + public final Builder creationTime(Long creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * API name: {@code keep_alive} + */ + public final Builder keepAlive(Long keepAlive) { + this.keepAlive = keepAlive; + return this; + } + + /** + * Builds a {@link PitRecord}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public PitRecord build() { + _checkSingleUse(); + + return new PitRecord(this); + } + } + + /** + * Json deserializer for {@link PitRecord} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + PitRecord::setupPitRecordDeserializer); + + protected static void setupPitRecordDeserializer( + ObjectDeserializer op) { + + op.add(Builder::pitId, JsonpDeserializer.stringDeserializer(), "pit_id"); + op.add(Builder::creationTime, JsonpDeserializer.longDeserializer(), "creation_time"); + op.add(Builder::keepAlive, JsonpDeserializer.longDeserializer(), "keep_alive"); + + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Pit.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Pit.java new file mode 100644 index 0000000000..acc4d47376 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Pit.java @@ -0,0 +1,127 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core.search; + +import java.util.function.Function; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class Pit implements JsonpSerializable { + private final String id; + + @Nullable + private final String keepAlive; + + private Pit(Builder builder) { + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.keepAlive = builder.keepAlive; + } + + public static Pit of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * API name: {@code keep_alive} + */ + @Nullable + public final String keepAlive() { + return this.keepAlive; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeKey("id"); + generator.write(this.id); + + if (this.keepAlive != null) { + generator.writeKey("keep_alive"); + generator.write(this.keepAlive); + } + } + + /** + * Builder for {@link Pit}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + private String id; + + @Nullable + private String keepAlive; + + /** + * Required - API name: {@code id} + */ + public final Builder id(String id) { + this.id = id; + return this; + } + + /** + * API name: {@code keep_alive} + */ + public final Builder keepAlive(@Nullable String keepAlive) { + this.keepAlive = keepAlive; + return this; + } + + /** + * Builds a {@link Pit}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public Pit build() { + _checkSingleUse(); + + return new Pit(this); + } + } + + /** + * Json deserializer for {@link Pit} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Pit::setupPitDeserializer); + + protected static void setupPitDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::keepAlive, JsonpDeserializer.stringDeserializer(), "keep_alive"); + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java index af9f9caeb0..7c6b1cdee5 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java @@ -8,9 +8,17 @@ package org.opensearch.client.opensearch.integTest; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.junit.Test; +import org.opensearch.Version; import org.opensearch.client.opensearch._types.Bytes; import org.opensearch.client.opensearch._types.Refresh; import org.opensearch.client.opensearch._types.Result; +import org.opensearch.client.opensearch._types.Time; import org.opensearch.client.opensearch.cat.AliasesResponse; import org.opensearch.client.opensearch.cat.AllocationResponse; import org.opensearch.client.opensearch.cat.IndicesResponse; @@ -27,12 +35,10 @@ import org.opensearch.client.opensearch.cat.segments.SegmentsRecord; import org.opensearch.client.opensearch.cat.shards.ShardsRecord; import org.opensearch.client.opensearch.core.IndexResponse; +import org.opensearch.client.opensearch.core.InfoResponse; +import org.opensearch.client.opensearch.core.pit.CreatePitResponse; import org.opensearch.client.opensearch.indices.CreateIndexResponse; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - public abstract class AbstractCatClientIT extends OpenSearchJavaClientTestCase { public void testCatNodes() throws Exception { @@ -188,10 +194,10 @@ public void testCatSegments() throws Exception { createIndex("cat-segments-test-index"); final IndexResponse index = javaClient().index(b -> b - .index("test-cat-segments-index") - .id("id") - .refresh(Refresh.True) - .document(Map.of("test-cat-segments-key", "test-cat-segments-value"))); + .index("test-cat-segments-index") + .id("id") + .refresh(Refresh.True) + .document(Map.of("test-cat-segments-key", "test-cat-segments-value"))); assertTrue(index.result() == Result.Created); @@ -209,6 +215,35 @@ public void testCatSegments() throws Exception { assertNull(segmentsRecord.ip()); assertNull(segmentsRecord.prirep()); } + + @Test + public void testCatPitSegments() throws Exception { + InfoResponse info = javaClient().info(); + String version = info.version().number(); + if (version.contains("SNAPSHOT")) { + version = version.split("-")[0]; + } + assumeTrue("The PIT is supported in OpenSearch 2.4.0 and later", + Version.fromString(version).onOrAfter(Version.fromString("2.4.0"))); + createIndex("cat-pit-segments-test-index"); + + final IndexResponse index = javaClient().index(b -> b + .index("test-cat-pit-segments-index") + .id("id") + .refresh(Refresh.True) + .document(Map.of("test-cat-pit-segments-key", "test-cat-pit-segments-value"))); + + assertTrue(index.result() == Result.Created); + + createPit("cat-pit-segments-test-index"); + + SegmentsResponse PitSegmentsResponse = javaClient().cat() + .pitSegments(r -> r.headers("index,shard,id,segment,size")); + + assertNotNull("PitSegmentsResponse.segments() is null", PitSegmentsResponse.valueBody()); + assertTrue("PitSegmentsResponse.segments().size() == 0", + PitSegmentsResponse.valueBody().size() > 0); + } private void createIndex(String indexName) throws Exception { CreateIndexResponse createResponse = javaClient().indices().create(b -> b.index(indexName)); @@ -216,4 +251,12 @@ private void createIndex(String indexName) throws Exception { assertTrue(createResponse.shardsAcknowledged()); } + private void createPit(String indexName) throws Exception { + CreatePitResponse createPitResponse = javaClient() + .createPit(r -> r.targetIndexes(Collections.singletonList(indexName)) + .keepAlive(new Time.Builder().time("100m").build())); + assertNotNull(createPitResponse); + assertNotNull(createPitResponse.pitId()); + } + } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index 586abd49d9..0435cb9f72 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -38,6 +38,7 @@ import org.opensearch.client.opensearch._types.FieldValue; import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.Time; import org.opensearch.client.opensearch._types.aggregations.Aggregate; import org.opensearch.client.opensearch._types.aggregations.HistogramAggregate; import org.opensearch.client.opensearch._types.aggregations.TermsAggregation; @@ -55,6 +56,11 @@ import org.opensearch.client.opensearch.core.SearchResponse; import org.opensearch.client.opensearch.core.bulk.OperationType; import org.opensearch.client.opensearch.core.msearch.RequestItem; +import org.opensearch.client.opensearch.core.pit.CreatePitRequest; +import org.opensearch.client.opensearch.core.pit.CreatePitResponse; +import org.opensearch.client.opensearch.core.pit.DeletePitRequest; +import org.opensearch.client.opensearch.core.pit.DeletePitResponse; +import org.opensearch.client.opensearch.core.pit.ListAllPitResponse; import org.opensearch.client.opensearch.core.search.CompletionSuggester; import org.opensearch.client.opensearch.core.search.FieldSuggester; import org.opensearch.client.opensearch.core.search.FieldSuggesterBuilders; @@ -591,6 +597,61 @@ public void testCompletionSuggester() throws IOException { assertTrue(response.suggest().size() > 0); } + @Test + public void testPit() throws IOException { + InfoResponse info = javaClient().info(); + String version = info.version().number(); + if (version.contains("SNAPSHOT")) { + version = version.split("-")[0]; + } + assumeTrue("The PIT is supported in OpenSearch 2.4.0 and later", + Version.fromString(version).onOrAfter(Version.fromString("2.4.0"))); + String index = "test-point-in-time"; + + javaClient().indices().create(c -> c + .index(index)); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + javaClient().index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + CreatePitRequest createPitRequest = new CreatePitRequest.Builder() + .targetIndexes(Collections.singletonList(index)) + .keepAlive(new Time.Builder().time("100m").build()).build(); + + CreatePitResponse createPitResponse = javaClient() + .createPit(createPitRequest); + + assertNotNull(createPitResponse); + assertNotNull(createPitResponse.pitId()); + assertEquals(createPitResponse.shards().total(), + createPitResponse.shards().successful()); + + ListAllPitResponse listAllPitResponse = javaClient().listAllPit(); + + assertNotNull(listAllPitResponse); + assertNotNull(listAllPitResponse.pits()); + assertEquals(listAllPitResponse.pits().get(0).pitId(), createPitResponse.pitId()); + assertEquals(listAllPitResponse.pits().get(0).keepAlive(), Long.valueOf(6000000L)); + + DeletePitRequest deletePitRequest = new DeletePitRequest.Builder() + .pitId(Collections.singletonList(createPitResponse.pitId())).build(); + + DeletePitResponse deletePitResponse = javaClient() + .deletePit(deletePitRequest); + + assertNotNull(deletePitResponse); + assertNotNull(deletePitResponse.pits()); + assertEquals(deletePitResponse.pits().get(0).pitId(), createPitResponse.pitId()); + assertTrue(deletePitResponse.pits().get(0).successful()); + } + // @Test // public void testValueBodyResponse() throws Exception { // DiskUsageResponse resp = highLevelClient().indices().diskUsage(b -> b From a7d26247e84dc05dd8580f40b9c8dc693554d898 Mon Sep 17 00:00:00 2001 From: szczepanczykd <48957041+szczepanczykd@users.noreply.github.com> Date: Thu, 11 May 2023 19:22:58 +0200 Subject: [PATCH 046/123] fix: handle String error deserialization for ErrorCause object (#301) (#476) (#478) * fix: handle String error deserialization for ErrorCause object (#301) * update CHANGELOG.md --------- Signed-off-by: Dominik Szczepanczyk --- CHANGELOG.md | 2 ++ .../opensearch/_types/ErrorResponse.java | 22 ++++++++++++++++++- .../integTest/AbstractIndicesClientIT.java | 17 ++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a2bdc407..03096472b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Do not double-wrap OpenSearchException on error ([#323](https://github.com/opensearch-project/opensearch-java/pull/323)) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) +- Fix parsing /_alias error response for not existing alias ([#476](https://github.com/opensearch-project/opensearch-java/pull/476)) + ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java index 2f71c65905..a3e63ec7dc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java @@ -42,10 +42,12 @@ import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.json.UnionDeserializer; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; import jakarta.json.stream.JsonGenerator; + import java.util.function.Function; // typedef: _types.ErrorResponseBase @@ -57,6 +59,11 @@ */ @JsonpDeserializable public class ErrorResponse implements JsonpSerializable { + + private enum Kind { + OBJECT, + STRING + } private final ErrorCause error; private final int status; @@ -164,9 +171,22 @@ public ErrorResponse build() { protected static void setupErrorResponseDeserializer(ObjectDeserializer op) { - op.add(Builder::error, ErrorCause._DESERIALIZER, "error"); + op.add(Builder::error, buildErrorCauseDeserializers(), "error"); op.add(Builder::status, JsonpDeserializer.integerDeserializer(), "status"); } + protected static JsonpDeserializer buildErrorCauseDeserializers() { + return new UnionDeserializer.Builder<>(ErrorResponse::getErrorCause, false) + .addMember(Kind.OBJECT, ErrorCause._DESERIALIZER) + .addMember(Kind.STRING, JsonpDeserializer.stringDeserializer()) + .build(); + } + + private static ErrorCause getErrorCause(Kind kind, Object errorCause) { + return Kind.STRING.equals(kind) ? + ErrorCause.of(builder -> builder.type("string_error").reason((String) errorCause)) : + (ErrorCause) errorCause; + } + } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java index f17d7b6167..869e63cc1c 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java @@ -15,6 +15,8 @@ import org.opensearch.client.opensearch.indices.DataStream; import org.opensearch.client.opensearch.indices.DataStreamsStatsResponse; import org.opensearch.client.opensearch.indices.DeleteDataStreamResponse; +import org.opensearch.client.opensearch.indices.GetAliasRequest; +import org.opensearch.client.opensearch.indices.GetAliasResponse; import org.opensearch.client.opensearch.indices.GetDataStreamResponse; import org.opensearch.client.opensearch.indices.GetIndexRequest; import org.opensearch.client.opensearch.indices.GetIndexResponse; @@ -188,4 +190,19 @@ public void testDataStream() throws IOException { assertEquals(ex.status(), 404); } } + + public void testGetNotExistingIndexAlias() throws Exception { + String notExistingIndexAlias = "alias_not_exists"; + GetAliasRequest aliasRequest = new GetAliasRequest.Builder().name(notExistingIndexAlias).build(); + try { + GetAliasResponse response = javaClient().indices().getAlias(aliasRequest); + fail(); + } catch (OpenSearchException ex) { + assertNotNull(ex); + assertEquals(ex.status(), 404); + assertEquals(ex.getMessage(), + "Request failed: [string_error] " + + "alias [alias_not_exists] missing"); + } + } } \ No newline at end of file From 964be9ebc3d5c031c29afa50d5649e8be5aba11e Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Tue, 16 May 2023 11:34:06 -0700 Subject: [PATCH 047/123] Upgrading gradle plugin dependency-license-report to 2.2 (#483) (#485) * Upgrading gradle plugin dependency-license-report to 2.x line * Add Changelog --------- Signed-off-by: Vacha Shah --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03096472b9..9d36796323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added Point-In-Time APIs ([#461](https://github.com/opensearch-project/opensearch-java/pull/461)) ### Dependencies +- Bumps `com.github.jk1.dependency-license-report` from 1.19 to 2.2 ### Changed - Improve time taken by Github actions by using cache ([#439](https://github.com/opensearch-project/opensearch-java/pull/439)) diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 463e7b0f18..2cff75fb74 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -48,7 +48,7 @@ plugins { `java-library` checkstyle `maven-publish` - id("com.github.jk1.dependency-license-report") version "1.19" + id("com.github.jk1.dependency-license-report") version "2.2" } checkstyle { From 4294495e4b512afe54ce49fdfa9e8c73a0a79f97 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Sun, 21 May 2023 11:46:44 -0400 Subject: [PATCH 048/123] Fixes deserialization of enums when using booleans instead of strings (#482) (#488) * Fixes deserialization of enums when using booleans instead of strings * Fixes CHANGELOG.md * Fixes checkstyle failure * Include boolean support in existing JsonEnum.Deserializer --------- (cherry picked from commit 5af5674fa18095d2c9ecadf921e623718da64d9f) Signed-off-by: Patrick Schlindwein Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../org/opensearch/client/json/JsonEnum.java | 34 ++++++++++++++----- .../client/opensearch/model/EnumTest.java | 18 ++++++++-- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d36796323..e91b224385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) - Fix search failure with missing required property HitsMetadata.total when trackTotalHits is disabled ([#372](https://github.com/opensearch-project/opensearch-java/pull/372)) - Fix failure when deserialing response for tasks API ([#463](https://github.com/opensearch-project/opensearch-java/pull/463)) +- Fix failure when deserializing boolean types for enums ([#463](https://github.com/opensearch-project/opensearch-java/pull/482)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java b/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java index 6d5aaf9e03..ab63641594 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java @@ -44,7 +44,7 @@ /** * Base interface for enumerations in API types. Members have a JSON representation and also accept - * aliases when parsed from a string value. + * aliases when parsed from a string value. For some enumerations primitive boolean values are also supported. */ public interface JsonEnum extends JsonpSerializable { String jsonValue(); @@ -62,19 +62,24 @@ default void serialize(JsonGenerator generator, JsonpMapper params) { class Deserializer extends JsonpDeserializerBase { private final Map lookupTable; + private static final EnumSet ACCEPTED_EVENTS = EnumSet.of( + JsonParser.Event.VALUE_STRING, + JsonParser.Event.KEY_NAME, + JsonParser.Event.VALUE_TRUE, + JsonParser.Event.VALUE_FALSE + ); + + private static final EnumSet NATIVE_EVENTS = EnumSet.of(JsonParser.Event.VALUE_STRING); + public Deserializer(T[] values) { - super( - EnumSet.of(JsonParser.Event.VALUE_STRING, JsonParser.Event.KEY_NAME), - EnumSet.of(JsonParser.Event.VALUE_STRING) - ); + super(ACCEPTED_EVENTS, NATIVE_EVENTS); - // Use the same size calculation as in java.lang.Enum.enumConstantDirectory - this.lookupTable = new HashMap<>((int)(values.length / 0.75f) + 1); + this.lookupTable = new HashMap<>((int) (values.length / 0.75f) + 1); for (T member : values) { this.lookupTable.put(member.jsonValue(), member); String[] aliases = member.aliases(); if (aliases != null) { - for (String alias: aliases) { + for (String alias : aliases) { this.lookupTable.put(alias, member); } } @@ -83,7 +88,18 @@ public Deserializer(T[] values) { @Override public T deserialize(JsonParser parser, JsonpMapper mapper, JsonParser.Event event) { - String value = parser.getString(); + String value; + switch (event) { + case VALUE_TRUE: + value = "true"; + break; + case VALUE_FALSE: + value = "false"; + break; + default: + value = parser.getString(); + } + return deserialize(value, parser); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/EnumTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/EnumTest.java index 4624385103..7faaee7105 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/EnumTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/EnumTest.java @@ -32,14 +32,14 @@ package org.opensearch.client.opensearch.model; +import org.junit.Test; import org.opensearch.client.opensearch._types.Bytes; +import org.opensearch.client.opensearch._types.mapping.DynamicMapping; import org.opensearch.client.opensearch._types.mapping.GeoOrientation; -import org.junit.Assert; -import org.junit.Test; import java.util.Arrays; -public class EnumTest extends Assert { +public class EnumTest extends ModelTestCase { @Test public void testSimpleEnum() { @@ -56,4 +56,16 @@ public void testEnumWithAliases() { assertEquals(GeoOrientation.Right, GeoOrientation._DESERIALIZER.parse(alias)); }); } + + @Test + public void testEnumWithBooleanSupport() { + var booleanAsString = fromJson("\"true\"", DynamicMapping.class); + assertEquals(booleanAsString, DynamicMapping.True); + + var nonBooleanEnumValue = fromJson("\"runtime\"", DynamicMapping.class); + assertEquals(nonBooleanEnumValue, DynamicMapping.Runtime); + + var booleanPrimitive = fromJson("false", DynamicMapping.class); + assertEquals(booleanPrimitive, DynamicMapping.False); + } } From 5b594489e3f039497927775feea903d1906038a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Szczepa=C5=84czyk?= <48957041+szczepanczykd@users.noreply.github.com> Date: Tue, 23 May 2023 17:21:13 +0200 Subject: [PATCH 049/123] Backport/backport 489 to 2.x (#496) * fix: handle String error deserialization for ErrorCause object (#301) (#476) * fix: handle String error deserialization for ErrorCause object (#301) Signed-off-by: Dominik Szczepanczyk * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk * fix: change int type to long (#489) * fix: change int type to long Signed-off-by: Dominik Szczepanczyk * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk * fix: change totalDataSetSizeInBytes to Long too Signed-off-by: Dominik Szczepanczyk * fix: skip removing opensearch-observability index in AfterTest cleanup Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk --------- Signed-off-by: Dominik Szczepanczyk --- CHANGELOG.md | 2 +- .../client/opensearch/_types/StoreStats.java | 30 +++++++++---------- .../OpenSearchJavaClientTestCase.java | 3 +- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e91b224385..059f0a0b20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,7 +103,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) - Fix parsing /_alias error response for not existing alias ([#476](https://github.com/opensearch-project/opensearch-java/pull/476)) - +- Fix StoryStats numeric value out of range of int ([#489](https://github.com/opensearch-project/opensearch-java/pull/489)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java index 6abe2f6626..6931c5c4ee 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java @@ -57,18 +57,18 @@ public class StoreStats implements JsonpSerializable { @Nullable private final String size; - private final int sizeInBytes; + private final long sizeInBytes; @Nullable private final String reserved; - private final int reservedInBytes; + private final long reservedInBytes; @Nullable private final String totalDataSetSize; @Nullable - private final Integer totalDataSetSizeInBytes; + private final Long totalDataSetSizeInBytes; // --------------------------------------------------------------------------------------------- @@ -98,7 +98,7 @@ public final String size() { /** * Required - API name: {@code size_in_bytes} */ - public final int sizeInBytes() { + public final long sizeInBytes() { return this.sizeInBytes; } @@ -113,7 +113,7 @@ public final String reserved() { /** * Required - API name: {@code reserved_in_bytes} */ - public final int reservedInBytes() { + public final long reservedInBytes() { return this.reservedInBytes; } @@ -129,7 +129,7 @@ public final String totalDataSetSize() { * API name: {@code total_data_set_size_in_bytes} */ @Nullable - public final Integer totalDataSetSizeInBytes() { + public final Long totalDataSetSizeInBytes() { return this.totalDataSetSizeInBytes; } @@ -183,18 +183,18 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder op) { op.add(Builder::size, JsonpDeserializer.stringDeserializer(), "size"); - op.add(Builder::sizeInBytes, JsonpDeserializer.integerDeserializer(), "size_in_bytes"); + op.add(Builder::sizeInBytes, JsonpDeserializer.longDeserializer(), "size_in_bytes"); op.add(Builder::reserved, JsonpDeserializer.stringDeserializer(), "reserved"); - op.add(Builder::reservedInBytes, JsonpDeserializer.integerDeserializer(), "reserved_in_bytes"); + op.add(Builder::reservedInBytes, JsonpDeserializer.longDeserializer(), "reserved_in_bytes"); op.add(Builder::totalDataSetSize, JsonpDeserializer.stringDeserializer(), "total_data_set_size"); - op.add(Builder::totalDataSetSizeInBytes, JsonpDeserializer.integerDeserializer(), + op.add(Builder::totalDataSetSizeInBytes, JsonpDeserializer.longDeserializer(), "total_data_set_size_in_bytes"); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java index 6dacb20f41..7cae6e2599 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -39,6 +39,7 @@ import java.util.TreeSet; public abstract class OpenSearchJavaClientTestCase extends OpenSearchRestTestCase implements OpenSearchTransportSupport { + private static final List systemIndices = List.of(".opensearch-observability", ".opendistro_security"); private static OpenSearchClient javaClient; private static OpenSearchClient adminJavaClient; @@ -137,7 +138,7 @@ protected void wipeAllOSIndices() throws IOException { .indices(r -> r.headers("index,creation.date").expandWildcards(ExpandWildcard.All)); for (IndicesRecord index : response.valueBody()) { - if (index.index() != null && !".opendistro_security".equals(index.index())) { + if (index.index() != null && !systemIndices.contains(index.index())) { adminJavaClient().indices().delete(new DeleteIndexRequest.Builder().index(index.index()).build()); } } From 3d781909334861b3e7b6e9d8ce474c07660a288a Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Tue, 23 May 2023 11:44:42 -0700 Subject: [PATCH 050/123] Upgrading to latest OpenSearch version (#487) Signed-off-by: Vacha Shah --- .github/workflows/test-integration.yml | 4 +++- COMPATIBILITY.md | 12 ++++++------ java-client/build.gradle.kts | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 5f76dfd2a2..2aa32ecb2d 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -12,13 +12,15 @@ jobs: - { opensearch_version: 1.0.1, java: 11 } - { opensearch_version: 1.1.0, java: 11 } - { opensearch_version: 1.2.4, java: 11 } - - { opensearch_version: 1.3.5, java: 11 } + - { opensearch_version: 1.3.9, java: 11 } - { opensearch_version: 2.0.1, java: 11 } - { opensearch_version: 2.1.0, java: 11 } - { opensearch_version: 2.2.1, java: 11 } - { opensearch_version: 2.3.0, java: 11 } - { opensearch_version: 2.4.1, java: 11 } - { opensearch_version: 2.5.0, java: 11 } + - { opensearch_version: 2.6.0, java: 11 } + - { opensearch_version: 2.7.0, java: 11 } steps: - name: Checkout Java Client uses: actions/checkout@v3 diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 6e640f7016..994c3102ef 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -7,12 +7,12 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | Client Version | OpenSearch Version | |----------------|--------------------| -| 1.0.0 | 1.0.0-1.3.3 | -| 2.0.0 | 1.3.3-2.0.1 | -| 2.1.0 | 1.3.3-2.3.0 | -| 2.2.0 | 1.3.3-2.5.0 | -| 2.3.0 | 1.3.3-2.6.0 | -| 2.4.0 | 1.3.3-2.6.0 | +| 1.0.0 | 1.0.0-1.3.9 | +| 2.0.0 | 1.3.9-2.0.1 | +| 2.1.0 | 1.3.9-2.3.0 | +| 2.2.0 | 1.3.9-2.5.0 | +| 2.3.0 | 1.3.9-2.7.0 | +| 2.4.0 | 1.3.9-2.7.0 | ## Upgrading diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 2cff75fb74..59171ca2e1 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -139,7 +139,7 @@ val integrationTest = task("integrationTest") { dependencies { - val opensearchVersion = "2.4.1" + val opensearchVersion = "2.7.0" val jacksonVersion = "2.14.2" val jacksonDatabindVersion = "2.14.2" From 2f833612f1b0036ae86a4cb1bad9b547415d6934 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 30 May 2023 13:35:29 -0400 Subject: [PATCH 051/123] Add RestClient initialization code snippets (#501) (#504) * Add RestClient initialization code snippets Signed-off-by: Andriy Redko * Address code review comments Signed-off-by: Andriy Redko --------- Signed-off-by: Andriy Redko (cherry picked from commit 9c815025f8dd7f91fd2d4c7cb104d5ddd1fda143) --- USER_GUIDE.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 4d3dfc02da..80ad396a15 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -76,7 +76,18 @@ There are multiple low level transports which `OpenSearchClient` could be config ### Create a client using `RestClientTransport` ```java -Transport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); +import org.apache.http.HttpHost; + +final HttpHost[] hosts = new HttpHost[] { + new HttpHost("localhost", 9200, "http") + }; + +// Initialize the client with SSL and TLS enabled +final RestClient restClient = RestClient + .builder(hosts) + .build(); + +OpenSearchTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); OpenSearchClient client = new OpenSearchClient(transport); ``` @@ -91,7 +102,13 @@ OpenSearchClient client = new OpenSearchClient(transport); ### Create a client using `ApacheHttpClient5Transport` ```java -final Transport transport = ApacheHttpClient5TransportBuilder +import org.apache.hc.core5.http.HttpHost; + +final HttpHost[] hosts = new HttpHost[] { + new HttpHost("localhost", "http", 9200) + }; + +final OpenSearchTransport transport = ApacheHttpClient5TransportBuilder .builder(hosts) .setMapper(new JacksonJsonpMapper()) .build(); From 18c4f071963e9cc85e7da2c979265a1af027a7f4 Mon Sep 17 00:00:00 2001 From: Qi Chen Date: Wed, 31 May 2023 18:09:31 -0500 Subject: [PATCH 052/123] [Backport] backport-495-to-2.x (#508) FIX: catch 401 and 403 status and return proper error message Signed-off-by: George Chen --- CHANGELOG.md | 1 + .../rest_client/RestClientTransport.java | 7 +- .../integTest/restclient/RequestIT.java | 72 +++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 059f0a0b20..b25b92f851 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) - Fix parsing /_alias error response for not existing alias ([#476](https://github.com/opensearch-project/opensearch-java/pull/476)) +- Fix catching JsonParsingException ([#494](https://github.com/opensearch-project/opensearch-java/issues/494)) - Fix StoryStats numeric value out of range of int ([#489](https://github.com/opensearch-project/opensearch-java/pull/489)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java b/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java index b4040cb3e4..326cf3d138 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java @@ -32,6 +32,7 @@ package org.opensearch.client.transport.rest_client; +import org.apache.http.HttpStatus; import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch._types.ErrorResponse; import org.opensearch.client.json.JsonpDeserializer; @@ -245,7 +246,11 @@ private ResponseT getHighLevelResponse( try { int statusCode = clientResp.getStatusLine().getStatusCode(); - if (endpoint.isError(statusCode)) { + if (statusCode == HttpStatus.SC_FORBIDDEN) { + throw new TransportException("Forbidden access", new ResponseException(clientResp)); + } else if (statusCode == HttpStatus.SC_UNAUTHORIZED) { + throw new TransportException("Unauthorized access", new ResponseException(clientResp)); + } else if (endpoint.isError(statusCode)) { JsonpDeserializer errorDeserializer = endpoint.errorDeserializer(statusCode); if (errorDeserializer == null) { throw new TransportException( diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java index 2f001541cf..7cceb9e39a 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java @@ -9,17 +9,89 @@ package org.opensearch.client.opensearch.integTest.restclient; import java.io.IOException; +import java.util.Optional; import org.apache.http.HttpHost; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.conn.ssl.TrustAllStrategy; +import org.apache.http.conn.ssl.TrustStrategy; +import org.apache.http.impl.client.BasicCredentialsProvider; +import org.apache.http.ssl.SSLContexts; +import org.junit.Assume; +import org.junit.Test; +import org.opensearch.client.RestClient; +import org.opensearch.client.json.JsonData; import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.OpenSearchClient; +import org.opensearch.client.opensearch.core.SearchRequest; +import org.opensearch.client.opensearch.indices.CreateIndexRequest; +import org.opensearch.client.opensearch.indices.IndexSettings; import org.opensearch.client.opensearch.integTest.AbstractRequestIT; import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.TransportException; import org.opensearch.client.transport.rest_client.RestClientTransport; import org.opensearch.common.settings.Settings; +import javax.net.ssl.SSLContext; + +import static org.hamcrest.CoreMatchers.equalTo; + public class RequestIT extends AbstractRequestIT { @Override public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); } + + @Test + public void testUnauthorized() throws Exception { + // The security plugin is required + Assume.assumeThat(isHttps(), equalTo(true)); + + final String userName = Optional.ofNullable(System.getProperty("user")).orElse("admin"); + final String wrongPassword = Optional.ofNullable(System.getProperty("password")).orElse("admin") + + "wrong"; + + final BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider(); + credentialsProvider.setCredentials(new AuthScope(getClusterHosts().get(0)), + new UsernamePasswordCredentials(userName, wrongPassword)); + + final RestClient restClient = RestClient + .builder(getClusterHosts().toArray(new HttpHost[0])) + .setHttpClientConfigCallback(httpClientBuilder -> { + try { + final TrustStrategy trustStrategy = new TrustAllStrategy(); + final SSLContext sslContext = SSLContexts.custom().loadTrustMaterial( + null, trustStrategy).build(); + return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider) + .setSSLContext(sslContext); + } catch (Exception e) { + throw new RuntimeException(e); + } + }) + .build(); + + final RestClientTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); + final OpenSearchClient client = new OpenSearchClient(transport); + final TransportException transportException = assertThrows(TransportException.class, + () -> client.cluster().getSettings()); + assertEquals("Unauthorized access", transportException.getMessage()); + restClient.close(); + } + + @Test + public void testForbidden() throws Exception { + final OpenSearchClient openSearchClient = javaClient(); + final String testIndex = "test-index"; + final CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(testIndex) + .settings(new IndexSettings.Builder() + .blocksRead(true).build()) + .build(); + openSearchClient.indices().create(createIndexRequest); + final SearchRequest searchRequest = new SearchRequest.Builder().index(testIndex).build(); + final TransportException transportException = assertThrows(TransportException.class, + () -> openSearchClient.search(searchRequest, JsonData.class)); + assertEquals("Forbidden access", transportException.getMessage()); + } } From 5dc144c0d2b420d1a1769aa2fed2fdabefe81346 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 16:55:25 -0700 Subject: [PATCH 053/123] =?UTF-8?q?refactor:=20deprecate=20totalDataSetSiz?= =?UTF-8?q?e=20and=20totalDataSetSizeInBytes=20in=20S=E2=80=A6=20(#498)=20?= =?UTF-8?q?(#502)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: deprecate totalDataSetSize and totalDataSetSizeInBytes in StoreStats * update CHANGELOG.md --------- (cherry picked from commit 722f257e02a402a99540d6ae85e4570a2ed9cbd1) Signed-off-by: Dominik Szczepanczyk Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 ++ .../client/opensearch/_types/StoreStats.java | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b25b92f851..8200f21bec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update maintainers, admins and documentation ([#248](https://github.com/opensearch-project/opensearch-java/pull/248)) ### Deprecated +- Deprecate the totalDataSetSize and totalDataSetSizeInBytes fields in the StoreStats ([#498](https://github.com/opensearch-project/opensearch-java/pull/498)) + ### Removed - Remove support for unsupported dynamic_templates in bulk ([#276](https://github.com/opensearch-project/opensearch-java/pull/276)) diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java index 6931c5c4ee..f1e14e7d8b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java @@ -64,9 +64,11 @@ public class StoreStats implements JsonpSerializable { private final long reservedInBytes; + @Deprecated @Nullable private final String totalDataSetSize; + @Deprecated @Nullable private final Long totalDataSetSizeInBytes; @@ -118,16 +120,22 @@ public final long reservedInBytes() { } /** + * @deprecated + * Not returned by server * API name: {@code total_data_set_size} */ + @Deprecated @Nullable public final String totalDataSetSize() { return this.totalDataSetSize; } /** + * @deprecated + * Not returned by server * API name: {@code total_data_set_size_in_bytes} */ + @Deprecated @Nullable public final Long totalDataSetSizeInBytes() { return this.totalDataSetSizeInBytes; @@ -190,9 +198,11 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder Date: Thu, 1 Jun 2023 08:56:06 -0400 Subject: [PATCH 054/123] FIX: extract reason from error in AWSSdk2Transport (#493) (#509) * MAINT: extract reason from error * MAINT: add change log * MAINT: remove unwanted string * TST: AwsSdk2SecurityIT * MAINT: header --------- (cherry picked from commit 89d154d5aa1e25c271f0cf250498e8057ae37001) Signed-off-by: George Chen Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../transport/aws/AwsSdk2Transport.java | 8 ++++- .../integTest/aws/AwsSdk2SecurityIT.java | 31 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SecurityIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 8200f21bec..ad2b2364f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix AwsSdk2TransportOptions.responseCompression ([#322](https://github.com/opensearch-project/opensearch-java/pull/322)) - Fix missing Highlight and SourceConfig in the MultisearchBody ([#442](https://github.com/opensearch-project/opensearch-java/pull/442)) - Fix parsing /_alias error response for not existing alias ([#476](https://github.com/opensearch-project/opensearch-java/pull/476)) +- Fix missing cause message in missing permission to call Fine Grained Access Control Amazon OpenSearch domain ([#473](https://github.com/opensearch-project/opensearch-java/issues/473)) - Fix catching JsonParsingException ([#494](https://github.com/opensearch-project/opensearch-java/issues/494)) - Fix StoryStats numeric value out of range of int ([#489](https://github.com/opensearch-project/opensearch-java/pull/489)) diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index 8fd1dfa9b4..4609fbd6a1 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -457,7 +457,13 @@ private ResponseT parseResponse( JsonObject val = JsonpDeserializer.jsonValueDeserializer() .deserialize(parser, mapper) .asJsonObject(); - String message = val.getString("Message", null); + String message = null; + if (val.get("error") instanceof JsonObject) { + message = val.get("error").asJsonObject().getString("reason", null); + } + if (message == null) { + message = val.getString("Message", null); + } if (message == null) { message = val.getString("message", null); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SecurityIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SecurityIT.java new file mode 100644 index 0000000000..aef59a3abf --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/aws/AwsSdk2SecurityIT.java @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.aws; + +import org.junit.Test; +import org.opensearch.client.opensearch.OpenSearchClient; +import org.opensearch.client.opensearch._types.OpenSearchException; +import org.opensearch.client.opensearch.cluster.GetClusterSettingsRequest; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; + +public class AwsSdk2SecurityIT extends AwsSdk2TransportTestCase { + private static final String DEFAULT_MESSAGE = "authentication/authorization failure"; + @Test + public void testUnAuthorizedException() { + final OpenSearchClient client = getClient(false, null, null); + final GetClusterSettingsRequest request = new GetClusterSettingsRequest.Builder() + .includeDefaults(true) + .build(); + final OpenSearchException ex = assertThrows( + OpenSearchException.class, () -> client.cluster().getSettings(request)); + assertFalse(ex.getMessage().contains(DEFAULT_MESSAGE)); + } +} From a86c6dddcac9ff682be384b9b71efa4aa787dee0 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 2 Jun 2023 11:55:48 -0700 Subject: [PATCH 055/123] Bump org.eclipse.parsson:parsson from 1.1.1 to 1.1.2 (#492) (#507) * Bump org.eclipse.parsson:parsson from 1.1.1 to 1.1.2 Bumps [org.eclipse.parsson:parsson](https://github.com/eclipse-ee4j/parsson) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/eclipse-ee4j/parsson/releases) - [Commits](https://github.com/eclipse-ee4j/parsson/compare/1.1.1...1.1.2) --- updated-dependencies: - dependency-name: org.eclipse.parsson:parsson dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit 67b4750942a61c4cdd31309060039e13d5c7003e) Signed-off-by: dependabot[bot] Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 3 ++- java-client/build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad2b2364f7..32970c382d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 1.19 to 2.2 +- Bumps `org.eclipse.parsson:parsson` from 1.1.1 to 1.1.2 ### Changed - Improve time taken by Github actions by using cache ([#439](https://github.com/opensearch-project/opensearch-java/pull/439)) @@ -115,4 +116,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/v2.4.0...2.x [2.4.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.3.0...v2.4.0 [2.3.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.2.0...v2.3.0 -[2.2.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.1.0...v2.2.0 +[2.2.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.1.0...v2.2.0 \ No newline at end of file diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 59171ca2e1..5e719468fb 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -154,7 +154,7 @@ dependencies { // Needed even if using Jackson to have an implementation of the Jsonp object model // EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 // https://github.com/eclipse-ee4j/parsson - api("org.eclipse.parsson:parsson:1.1.1") + api("org.eclipse.parsson:parsson:1.1.2") // EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 // http://json-b.net/ From dcc6269b69b65a231eef2637dcacab786bb80287 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 2 Jun 2023 14:12:10 -0700 Subject: [PATCH 056/123] Bump client to 2.6.0 (#512) * Bump client version to 2.6.0 Signed-off-by: Vacha Shah * Update compatibility matrix with new client version 2.5.0 Signed-off-by: Vacha Shah * Update CHANGELOG for the next version Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah --- CHANGELOG.md | 18 +++++++++++++++++- COMPATIBILITY.md | 1 + gradle.properties | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32970c382d..d47141933d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,21 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added + +### Dependencies + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + +## [2.5.0] - 06/02/2023 +### Added - Add workflow to publish snapshots via GHA ([#454](https://github.com/opensearch-project/opensearch-java/pull/454)) - Added Point-In-Time APIs ([#461](https://github.com/opensearch-project/opensearch-java/pull/461)) @@ -113,7 +128,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Security -[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/v2.4.0...2.x +[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/v2.5.0...2.x +[2.5.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.4.0...v2.5.0 [2.4.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.3.0...v2.4.0 [2.3.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.2.0...v2.3.0 [2.2.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.1.0...v2.2.0 \ No newline at end of file diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 994c3102ef..77ba8b8f43 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -13,6 +13,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | 2.2.0 | 1.3.9-2.5.0 | | 2.3.0 | 1.3.9-2.7.0 | | 2.4.0 | 1.3.9-2.7.0 | +| 2.5.0 | 1.3.9-2.7.0 | ## Upgrading diff --git a/gradle.properties b/gradle.properties index e6f6009118..e5508d890e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -systemProp.version = 2.5.0 +systemProp.version = 2.6.0 From b41f95f50387f9399c5d6efe26f09a3f3f579530 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 6 Jun 2023 08:57:37 -0400 Subject: [PATCH 057/123] Bump io.github.classgraph:classgraph from 4.8.158 to 4.8.160 in /java-client (#514) (#517) * Bump io.github.classgraph:classgraph in /java-client Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.158 to 4.8.160. - [Release notes](https://github.com/classgraph/classgraph/releases) - [Commits](https://github.com/classgraph/classgraph/compare/classgraph-4.8.158...classgraph-4.8.160) --- updated-dependencies: - dependency-name: io.github.classgraph:classgraph dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit ae4ac0e08e0b60236805fd75e334aa4e05a8c304) Signed-off-by: dependabot[bot] Signed-off-by: Andriy Redko Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 2 ++ java-client/build.gradle.kts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d47141933d..328ad363b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added ### Dependencies +- Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 +- Bumps `io.github.classgraph:classgraph` from 4.8.157 to 4.8.160 ### Changed diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 5e719468fb..ce614717a8 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -48,7 +48,7 @@ plugins { `java-library` checkstyle `maven-publish` - id("com.github.jk1.dependency-license-report") version "2.2" + id("com.github.jk1.dependency-license-report") version "2.4" } checkstyle { @@ -186,7 +186,7 @@ dependencies { implementation("org.eclipse", "yasson", "2.0.2") // https://github.com/classgraph/classgraph - testImplementation("io.github.classgraph:classgraph:4.8.157") + testImplementation("io.github.classgraph:classgraph:4.8.160") // Eclipse 1.0 testImplementation("junit", "junit" , "4.13.2") { From d3765278773e5a2908eb8b25296c69cfd38d1a8d Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 6 Jun 2023 14:09:36 -0400 Subject: [PATCH 058/123] fix: add several missing fields in MultisearchBody.Builder (#506) (#516) (#519) * fix: add several missing fields in MultisearchBody.Builder (#506) - add minScore, postFilter, searchAfter, sort, trackScores to MultisearchBody * update CHANGELOG.md --------- Signed-off-by: Maksim Strutovskii Signed-off-by: Andriy Redko Co-authored-by: Mstrutov <41866740+Mstrutov@users.noreply.github.com> --- CHANGELOG.md | 2 +- .../core/msearch/MultisearchBody.java | 200 ++++++++++++++++++ .../AbstractMultiSearchRequestIT.java | 160 +++++++++++++- 3 files changed, 352 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 328ad363b1..07b9b3d4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix search failure with missing required property HitsMetadata.total when trackTotalHits is disabled ([#372](https://github.com/opensearch-project/opensearch-java/pull/372)) - Fix failure when deserialing response for tasks API ([#463](https://github.com/opensearch-project/opensearch-java/pull/463)) - Fix failure when deserializing boolean types for enums ([#463](https://github.com/opensearch-project/opensearch-java/pull/482)) - +- Fix missing minScore, postFilter, searchAfter, sort, trackScores in the MultisearchBody ([#516](https://github.com/opensearch-project/opensearch-java/pull/516)) ### Security ## [2.4.0] - 04/11/2023 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java index 8fb418a153..aaee0642ea 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java @@ -36,6 +36,7 @@ package org.opensearch.client.opensearch.core.msearch; +import org.opensearch.client.opensearch._types.SortOptions; import org.opensearch.client.opensearch._types.aggregations.Aggregation; import org.opensearch.client.opensearch._types.query_dsl.Query; import org.opensearch.client.opensearch.core.search.Highlight; @@ -53,6 +54,7 @@ import org.opensearch.client.util.ObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.util.List; import java.util.Map; import java.util.function.Function; import javax.annotation.Nullable; @@ -70,9 +72,22 @@ public class MultisearchBody implements JsonpSerializable { @Nullable private final Integer from; + @Nullable + private final Double minScore; + + @Nullable + private final Query postFilter; + + private final List searchAfter; + @Nullable private final Integer size; + private final List sort; + + @Nullable + private final Boolean trackScores; + @Nullable private final TrackHits trackTotalHits; @@ -92,7 +107,12 @@ private MultisearchBody(Builder builder) { this.aggregations = ApiTypeHelper.unmodifiable(builder.aggregations); this.query = builder.query; this.from = builder.from; + this.minScore = builder.minScore; + this.postFilter = builder.postFilter; + this.searchAfter = ApiTypeHelper.unmodifiable(builder.searchAfter); this.size = builder.size; + this.sort = ApiTypeHelper.unmodifiable(builder.sort); + this.trackScores = builder.trackScores; this.trackTotalHits = builder.trackTotalHits; this.suggest = builder.suggest; this.highlight = builder.highlight; @@ -127,6 +147,29 @@ public final Integer from() { return this.from; } + /** + * API name: {@code from} + */ + @Nullable + public final Double minScore() { + return this.minScore; + } + + /** + * API name: {@code post_filter} + */ + @Nullable + public final Query postFilter() { + return this.postFilter; + } + + /** + * API name: {@code search_after} + */ + public final List searchAfter() { + return this.searchAfter; + } + /** * API name: {@code size} */ @@ -135,6 +178,21 @@ public final Integer size() { return this.size; } + /** + * API name: {@code sort} + */ + public final List sort() { + return this.sort; + } + + /** + * API name: {@code track_scores} + */ + @Nullable + public final Boolean trackScores() { + return this.trackScores; + } + /** * API name: {@code track_total_hits} */ @@ -198,11 +256,46 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("from"); generator.write(this.from); + } + if (this.minScore != null) { + generator.writeKey("min_score"); + generator.write(this.minScore); + + } + if (this.postFilter != null) { + generator.writeKey("post_filter"); + this.postFilter.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.searchAfter)) { + generator.writeKey("search_after"); + generator.writeStartArray(); + for (String item0 : this.searchAfter) { + generator.write(item0); + + } + generator.writeEnd(); + } if (this.size != null) { generator.writeKey("size"); generator.write(this.size); + } + if (ApiTypeHelper.isDefined(this.sort)) { + generator.writeKey("sort"); + generator.writeStartArray(); + for (SortOptions item0 : this.sort) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.trackScores != null) { + generator.writeKey("track_scores"); + generator.write(this.trackScores); + } if (this.trackTotalHits != null) { generator.writeKey("track_total_hits"); @@ -245,9 +338,24 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder searchAfter; + @Nullable private Integer size; + @Nullable + private List sort; + + @Nullable + private Boolean trackScores; + @Nullable private TrackHits trackTotalHits; @@ -313,6 +421,52 @@ public final Builder from(@Nullable Integer value) { return this; } + /** + * Minimum _score for matching documents. Documents with a lower _score are not + * included in the search results. + *

+ * API name: {@code min_score} + */ + public final Builder minScore(@Nullable Double value) { + this.minScore = value; + return this; + } + + /** + * API name: {@code post_filter} + */ + public final Builder postFilter(@Nullable Query value) { + this.postFilter = value; + return this; + } + + /** + * API name: {@code post_filter} + */ + public final Builder postFilter(Function> fn) { + return this.postFilter(fn.apply(new Query.Builder()).build()); + } + + /** + * API name: {@code search_after} + *

+ * Adds all elements of list to searchAfter. + */ + public final Builder searchAfter(List list) { + this.searchAfter = _listAddAll(this.searchAfter, list); + return this; + } + + /** + * API name: {@code search_after} + *

+ * Adds one or more values to searchAfter. + */ + public final Builder searchAfter(String value, String... values) { + this.searchAfter = _listAdd(this.searchAfter, value, values); + return this; + } + /** * API name: {@code size} */ @@ -321,6 +475,46 @@ public final Builder size(@Nullable Integer value) { return this; } + /** + * API name: {@code sort} + *

+ * Adds all elements of list to sort. + */ + public final Builder sort(List list) { + this.sort = _listAddAll(this.sort, list); + return this; + } + + /** + * API name: {@code sort} + *

+ * Adds one or more values to sort. + */ + public final Builder sort(SortOptions value, SortOptions... values) { + this.sort = _listAdd(this.sort, value, values); + return this; + } + + /** + * API name: {@code sort} + *

+ * Adds a value to sort using a builder lambda. + */ + public final Builder sort(Function> fn) { + return sort(fn.apply(new SortOptions.Builder()).build()); + } + + /** + * If true, calculate and return document scores, even if the scores are not + * used for sorting. + *

+ * API name: {@code track_scores} + */ + public final Builder trackScores(@Nullable Boolean value) { + this.trackScores = value; + return this; + } + /** * API name: {@code track_total_hits} */ @@ -408,7 +602,13 @@ protected static void setupMultisearchBodyDeserializer(ObjectDeserializer response = sendMSearchRequest(index, List.of(sortedItemsQuery)); + assertEquals(1, response.responses().size()); + var hits = response.responses().get(0).result().hits().hits(); + assertEquals(3, hits.size()); + + assertEquals("hammer", hits.get(2).source().getName()); + } + + @Test + public void shouldReturnMultiSearchesTrackingScores() throws Exception { + String index = "multiple_searches_request_track_scores"; + createTestDocuments(index); + + RequestItem sortedItemsQuery = createMSearchSortedFuzzyRequest(); + + MsearchResponse response = sendMSearchRequest(index, List.of(sortedItemsQuery)); + assertEquals(1, response.responses().size()); + var hits = response.responses().get(0).result().hits().hits(); + assertEquals(3, hits.size()); + assertNull(hits.get(0).score()); + assertNull(hits.get(1).score()); + assertNull(hits.get(2).score()); + + RequestItem trackScoreItemsQuery = createMSearchSortedFuzzyRequest(b -> b.trackScores(true)); + + MsearchResponse responseTrackingScore = sendMSearchRequest(index, List.of(trackScoreItemsQuery)); + assertEquals(1, responseTrackingScore.responses().size()); + var hitsTrackingScore = responseTrackingScore.responses().get(0).result().hits().hits(); + assertEquals(3, hitsTrackingScore.size()); + assertNotNull(hitsTrackingScore.get(0).score()); + assertNotNull(hitsTrackingScore.get(1).score()); + assertNotNull(hitsTrackingScore.get(2).score()); + } + + @Test + public void shouldReturnMultiSearchesAboveMinScore() throws Exception { + String index = "multiple_searches_request_min_score"; + createTestDocuments(index); + + RequestItem sortedItemsQuery = createMSearchFuzzyRequest(); + + MsearchResponse response = sendMSearchRequest(index, List.of(sortedItemsQuery)); + assertEquals(1, response.responses().size()); + var hits = response.responses().get(0).result().hits().hits(); + assertEquals(3, hits.size()); + + double minScore = hits.get(2).score(); + double scoreBetweenFirstAndSecondLowest = (hits.get(1).score() + minScore) / 2; + + RequestItem minScoredItemsQuery = createMSearchFuzzyRequest(b -> b.minScore(scoreBetweenFirstAndSecondLowest)); + + MsearchResponse responseAboveMinScore = sendMSearchRequest(index, List.of(minScoredItemsQuery)); + assertEquals(1, responseAboveMinScore.responses().size()); + assertEquals(2, responseAboveMinScore.responses().get(0).result().hits().hits().size()); + } + + @Test + public void shouldReturnMultiSearchesApplyingPostFilter() throws Exception { + String index = "multiple_searches_request_post_filter"; + createTestDocuments(index); + + RequestItem filteredItemsQuery = createMSearchFuzzyRequest(b -> b.postFilter(createItemSizeSearchQuery("large"))); + + MsearchResponse response = sendMSearchRequest(index, List.of(filteredItemsQuery)); + assertEquals(1, response.responses().size()); + assertEquals(1, response.responses().get(0).result().hits().hits().size()); + } + + @Test + public void shouldReturnMultiSearchesSearchAfter() throws Exception { + String index = "multiple_searches_request_search_after"; + createTestDocuments(index); + + RequestItem sortedItemsQuery = createMSearchSortedFuzzyRequest(); + + MsearchResponse response = sendMSearchRequest(index, List.of(sortedItemsQuery)); + assertEquals(1, response.responses().size()); + assertEquals(3, response.responses().get(0).result().hits().hits().size()); + + List sorts = response.responses().get(0).result().hits().hits().get(1).sort(); + RequestItem sortedAfterItemsQuery = createMSearchSortedFuzzyRequest(b -> b.searchAfter(sorts)); + + MsearchResponse response2 = sendMSearchRequest(index, List.of(sortedAfterItemsQuery)); + assertEquals(1, response2.responses().size()); + assertEquals(1, response2.responses().get(0).result().hits().hits().size()); + } + + private void assertResponseSources(MultiSearchResponseItem response) { List> hitsWithHighlights = response.result().hits().hits(); assertEquals(2, hitsWithHighlights.size()); @@ -113,6 +215,34 @@ private RequestItem createMSearchQuery(String itemSize, String fieldName, List b); + } + + private RequestItem createMSearchSortedFuzzyRequest(Function> additional) { + return createMSearchFuzzyRequest(b -> additional.apply(b + .sort(SortOptions.of(sort -> sort.field(FieldSort.of(f -> f.field("quantity").order(SortOrder.Asc))))))); + } + + private RequestItem createMSearchFuzzyRequest() { + return createMSearchFuzzyRequest(b -> b); + } + + private RequestItem createMSearchFuzzyRequest(Function> additional) { + return RequestItem.of(item -> item.header(header -> header) + .body(b -> additional.apply(b.query(createNameSearchFuzzyQuery()))) + ); + } + + private Query createNameSearchFuzzyQuery() { + return Query.of(filter -> filter.fuzzy( + FuzzyQuery.of(term -> term.field("name") + .value(FieldValue.of("rammer")) + ) + ) + ); + } + private SourceConfig createSourcesConfig(List sources) { return sources.isEmpty() ? null : SourceConfig.of(builder -> builder.filter(filter -> filter.includes(sources))); } @@ -143,30 +273,34 @@ private MsearchResponse sendMSearchRequest(String index, List _1.index(index).id("1").document(createItem("hammer", "large", "yes")).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("2").document(createItem("drill", "large", "yes")).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("3").document(createItem("jack", "medium", "yes")).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("4").document(createItem("wrench", "medium", "no")).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("5").document(createItem("screws", "small", "no")).refresh(Refresh.True)); - javaClient().create(_1 -> _1.index(index).id("6").document(createItem("nuts", "small", "no")).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("1").document(createItem("hummer", "huge", "yes", 2)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2").document(createItem("jammer", "huge", "yes", 1)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3").document(createItem("hammer", "large", "yes", 3)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("4").document(createItem("drill", "large", "yes", 3)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("5").document(createItem("jack", "medium", "yes", 2)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("6").document(createItem("wrench", "medium", "no", 3)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("7").document(createItem("screws", "small", "no", 1)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("8").document(createItem("nuts", "small", "no", 2)).refresh(Refresh.True)); } - private ShopItem createItem(String name, String size, String company) { - return new ShopItem(name, size, company); + private ShopItem createItem(String name, String size, String company, int quantity) { + return new ShopItem(name, size, company, quantity); } public static class ShopItem { private String name; private String size; private String company; + private int quantity; public ShopItem() { } - public ShopItem(String name, String size, String company) { + public ShopItem(String name, String size, String company, int quantity) { this.name = name; this.size = size; this.company = company; + this.quantity = quantity; } public String getName() { @@ -192,5 +326,13 @@ public String getCompany() { public void setCompany(String company) { this.company = company; } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } } } From 2050ad12541293aa05a8db4f19917210e0a40bf8 Mon Sep 17 00:00:00 2001 From: Harsha Vamsi Kalluri Date: Wed, 14 Jun 2023 13:22:33 -0700 Subject: [PATCH 059/123] Fix suggestion classes for Term, Phrase, and Completion. (#477) (#529) * Fixes Completion, Phrase, and Term suggesters Signed-off-by: Harsha Vamsi Kalluri * Use resource files instead of JSON strings Signed-off-by: Harsha Vamsi Kalluri * Minor fixes to docs + checksytle Signed-off-by: Harsha Vamsi Kalluri * Adding ES license headers for copied over files Signed-off-by: Harsha Vamsi Kalluri * Fix example formatting Signed-off-by: Harsha Vamsi Kalluri * Update tests to use builders instead of JSON Signed-off-by: Harsha Vamsi Kalluri * Removing un-necessary test resources Signed-off-by: Harsha Vamsi Kalluri --------- Signed-off-by: Harsha Vamsi Kalluri (cherry picked from commit 68e2b6f03ff47ced215f600a7c9f5dd28b0d4595) --- CHANGELOG.md | 2 +- USER_GUIDE.md | 212 ++++++++++++++ .../client/json/ExternallyTaggedUnion.java | 85 ++++-- .../_types/aggregations/Aggregate.java | 10 +- .../core/search/CompletionSuggest.java | 161 +++++++++++ .../core/search/FieldSuggester.java | 179 ++++++------ .../opensearch/core/search/PhraseSuggest.java | 127 +++++++++ .../core/search/PhraseSuggestOption.java | 17 +- .../opensearch/core/search/SearchResult.java | 22 +- .../{SuggestOption.java => Suggest.java} | 83 +++--- .../opensearch/core/search/SuggestBase.java | 165 +++++++++++ .../core/search/SuggestOptionBuilders.java | 2 +- .../core/search/SuggestVariant.java | 43 +++ .../opensearch/core/search/Suggestion.java | 262 ------------------ .../opensearch/core/search/TermSuggest.java | 126 +++++++++ .../integTest/AbstractRequestIT.java | 235 +++++++++++++++- .../AbstractSearchTemplateRequestIT.java | 6 +- 17 files changed, 1299 insertions(+), 438 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggest.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggest.java rename java-client/src/main/java/org/opensearch/client/opensearch/core/search/{SuggestOption.java => Suggest.java} (62%) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestVariant.java delete mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggestion.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 07b9b3d4d7..6861358877 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Removed ### Fixed - +- Fixed Suggesters for Completion, Term, and Phrase and refactored the Suggestion class ([#477](https://github.com/opensearch-project/opensearch-java/pull/477)) ### Security ## [2.5.0] - 06/02/2023 diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 80ad396a15..af5558e895 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -11,6 +11,11 @@ - [Search for the documents](#search-for-the-documents) - [Get raw JSON results](#get-raw-json-results) - [Search documents using a match query](#search-documents-using-a-match-query) + - [Search documents using suggesters](#search-documents-using-suggesters) + - [App Data class](#app-data-class) + - [Using completion suggester](#using-completion-suggester) + - [Using term suggester](#using-term-suggester) + - [Using phrase suggester](#using-phrase-suggester) - [Bulk requests](#bulk-requests) - [Aggregations](#aggregations) - [Delete the document](#delete-the-document) @@ -175,6 +180,213 @@ for (int i = 0; i < searchResponse.hits().hits().size(); i++) { } ``` +## Search documents using suggesters + +### App Data class + +```java +public static class AppData { + + private int intValue; + private String msg; + + public int getIntValue() { + return intValue; + } + + public void setIntValue(int intValue) { + this.intValue = intValue; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } +} +``` + +### Using completion suggester + +```java +String index = "completion-suggester"; + +Property intValueProp = new Property.Builder() + .long_(v -> v) + .build(); +Property msgCompletionProp = new Property.Builder() + .completion(c -> c) + .build(); +client.indices().create(c -> c + .index(index) + .mappings(m -> m + .properties("intValue", intValueProp) + .properties("msg", msgCompletionProp))); + +AppData appData = new AppData(); +appData.setIntValue(1337); +appData.setMsg("foo"); + +client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + +appData.setIntValue(1338); +appData.setMsg("foobar"); + +client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + +String suggesterName = "msgSuggester"; + +CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() + .field("msg") + .size(1) + .build(); +FieldSuggester fieldSuggester = new FieldSuggester.Builder().prefix("foo") + .completion(completionSuggester) + .build(); +Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + +SearchResponse response = client.search(searchRequest, AppData.class); +``` + +### Using term suggester + +```java + String index = "term-suggester"; + +// term suggester does not require a special mapping +client.indices().create(c -> c + .index(index)); + +AppData appData = new AppData(); +appData.setIntValue(1337); +appData.setMsg("foo"); + +client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + +appData.setIntValue(1338); +appData.setMsg("foobar"); + +client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + +String suggesterName = "msgSuggester"; + +TermSuggester termSuggester = FieldSuggesterBuilders.term() + .field("msg") + .size(1) + .build(); +FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("fool") + .term(termSuggester) + .build(); +Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + +SearchResponse response = client.search(searchRequest, AppData.class); +``` + +### Using phrase suggester + +```java +String index = "test-phrase-suggester"; + +ShingleTokenFilter shingleTokenFilter = new ShingleTokenFilter.Builder().minShingleSize("2") + .maxShingleSize("3") + .build(); + +Analyzer analyzer = new Analyzer.Builder() + .custom(new CustomAnalyzer.Builder().tokenizer("standard") + .filter(Arrays.asList("lowercase", "shingle")).build()) + .build(); + +TokenFilter tokenFilter = new TokenFilter.Builder() + .definition(new TokenFilterDefinition.Builder() + .shingle(shingleTokenFilter).build()) + .build(); + +IndexSettingsAnalysis indexSettingsAnalysis = new IndexSettingsAnalysis.Builder() + .analyzer("trigram", analyzer) + .filter("shingle", tokenFilter) + .build(); + +IndexSettings settings = new IndexSettings.Builder().analysis(indexSettingsAnalysis).build(); + +TypeMapping mapping = new TypeMapping.Builder().properties("msg", new Property.Builder() + .text(new TextProperty.Builder().fields("trigram", new Property.Builder() + .text(new TextProperty.Builder().analyzer("trigram").build()) + .build()).build()) + .build()).build(); + +client.indices().create(c -> c + .index(index) + .settings(settings) + .mappings(mapping)); + +AppData appData = new AppData(); +appData.setIntValue(1337); +appData.setMsg("Design Patterns"); + +client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + +appData.setIntValue(1338); +appData.setMsg("Software Architecture Patterns Explained"); + +client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + +String suggesterName = "msgSuggester"; + +PhraseSuggester phraseSuggester = FieldSuggesterBuilders.phrase() + .field("msg.trigram") + .build(); +FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("design paterns") + .phrase(phraseSuggester) + .build(); +Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + +SearchResponse response = client.search(searchRequest, AppData.class); +``` + ## Bulk requests ```java diff --git a/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java b/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java index 84a6e6e7e4..94627156e8 100644 --- a/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java +++ b/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java @@ -33,14 +33,21 @@ package org.opensearch.client.json; import org.opensearch.client.util.TaggedUnion; + + import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; +import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.function.BiFunction; +import java.util.function.Function; + +import javax.annotation.Nullable; import static jakarta.json.stream.JsonParser.Event; @@ -50,31 +57,43 @@ * encodes a name+type in a single JSON property. * */ -public interface ExternallyTaggedUnion { +public class ExternallyTaggedUnion { + + private ExternallyTaggedUnion() {} /** * A deserializer for externally-tagged unions. Since the union variant discriminant is provided externally, this cannot be a * regular {@link JsonpDeserializer} as the caller has to provide the discriminant value. */ - class Deserializer, Member> { + public static class Deserializer, Member> { private final Map> deserializers; - private final BiFunction unionCtor; + private final Function unionCtor; + @Nullable + private final BiFunction unKnownUnionCtor; - public Deserializer(Map> deserializers, BiFunction unionCtor) { + public Deserializer(Map> deserializers, + Function unionCtor) { this.deserializers = deserializers; this.unionCtor = unionCtor; + this.unKnownUnionCtor = null; + } + + public Deserializer(Map> deserializers, + Function unionCtor, BiFunction unKnownUnionCtor) { + this.deserializers = deserializers; + this.unionCtor = unionCtor; + this.unKnownUnionCtor = unKnownUnionCtor; } - /** - * Deserialize a union value, given its type. - */ - public Union deserialize(String type, JsonParser parser, JsonpMapper mapper) { + public Union deserialize(String type, JsonParser parser, JsonpMapper mapper, Event event) { JsonpDeserializer deserializer = deserializers.get(type); if (deserializer == null) { - throw new JsonParsingException("Unknown variant type '" + type + "'", parser.getLocation()); + if (unKnownUnionCtor != null) { + return unKnownUnionCtor.apply(type, JsonData._DESERIALIZER.deserialize(parser, mapper, event)); + } } - return unionCtor.apply(type, deserializer.deserialize(parser, mapper)); + return unionCtor.apply(deserializer.deserialize(parser, mapper, event)); } /** @@ -86,8 +105,9 @@ public TypedKeysDeserializer typedKeys() { } } - class TypedKeysDeserializer> extends JsonpDeserializerBase> { + public static class TypedKeysDeserializer> extends JsonpDeserializerBase> { Deserializer deserializer; + protected TypedKeysDeserializer(Deserializer deser) { super(EnumSet.of(Event.START_OBJECT)); this.deserializer = deser; @@ -107,22 +127,53 @@ public void deserializeEntry(String key, JsonParser parser, JsonpMapper mapper, int hashPos = key.indexOf('#'); if (hashPos == -1) { throw new JsonParsingException( - "Property name '" + key + "' is not in the 'type#name' format. Make sure the request has 'typed_keys' set.", - parser.getLocation() - ); + "Property name '" + key + + "' is not in the 'type#name' format. Make sure the request has 'typed_keys' set.", + parser.getLocation()); } String type = key.substring(0, hashPos); String name = key.substring(hashPos + 1); - targetMap.put(name, deserializer.deserialize(type, parser, mapper)); + targetMap.put(name, deserializer.deserialize(type, parser, mapper, parser.next())); } } + + public static > JsonpDeserializer>> arrayDeserializer( + TypedKeysDeserializer deserializer) { + return JsonpDeserializer.of( + EnumSet.of(Event.START_OBJECT), + (parser, mapper, event) -> { + Map> result = new HashMap<>(); + String key = null; + while ((event = parser.next()) != Event.END_OBJECT) { + JsonpUtils.expectEvent(parser, event, Event.KEY_NAME); + // Split key and type + key = parser.getString(); + int hashPos = key.indexOf('#'); + + String type = key.substring(0, hashPos); + String name = key.substring(hashPos + 1); + + List list = new ArrayList<>(); + JsonpUtils.expectNextEvent(parser, Event.START_ARRAY); + try { + while ((event = parser.next()) != Event.END_ARRAY) { + list.add(deserializer.deserializer.deserialize(type, parser, mapper, event)); + } + } catch (Exception e) { + throw e; + } + result.put(name, list); + } + return result; + }); + } /** * Serialize an externally tagged union using the typed keys encoding. */ - static > void serializeTypedKeys( + public static > void serializeTypedKeys( Map map, JsonGenerator generator, JsonpMapper mapper ) { generator.writeStartObject(); @@ -133,7 +184,7 @@ public void deserializeEntry(String key, JsonParser parser, JsonpMapper mapper, /** * Serialize an externally tagged union using the typed keys encoding, without the enclosing start/end object. */ - static > void serializeTypedKeysInner( + public static > void serializeTypedKeysInner( Map map, JsonGenerator generator, JsonpMapper mapper ) { for (Map.Entry entry: map.entrySet()) { diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java index f2eb3e72ae..e939ba13f5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java @@ -37,6 +37,7 @@ package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.ExternallyTaggedUnion; +import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonEnum; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -192,6 +193,8 @@ public enum Kind implements JsonEnum { WeightedAvg("weighted_avg"), + _Custom(null), + ; private final String jsonValue; @@ -233,6 +236,11 @@ private Aggregate(Builder builder) { } + public Aggregate(String kind, JsonData value) { + this._kind = Kind._Custom; + this._value = (AggregateVariant) value; + } + public static Aggregate of(Function> fn) { return fn.apply(new Builder()).build(); } @@ -2119,6 +2127,6 @@ public Aggregate build() { deserializers.put("weighted_avg", WeightedAvgAggregate._DESERIALIZER); _TYPED_KEYS_DESERIALIZER = new ExternallyTaggedUnion.Deserializer<>(deserializers, - (name, value) -> new Aggregate(value)).typedKeys(); + Aggregate::new, Aggregate::new).typedKeys(); } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggest.java new file mode 100644 index 0000000000..0d94f54e88 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggest.java @@ -0,0 +1,161 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + + /* +* Licensed to Elasticsearch B.V. under one or more contributor +* license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright +* ownership. Elasticsearch B.V. licenses this file to you under +* the Apache License, Version 2.0 (the "License"); you may +* not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch.core.search; + +import java.util.List; +import java.util.function.Function; +import java.util.function.Supplier; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializer; +import org.opensearch.client.json.NamedDeserializer; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch.core.search.Suggest.Kind; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class CompletionSuggest extends SuggestBase implements SuggestVariant { + private final List> options; + + @Nullable + private final JsonpSerializer tDocumentSerializer; + + private CompletionSuggest(Builder builder) { + super(builder); + + this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); + this.tDocumentSerializer = builder.tDocumentSerializer; + + } + + public static CompletionSuggest of( + Function, ObjectBuilder>> fn) { + return fn.apply(new Builder<>()).build(); + } + + public final List> options() { + return this.options; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (ApiTypeHelper.isDefined(this.options)) { + generator.writeKey("options"); + generator.writeStartArray(); + for (CompletionSuggestOption item0 : this.options) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + public static class Builder extends SuggestBase.AbstractBuilder> + implements + ObjectBuilder> { + private List> options; + + @Nullable + private JsonpSerializer tDocumentSerializer; + + public final Builder options(List> list) { + this.options = _listAddAll(this.options, list); + return this; + } + + public final Builder options(CompletionSuggestOption value, + CompletionSuggestOption... values) { + this.options = _listAdd(this.options, value, values); + return this; + } + + public final Builder options( + Function, ObjectBuilder>> fn) { + return options(fn.apply(new CompletionSuggestOption.Builder()).build()); + } + + public final Builder tDocumentSerializer(@Nullable JsonpSerializer value) { + this.tDocumentSerializer = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + public CompletionSuggest build() { + _checkSingleUse(); + + return new CompletionSuggest(this); + } + } + + public static JsonpDeserializer> createCompletionSuggestDeserializer( + JsonpDeserializer tDocumentDeserializer) { + return ObjectBuilderDeserializer.createForObject((Supplier>) Builder::new, + op -> CompletionSuggest.setupCompletionSuggestDeserializer(op, tDocumentDeserializer)); + }; + + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createCompletionSuggestDeserializer( + new NamedDeserializer<>("org.opensearch.client:Deserializer:_global.search._types.TDocument"))); + + protected static void setupCompletionSuggestDeserializer( + ObjectDeserializer> op, + JsonpDeserializer tDocumentDeserializer) { + SuggestBase.setupSuggestBaseDeserializer(op); + op.add(Builder::options, + JsonpDeserializer.arrayDeserializer( + CompletionSuggestOption.createCompletionSuggestOptionDeserializer(tDocumentDeserializer)), + "options"); + + } + + @Override + public Kind _suggestionKind() { + return Suggest.Kind.Completion; + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java index 77091848a3..50e0836df8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java @@ -45,12 +45,13 @@ import org.opensearch.client.json.ObjectDeserializer; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Nullable; + // typedef: _global.search._types.FieldSuggester @@ -69,14 +70,7 @@ public enum Kind implements JsonEnum { Phrase("phrase"), - Prefix("prefix"), - - Regex("regex"), - Term("term"), - - Text("text"), - ; private final String jsonValue; @@ -94,6 +88,15 @@ public String jsonValue() { private final Kind _kind; private final Object _value; + @Nullable + private final String prefix; + + @Nullable + private final String regex; + + @Nullable + private final String text; + @Override public final Kind _kind() { return _kind; @@ -108,6 +111,9 @@ public FieldSuggester(FieldSuggesterVariant value) { this._kind = ApiTypeHelper.requireNonNull(value._fieldSuggesterKind(), this, ""); this._value = ApiTypeHelper.requireNonNull(value, this, ""); + this.prefix = null; + this.regex = null; + this.text = null; } @@ -115,6 +121,9 @@ private FieldSuggester(Builder builder) { this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + this.prefix = builder.prefix; + this.regex = builder.regex; + this.text = builder.text; } @@ -122,6 +131,30 @@ public static FieldSuggester of(Function> return fn.apply(new Builder()).build(); } + /** + * API name: {@code prefix} + */ + @Nullable + public final String prefix() { + return this.prefix; + } + + /** + * API name: {@code regex} + */ + @Nullable + public final String regex() { + return this.regex; + } + + /** + * API name: {@code text} + */ + @Nullable + public final String text() { + return this.text; + } + /** * Is this variant instance of kind {@code completion}? */ @@ -156,40 +189,6 @@ public PhraseSuggester phrase() { return TaggedUnionUtils.get(this, Kind.Phrase); } - /** - * Is this variant instance of kind {@code prefix}? - */ - public boolean isPrefix() { - return _kind == Kind.Prefix; - } - - /** - * Get the {@code prefix} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code prefix} kind. - */ - public String prefix() { - return TaggedUnionUtils.get(this, Kind.Prefix); - } - - /** - * Is this variant instance of kind {@code regex}? - */ - public boolean isRegex() { - return _kind == Kind.Regex; - } - - /** - * Get the {@code regex} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code regex} kind. - */ - public String regex() { - return TaggedUnionUtils.get(this, Kind.Regex); - } - /** * Is this variant instance of kind {@code term}? */ @@ -207,23 +206,6 @@ public TermSuggester term() { return TaggedUnionUtils.get(this, Kind.Term); } - /** - * Is this variant instance of kind {@code text}? - */ - public boolean isText() { - return _kind == Kind.Text; - } - - /** - * Get the {@code text} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code text} kind. - */ - public String text() { - return TaggedUnionUtils.get(this, Kind.Text); - } - @Override @SuppressWarnings("unchecked") public void serialize(JsonGenerator generator, JsonpMapper mapper) { @@ -233,30 +215,36 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey(_kind.jsonValue()); if (_value instanceof JsonpSerializable) { ((JsonpSerializable) _value).serialize(generator, mapper); - } else { - switch (_kind) { - case Prefix : - generator.write(((String) this._value)); - - break; - case Regex : - generator.write(((String) this._value)); - - break; - case Text : - generator.write(((String) this._value)); - - break; - } + } + if (this.prefix != null) { + generator.writeKey("prefix"); + generator.write(this.prefix); + } + if (this.regex != null) { + generator.writeKey("regex"); + generator.write(this.regex); + } + if (this.text != null) { + generator.writeKey("text"); + generator.write(this.text); } generator.writeEnd(); } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends SuggesterBase.AbstractBuilder implements ObjectBuilder { private Kind _kind; private Object _value; + + @Nullable + private String prefix; + + @Nullable + private String regex; + + @Nullable + private String text; public ObjectBuilder completion(CompletionSuggester v) { this._kind = Kind.Completion; @@ -280,31 +268,37 @@ public ObjectBuilder phrase( return this.phrase(fn.apply(new PhraseSuggester.Builder()).build()); } - public ObjectBuilder prefix(String v) { - this._kind = Kind.Prefix; + public ObjectBuilder term(TermSuggester v) { + this._kind = Kind.Term; this._value = v; return this; } - public ObjectBuilder regex(String v) { - this._kind = Kind.Regex; - this._value = v; - return this; + public ObjectBuilder term(Function> fn) { + return this.term(fn.apply(new TermSuggester.Builder()).build()); } - public ObjectBuilder term(TermSuggester v) { - this._kind = Kind.Term; - this._value = v; + /** + * API name: {@code prefix} + */ + public final Builder prefix(@Nullable String value) { + this.prefix = value; return this; } - public ObjectBuilder term(Function> fn) { - return this.term(fn.apply(new TermSuggester.Builder()).build()); + /** + * API name: {@code regex} + */ + public final Builder regex(@Nullable String value) { + this.regex = value; + return this; } - public ObjectBuilder text(String v) { - this._kind = Kind.Text; - this._value = v; + /** + * API name: {@code text} + */ + public final Builder text(@Nullable String value) { + this.text = value; return this; } @@ -313,15 +307,20 @@ public FieldSuggester build() { return new FieldSuggester(this); } + @Override + protected Builder self() { + return this; + } + } protected static void setupFieldSuggesterDeserializer(ObjectDeserializer op) { op.add(Builder::completion, CompletionSuggester._DESERIALIZER, "completion"); op.add(Builder::phrase, PhraseSuggester._DESERIALIZER, "phrase"); + op.add(Builder::term, TermSuggester._DESERIALIZER, "term"); op.add(Builder::prefix, JsonpDeserializer.stringDeserializer(), "prefix"); op.add(Builder::regex, JsonpDeserializer.stringDeserializer(), "regex"); - op.add(Builder::term, TermSuggester._DESERIALIZER, "term"); op.add(Builder::text, JsonpDeserializer.stringDeserializer(), "text"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggest.java new file mode 100644 index 0000000000..b52cbe63e3 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggest.java @@ -0,0 +1,127 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + + /* +* Licensed to Elasticsearch B.V. under one or more contributor +* license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright +* ownership. Elasticsearch B.V. licenses this file to you under +* the Apache License, Version 2.0 (the "License"); you may +* not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch.core.search; + +import java.util.List; +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch.core.search.Suggest.Kind; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class PhraseSuggest extends SuggestBase implements SuggestVariant { + private final List options; + + + private PhraseSuggest(Builder builder) { + super(builder); + + this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); + + } + + public static PhraseSuggest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + public final List options() { + return this.options; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (ApiTypeHelper.isDefined(this.options)) { + generator.writeKey("options"); + generator.writeStartArray(); + for (PhraseSuggestOption item0 : this.options) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + public static class Builder extends SuggestBase.AbstractBuilder implements ObjectBuilder { + private List options; + + public final Builder options(List list) { + this.options = _listAddAll(this.options, list); + return this; + } + + public final Builder options(PhraseSuggestOption value, PhraseSuggestOption... values) { + this.options = _listAdd(this.options, value, values); + return this; + } + + public final Builder options(Function> fn) { + return options(fn.apply(new PhraseSuggestOption.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + public PhraseSuggest build() { + _checkSingleUse(); + + return new PhraseSuggest(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PhraseSuggest::setupPhraseSuggestDeserializer); + + protected static void setupPhraseSuggestDeserializer(ObjectDeserializer op) { + SuggestBase.setupSuggestBaseDeserializer(op); + op.add(Builder::options, JsonpDeserializer.arrayDeserializer(PhraseSuggestOption._DESERIALIZER), "options"); + + } + + @Override + public Kind _suggestionKind() { + return Suggest.Kind.Phrase; + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java index f64ebfbdd5..3d0a15d8c0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java @@ -48,6 +48,8 @@ import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Nullable; + // typedef: _global.search._types.PhraseSuggestOption @@ -55,6 +57,7 @@ public class PhraseSuggestOption implements JsonpSerializable { private final String text; + @Nullable private final String highlighted; private final double score; @@ -64,7 +67,7 @@ public class PhraseSuggestOption implements JsonpSerializable { private PhraseSuggestOption(Builder builder) { this.text = ApiTypeHelper.requireNonNull(builder.text, this, "text"); - this.highlighted = ApiTypeHelper.requireNonNull(builder.highlighted, this, "highlighted"); + this.highlighted = builder.highlighted; this.score = ApiTypeHelper.requireNonNull(builder.score, this, "score"); } @@ -81,8 +84,9 @@ public final String text() { } /** - * Required - API name: {@code highlighted} + * API name: {@code highlighted} */ + @Nullable public final String highlighted() { return this.highlighted; } @@ -108,8 +112,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("text"); generator.write(this.text); - generator.writeKey("highlighted"); - generator.write(this.highlighted); + if (this.highlighted != null) { + generator.writeKey("highlighted"); + generator.write(this.highlighted); + } generator.writeKey("score"); generator.write(this.score); @@ -125,6 +131,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends ObjectBuilderBase implements ObjectBuilder { private String text; + @Nullable private String highlighted; private Double score; @@ -140,7 +147,7 @@ public final Builder text(String value) { /** * Required - API name: {@code highlighted} */ - public final Builder highlighted(String value) { + public final Builder highlighted(@Nullable String value) { this.highlighted = value; return this; } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java index 69933e43ee..7d3d084dd9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java @@ -17,7 +17,7 @@ import org.opensearch.client.opensearch._types.aggregations.Aggregate; import org.opensearch.client.opensearch.core.search.HitsMetadata; import org.opensearch.client.opensearch.core.search.Profile; -import org.opensearch.client.opensearch.core.search.Suggestion; +import org.opensearch.client.opensearch.core.search.Suggest; import org.opensearch.client.json.ExternallyTaggedUnion; import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; @@ -76,7 +76,7 @@ public abstract class SearchResult implements JsonpSerializable { @Nullable private final String scrollId; - private final Map>> suggest; + private final Map>> suggest; @Nullable private final Boolean terminatedEarly; @@ -207,7 +207,7 @@ public final String scrollId() { /** * API name: {@code suggest} */ - public final Map>> suggest() { + public final Map>> suggest() { return this.suggest; } @@ -301,11 +301,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (ApiTypeHelper.isDefined(this.suggest)) { generator.writeKey("suggest"); generator.writeStartObject(); - for (Map.Entry>> item0 : this.suggest.entrySet()) { + for (Map.Entry>> item0 : this.suggest.entrySet()) { generator.writeKey(item0.getKey()); generator.writeStartArray(); if (item0.getValue() != null) { - for (Suggestion item1 : item0.getValue()) { + for (Suggest item1 : item0.getValue()) { item1.serialize(generator, mapper); } @@ -365,7 +365,7 @@ protected abstract static class AbstractBuilder>> suggest; + private Map>> suggest; @Nullable private Boolean terminatedEarly; @@ -556,7 +556,7 @@ public final BuilderT scrollId(@Nullable String value) { *

* Adds all entries of map to suggest. */ - public final BuilderT suggest(Map>> map) { + public final BuilderT suggest(Map>> map) { this.suggest = _mapPutAll(this.suggest, map); return self(); } @@ -566,7 +566,7 @@ public final BuilderT suggest(Map>> map) { *

* Adds an entry to suggest. */ - public final BuilderT suggest(String key, List> value) { + public final BuilderT suggest(String key, List> value) { this.suggest = _mapPut(this.suggest, key, value); return self(); } @@ -610,9 +610,9 @@ protected static >arrayDeserializer( + Suggest.createSuggestDeserializer(tDocumentDeserializer)), "suggest"); + ; op.add(AbstractBuilder::terminatedEarly, JsonpDeserializer.booleanDeserializer(), "terminated_early"); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOption.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java similarity index 62% rename from java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOption.java rename to java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java index 72f97f9c84..33cd35e581 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOption.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java @@ -36,24 +36,28 @@ package org.opensearch.client.opensearch.core.search; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +import org.opensearch.client.json.ExternallyTaggedUnion; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; -import org.opensearch.client.json.JsonpSerializer; -import org.opensearch.client.json.UnionDeserializer; + import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; + import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _global.search._types.SuggestOption -public class SuggestOption implements TaggedUnion, JsonpSerializable { +public class Suggest implements TaggedUnion, JsonpSerializable { public enum Kind { Completion, Phrase, Term @@ -61,7 +65,7 @@ public enum Kind { } private final Kind _kind; - private final Object _value; + private final SuggestVariant _value; @Override public final Kind _kind() { @@ -69,26 +73,25 @@ public final Kind _kind() { } @Override - public final Object _get() { + public final SuggestVariant _get() { return _value; } - private final JsonpSerializer tDocumentSerializer = null; - private SuggestOption(Kind kind, Object value) { - this._kind = kind; - this._value = value; + public Suggest(SuggestVariant value) { + this._kind = ApiTypeHelper.requireNonNull(value._suggestionKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); } - private SuggestOption(Builder builder) { + private Suggest(Builder builder) { this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); } - public static SuggestOption of( - Function, ObjectBuilder>> fn) { + public static Suggest of( + Function, ObjectBuilder>> fn) { return fn.apply(new Builder<>()).build(); } @@ -105,7 +108,7 @@ public boolean isCompletion() { * @throws IllegalStateException * if the current variant is not of the {@code completion} kind. */ - public CompletionSuggestOption completion() { + public CompletionSuggest completion() { return TaggedUnionUtils.get(this, Kind.Completion); } @@ -122,7 +125,7 @@ public boolean isPhrase() { * @throws IllegalStateException * if the current variant is not of the {@code phrase} kind. */ - public PhraseSuggestOption phrase() { + public PhraseSuggest phrase() { return TaggedUnionUtils.get(this, Kind.Phrase); } @@ -139,7 +142,7 @@ public boolean isTerm() { * @throws IllegalStateException * if the current variant is not of the {@code term} kind. */ - public TermSuggestOption term() { + public TermSuggest term() { return TaggedUnionUtils.get(this, Kind.Term); } @@ -153,58 +156,60 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends ObjectBuilderBase implements - ObjectBuilder> { + ObjectBuilder> { private Kind _kind; - private Object _value; + private SuggestVariant _value; - public ObjectBuilder> completion(CompletionSuggestOption v) { + public ObjectBuilder> completion(CompletionSuggest v) { this._kind = Kind.Completion; this._value = v; return this; } - public ObjectBuilder> completion( - Function, - ObjectBuilder>> fn) { - return this.completion(fn.apply(new CompletionSuggestOption.Builder()).build()); + public ObjectBuilder> completion( + Function, + ObjectBuilder>> fn) { + return this.completion(fn.apply(new CompletionSuggest.Builder()).build()); } - public ObjectBuilder> phrase(PhraseSuggestOption v) { + public ObjectBuilder> phrase(PhraseSuggest v) { this._kind = Kind.Phrase; this._value = v; return this; } - public ObjectBuilder> phrase( - Function> fn) { - return this.phrase(fn.apply(new PhraseSuggestOption.Builder()).build()); + public ObjectBuilder> phrase( + Function> fn) { + return this.phrase(fn.apply(new PhraseSuggest.Builder()).build()); } - public ObjectBuilder> term(TermSuggestOption v) { + public ObjectBuilder> term(TermSuggest v) { this._kind = Kind.Term; this._value = v; return this; } - public ObjectBuilder> term( - Function> fn) { - return this.term(fn.apply(new TermSuggestOption.Builder()).build()); + public ObjectBuilder> term( + Function> fn) { + return this.term(fn.apply(new TermSuggest.Builder()).build()); } - public SuggestOption build() { + public Suggest build() { _checkSingleUse(); - return new SuggestOption<>(this); + return new Suggest<>(this); } } - public static JsonpDeserializer> createSuggestOptionDeserializer( + public static ExternallyTaggedUnion.TypedKeysDeserializer> createSuggestDeserializer( JsonpDeserializer tDocumentDeserializer) { - return new UnionDeserializer.Builder, Kind, Object>(SuggestOption::new, - false).addMember(Kind.Completion, - CompletionSuggestOption.createCompletionSuggestOptionDeserializer(tDocumentDeserializer)) - .addMember(Kind.Phrase, PhraseSuggestOption._DESERIALIZER) - .addMember(Kind.Term, TermSuggestOption._DESERIALIZER).build(); + Map> deserializers = new HashMap<>(); + deserializers.put("completion", CompletionSuggest.createCompletionSuggestDeserializer(tDocumentDeserializer)); + deserializers.put("phrase", PhraseSuggest._DESERIALIZER); + deserializers.put("term", TermSuggest._DESERIALIZER); + + return new ExternallyTaggedUnion.Deserializer, SuggestVariant>(deserializers, + Suggest::new).typedKeys(); } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java new file mode 100644 index 0000000000..85cba9dad5 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java @@ -0,0 +1,165 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch.core.search; + +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _global.search._types.Suggest + + + +public abstract class SuggestBase implements JsonpSerializable { + private final int length; + + private final int offset; + + private final String text; + + // --------------------------------------------------------------------------------------------- + + protected SuggestBase(AbstractBuilder builder) { + + this.length = ApiTypeHelper.requireNonNull(builder.length, this, "length"); + this.offset = ApiTypeHelper.requireNonNull(builder.offset, this, "offset"); + this.text = ApiTypeHelper.requireNonNull(builder.text, this, "text"); + + } + + /** + * Required - API name: {@code length} + */ + public final int length() { + return this.length; + } + + /** + * Required - API name: {@code offset} + */ + public final int offset() { + return this.offset; + } + + /** + * Required - API name: {@code text} + */ + public final String text() { + return this.text; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("length"); + generator.write(this.length); + + generator.writeKey("offset"); + generator.write(this.offset); + + generator.writeKey("text"); + generator.write(this.text); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SuggestBase}. + */ + + public abstract static class AbstractBuilder> extends ObjectBuilderBase { + private Integer length; + + private Integer offset; + + private String text; + + /** + * Required - API name: {@code length} + */ + public final BuilderT length(int value) { + this.length = value; + return self(); + } + + /** + * Required - API name: {@code offset} + */ + public final BuilderT offset(int value) { + this.offset = value; + return self(); + } + + /** + * Required - API name: {@code text} + */ + public final BuilderT text(String value) { + this.text = value; + return self(); + } + + + protected abstract BuilderT self(); + + } + + + protected static > void setupSuggestBaseDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::length, JsonpDeserializer.integerDeserializer(), "length"); + op.add(AbstractBuilder::offset, JsonpDeserializer.integerDeserializer(), "offset"); + op.add(AbstractBuilder::text, JsonpDeserializer.stringDeserializer(), "text"); + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java index 0e5e4a8a8b..26bf13823c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java @@ -37,7 +37,7 @@ package org.opensearch.client.opensearch.core.search; /** - * Builders for {@link SuggestOption} variants. + * Builders for {@link Suggest} variants. */ public class SuggestOptionBuilders { private SuggestOptionBuilders() { diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestVariant.java new file mode 100644 index 0000000000..f3230775d6 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestVariant.java @@ -0,0 +1,43 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + + /* +* Licensed to Elasticsearch B.V. under one or more contributor +* license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright +* ownership. Elasticsearch B.V. licenses this file to you under +* the Apache License, Version 2.0 (the "License"); you may +* not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch.core.search; + +public interface SuggestVariant { + + Suggest.Kind _suggestionKind(); + + default Suggest _toSuggestion() { + return new Suggest(this); + } + +} \ No newline at end of file diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggestion.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggestion.java deleted file mode 100644 index e6b32c3a5c..0000000000 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggestion.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package org.opensearch.client.opensearch.core.search; - -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.JsonpSerializable; -import org.opensearch.client.json.JsonpSerializer; -import org.opensearch.client.json.ObjectBuilderDeserializer; -import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; -import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; -import java.util.function.Supplier; -import javax.annotation.Nullable; - -// typedef: _global.search._types.Suggest - - - -public class Suggestion implements JsonpSerializable { - private final int length; - - private final int offset; - - private final List> options; - - private final String text; - - @Nullable - private final JsonpSerializer tSerializer; - - // --------------------------------------------------------------------------------------------- - - private Suggestion(Builder builder) { - - this.length = ApiTypeHelper.requireNonNull(builder.length, this, "length"); - this.offset = ApiTypeHelper.requireNonNull(builder.offset, this, "offset"); - this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); - this.text = ApiTypeHelper.requireNonNull(builder.text, this, "text"); - this.tSerializer = builder.tSerializer; - - } - - public static Suggestion of(Function, ObjectBuilder>> fn) { - return fn.apply(new Builder<>()).build(); - } - - /** - * Required - API name: {@code length} - */ - public final int length() { - return this.length; - } - - /** - * Required - API name: {@code offset} - */ - public final int offset() { - return this.offset; - } - - /** - * Required - API name: {@code options} - */ - public final List> options() { - return this.options; - } - - /** - * Required - API name: {@code text} - */ - public final String text() { - return this.text; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("length"); - generator.write(this.length); - - generator.writeKey("offset"); - generator.write(this.offset); - - if (ApiTypeHelper.isDefined(this.options)) { - generator.writeKey("options"); - generator.writeStartArray(); - for (SuggestOption item0 : this.options) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("text"); - generator.write(this.text); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link Suggestion}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { - private Integer length; - - private Integer offset; - - private List> options; - - private String text; - - @Nullable - private JsonpSerializer tSerializer; - - /** - * Required - API name: {@code length} - */ - public final Builder length(int value) { - this.length = value; - return this; - } - - /** - * Required - API name: {@code offset} - */ - public final Builder offset(int value) { - this.offset = value; - return this; - } - - /** - * Required - API name: {@code options} - *

- * Adds all elements of list to options. - */ - public final Builder options(List> list) { - this.options = _listAddAll(this.options, list); - return this; - } - - /** - * Required - API name: {@code options} - *

- * Adds one or more values to options. - */ - public final Builder options(SuggestOption value, SuggestOption... values) { - this.options = _listAdd(this.options, value, values); - return this; - } - - /** - * Required - API name: {@code options} - *

- * Adds a value to options using a builder lambda. - */ - public final Builder options(Function, ObjectBuilder>> fn) { - return options(fn.apply(new SuggestOption.Builder()).build()); - } - - /** - * Required - API name: {@code text} - */ - public final Builder text(String value) { - this.text = value; - return this; - } - - /** - * Serializer for T. If not set, an attempt will be made to find a serializer - * from the JSON context. - */ - public final Builder tSerializer(@Nullable JsonpSerializer value) { - this.tSerializer = value; - return this; - } - - /** - * Builds a {@link Suggestion}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public Suggestion build() { - _checkSingleUse(); - - return new Suggestion(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Create a JSON deserializer for Suggestion - */ - public static JsonpDeserializer> createSuggestionDeserializer( - JsonpDeserializer tDeserializer) { - return ObjectBuilderDeserializer.createForObject((Supplier>) Builder::new, - op -> Suggestion.setupSuggestionDeserializer(op, tDeserializer)); - }; - - protected static void setupSuggestionDeserializer(ObjectDeserializer> op, - JsonpDeserializer tDeserializer) { - - op.add(Builder::length, JsonpDeserializer.integerDeserializer(), "length"); - op.add(Builder::offset, JsonpDeserializer.integerDeserializer(), "offset"); - op.add(Builder::options, - JsonpDeserializer.arrayDeserializer(SuggestOption.createSuggestOptionDeserializer(tDeserializer)), - "options"); - op.add(Builder::text, JsonpDeserializer.stringDeserializer(), "text"); - - } - -} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggest.java new file mode 100644 index 0000000000..37ebdbb17c --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggest.java @@ -0,0 +1,126 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + + /* +* Licensed to Elasticsearch B.V. under one or more contributor +* license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright +* ownership. Elasticsearch B.V. licenses this file to you under +* the Apache License, Version 2.0 (the "License"); you may +* not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch.core.search; + +import java.util.List; +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch.core.search.Suggest.Kind; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +@JsonpDeserializable +public class TermSuggest extends SuggestBase implements SuggestVariant { + private final List options; + + private TermSuggest(Builder builder) { + super(builder); + + this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); + + } + + public static TermSuggest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + public final List options() { + return this.options; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (ApiTypeHelper.isDefined(this.options)) { + generator.writeKey("options"); + generator.writeStartArray(); + for (TermSuggestOption item0 : this.options) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + public static class Builder extends SuggestBase.AbstractBuilder implements ObjectBuilder { + private List options; + + public final Builder options(List list) { + this.options = _listAddAll(this.options, list); + return this; + } + + public final Builder options(TermSuggestOption value, TermSuggestOption... values) { + this.options = _listAdd(this.options, value, values); + return this; + } + + public final Builder options(Function> fn) { + return options(fn.apply(new TermSuggestOption.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + public TermSuggest build() { + _checkSingleUse(); + + return new TermSuggest(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TermSuggest::setupTermSuggestDeserializer); + + protected static void setupTermSuggestDeserializer(ObjectDeserializer op) { + SuggestBase.setupSuggestBaseDeserializer(op); + op.add(Builder::options, JsonpDeserializer.arrayDeserializer(TermSuggestOption._DESERIALIZER), "options"); + + } + + @Override + public Kind _suggestionKind() { + return Suggest.Kind.Term; + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index 0435cb9f72..c8529fc470 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -42,7 +42,14 @@ import org.opensearch.client.opensearch._types.aggregations.Aggregate; import org.opensearch.client.opensearch._types.aggregations.HistogramAggregate; import org.opensearch.client.opensearch._types.aggregations.TermsAggregation; +import org.opensearch.client.opensearch._types.analysis.Analyzer; +import org.opensearch.client.opensearch._types.analysis.CustomAnalyzer; +import org.opensearch.client.opensearch._types.analysis.ShingleTokenFilter; +import org.opensearch.client.opensearch._types.analysis.TokenFilter; +import org.opensearch.client.opensearch._types.analysis.TokenFilterDefinition; import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch._types.mapping.TextProperty; +import org.opensearch.client.opensearch._types.mapping.TypeMapping; import org.opensearch.client.opensearch._types.query_dsl.BoolQuery; import org.opensearch.client.opensearch._types.query_dsl.TermsQuery; import org.opensearch.client.opensearch.cat.NodesResponse; @@ -65,16 +72,21 @@ import org.opensearch.client.opensearch.core.search.FieldSuggester; import org.opensearch.client.opensearch.core.search.FieldSuggesterBuilders; import org.opensearch.client.opensearch.core.search.Hit; +import org.opensearch.client.opensearch.core.search.PhraseSuggester; import org.opensearch.client.opensearch.core.search.Suggester; +import org.opensearch.client.opensearch.core.search.TermSuggester; import org.opensearch.client.opensearch.indices.CreateIndexResponse; import org.opensearch.client.opensearch.indices.GetIndexResponse; import org.opensearch.client.opensearch.indices.GetIndicesSettingsResponse; import org.opensearch.client.opensearch.indices.GetMappingResponse; +import org.opensearch.client.opensearch.indices.IndexSettings; +import org.opensearch.client.opensearch.indices.IndexSettingsAnalysis; import org.opensearch.client.opensearch.indices.IndexState; import org.opensearch.client.opensearch.model.ModelTestCase; import org.opensearch.client.transport.endpoints.BooleanResponse; import java.io.IOException; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; @@ -542,9 +554,10 @@ public void testDefaultIndexSettings() throws IOException { } @Test - public void testCompletionSuggester() throws IOException { + public void testCompletionSuggesterFailure() throws IOException { - String index = "test-completion-suggester"; + String index = "test-completion-suggester-failure"; + Property intValueProp = new Property.Builder() .long_(v -> v) @@ -569,7 +582,7 @@ public void testCompletionSuggester() throws IOException { .refresh(Refresh.True)); appData.setIntValue(1338); - appData.setMsg("bar"); + appData.setMsg("foobar"); javaClient().index(b -> b .index(index) @@ -577,16 +590,17 @@ public void testCompletionSuggester() throws IOException { .document(appData) .refresh(Refresh.True)); + String suggesterName = "msgSuggester"; + CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() .field("msg") .size(1) .build(); - FieldSuggester fieldSuggester = new FieldSuggester.Builder() + FieldSuggester fieldSuggester = new FieldSuggester.Builder().prefix("xyz") .completion(completionSuggester) .build(); Suggester suggester = new Suggester.Builder() - .suggesters(Collections.singletonMap("msgSuggester", fieldSuggester)) - .text("foo") + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) .build(); SearchRequest searchRequest = new SearchRequest.Builder() .index(index) @@ -595,6 +609,9 @@ public void testCompletionSuggester() throws IOException { SearchResponse response = javaClient().search(searchRequest, AppData.class); assertTrue(response.suggest().size() > 0); + assertTrue(response.suggest().keySet().contains(suggesterName)); + assertNotNull(response.suggest().get(suggesterName)); + assertEquals(response.suggest().get(suggesterName).get(0).completion().options().size(), 0); } @Test @@ -605,7 +622,8 @@ public void testPit() throws IOException { version = version.split("-")[0]; } assumeTrue("The PIT is supported in OpenSearch 2.4.0 and later", - Version.fromString(version).onOrAfter(Version.fromString("2.4.0"))); + Version.fromString(version).onOrAfter(Version.fromString("2.4.0"))); + String index = "test-point-in-time"; javaClient().indices().create(c -> c @@ -620,7 +638,6 @@ public void testPit() throws IOException { .id("1") .document(appData) .refresh(Refresh.True)); - CreatePitRequest createPitRequest = new CreatePitRequest.Builder() .targetIndexes(Collections.singletonList(index)) .keepAlive(new Time.Builder().time("100m").build()).build(); @@ -652,6 +669,208 @@ public void testPit() throws IOException { assertTrue(deletePitResponse.pits().get(0).successful()); } + public void testCompletionSuggester() throws IOException { + + String index = "test-completion-suggester"; + + Property intValueProp = new Property.Builder() + .long_(v -> v) + .build(); + Property msgCompletionProp = new Property.Builder() + .completion(c -> c) + .build(); + javaClient().indices().create(c -> c + .index(index) + .mappings(m -> m + .properties("intValue", intValueProp) + .properties("msg", msgCompletionProp))); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + javaClient().index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("foobar"); + + javaClient().index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + String suggesterName = "msgSuggester"; + + CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() + .field("msg") + .size(1) + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder().prefix("foo") + .completion(completionSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse response = javaClient().search(searchRequest, AppData.class); + assertTrue(response.suggest().size() > 0); + assertTrue(response.suggest().keySet().contains(suggesterName)); + assertNotNull(response.suggest().get(suggesterName)); + assertNotNull(response.suggest().get(suggesterName).get(0).completion().options()); + assertTrue(response.suggest().get(suggesterName).get(0).isCompletion()); + assertNotNull(response.suggest().get(suggesterName).get(0).completion().options()); + assertEquals(response.suggest().get(suggesterName).get(0).completion().options().get(0) + .text(), "foo"); + } + + @Test + public void testTermSuggester() throws IOException { + + String index = "test-term-suggester"; + + // term suggester does not require a special mapping + javaClient().indices().create(c -> c + .index(index)); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + javaClient().index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("foobar"); + + javaClient().index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + String suggesterName = "msgSuggester"; + + TermSuggester termSuggester = FieldSuggesterBuilders.term() + .field("msg") + .size(1) + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("fool") + .term(termSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse response = javaClient().search(searchRequest, AppData.class); + assertTrue(response.suggest().size() > 0); + assertTrue(response.suggest().keySet().contains(suggesterName)); + assertNotNull(response.suggest().get(suggesterName)); + assertTrue(response.suggest().get(suggesterName).get(0).isTerm()); + assertNotNull(response.suggest().get(suggesterName).get(0).term().options()); + assertEquals(response.suggest().get(suggesterName).get(0).term().options().get(0) + .text(), "foo"); + } + + @Test + public void testPhraseSuggester() throws IOException { + + String index = "test-phrase-suggester"; + + ShingleTokenFilter shingleTokenFilter = new ShingleTokenFilter.Builder().minShingleSize("2") + .maxShingleSize("3") + .build(); + + Analyzer analyzer = new Analyzer.Builder() + .custom(new CustomAnalyzer.Builder().tokenizer("standard") + .filter(Arrays.asList("lowercase","shingle")).build()) + .build(); + + TokenFilter tokenFilter = new TokenFilter.Builder() + .definition(new TokenFilterDefinition.Builder() + .shingle(shingleTokenFilter).build()) + .build(); + + IndexSettingsAnalysis indexSettingsAnalysis = new IndexSettingsAnalysis.Builder() + .analyzer("trigram", analyzer) + .filter("shingle", tokenFilter) + .build(); + + IndexSettings settings = new IndexSettings.Builder().analysis(indexSettingsAnalysis).build(); + + TypeMapping mapping = new TypeMapping.Builder().properties("msg", new Property.Builder() + .text(new TextProperty.Builder().fields("trigram", new Property.Builder() + .text(new TextProperty.Builder().analyzer("trigram").build()) + .build()).build()) + .build()).build(); + + + javaClient().indices().create(c -> c + .index(index) + .settings(settings) + .mappings(mapping)); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("Design Patterns"); + + javaClient().index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("Software Architecture Patterns Explained"); + + javaClient().index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + String suggesterName = "msgSuggester"; + + PhraseSuggester phraseSuggester = FieldSuggesterBuilders.phrase() + .field("msg.trigram") + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("design paterns") + .phrase(phraseSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse response = javaClient().search(searchRequest, AppData.class); + assertTrue(response.suggest().size() > 0); + assertTrue(response.suggest().keySet().contains(suggesterName)); + assertNotNull(response.suggest().get(suggesterName)); + assertNotNull(response.suggest().get(suggesterName).get(0)); + assertTrue(response.suggest().get(suggesterName).get(0).isPhrase()); + assertNotNull(response.suggest().get(suggesterName).get(0).phrase().options()); + assertEquals(response.suggest().get(suggesterName).get(0).phrase().options().get(0) + .text(), "design patterns"); + } + // @Test // public void testValueBodyResponse() throws Exception { // DiskUsageResponse resp = highLevelClient().indices().diskUsage(b -> b diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java index 4a4f82a62f..da8f1007e7 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java @@ -58,12 +58,12 @@ public void testTemplateSearchSuggest() throws Exception { assertEquals(0, searchResponse.aggregations().size()); // intentional typo - searchResponse = sendTemplateRequest(index, "Docunent", true, false); + searchResponse = sendTemplateRequest(index, "Docuent", true, false); assertEquals(0, searchResponse.hits().hits().size()); assertEquals(1, searchResponse.suggest().size()); - var options = searchResponse.suggest().get("term#test-suggest").get(0).options(); + var options = searchResponse.suggest().get("test-suggest").get(0).term().options(); assertEquals(1, options.size()); - assertEquals("document", options.get(0).term().text()); + assertEquals("document", options.get(0).text()); assertEquals(0, searchResponse.aggregations().size()); } From b53b1b1c69153deb5058d8e329f258f0e7c58e54 Mon Sep 17 00:00:00 2001 From: Malte Hedderich <12952192+maltehedderich@users.noreply.github.com> Date: Tue, 20 Jun 2023 19:44:43 +0200 Subject: [PATCH 060/123] Manual backport: Add support for knn_vector property type (#532) * Merge branch 'upstream/main' Signed-off-by: Malte Hedderich * docs(USER_GUIDE.md): fix HttpHost parameter order Signed-off-by: Malte Hedderich --------- Signed-off-by: Malte Hedderich --- CHANGELOG.md | 2 + USER_GUIDE.md | 222 +++++++++++++++- .../mapping/DenseVectorIndexOptions.java | 185 ------------- .../_types/mapping/DenseVectorProperty.java | 242 ------------------ .../opensearch/_types/mapping/FieldType.java | 3 +- .../_types/mapping/KnnVectorMethod.java | 205 +++++++++++++++ .../_types/mapping/KnnVectorProperty.java | 182 +++++++++++++ .../opensearch/_types/mapping/Property.java | 57 ++--- .../_types/mapping/PropertyBuilders.java | 16 +- .../opensearch/indices/IndexSettings.java | 60 +++++ .../_types/mapping/KnnVectorMethodTest.java | 63 +++++ .../_types/mapping/KnnVectorPropertyTest.java | 69 +++++ 12 files changed, 828 insertions(+), 478 deletions(-) delete mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorIndexOptions.java delete mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorProperty.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethodTest.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorPropertyTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 6861358877..0b2e80df19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added +- Add support for knn_vector field type ([#529](https://github.com/opensearch-project/opensearch-java/pull/524)) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 @@ -16,6 +17,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fixed Suggesters for Completion, Term, and Phrase and refactored the Suggestion class ([#477](https://github.com/opensearch-project/opensearch-java/pull/477)) + ### Security ## [2.5.0] - 06/02/2023 diff --git a/USER_GUIDE.md b/USER_GUIDE.md index af5558e895..62ea29adcd 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -7,10 +7,15 @@ - [Create a client using `RestClientTransport`](#create-a-client-using-restclienttransport) - [Create a client using `ApacheHttpClient5Transport`](#create-a-client-using-apachehttpclient5transport) - [Create an index](#create-an-index) + - [Create an index with default settings](#create-an-index-with-default-settings) + - [Create an index with custom settings and mappings](#create-an-index-with-custom-settings-and-mappings) - [Index data](#index-data) - [Search for the documents](#search-for-the-documents) - [Get raw JSON results](#get-raw-json-results) - [Search documents using a match query](#search-documents-using-a-match-query) + - [Search documents using k-NN](#search-documents-using-k-nn) + - [Exact k-NN with scoring script](#exact-k-nn-with-scoring-script) + - [Exact k-NN with painless scripting extension](#exact-k-nn-with-painless-scripting-extension) - [Search documents using suggesters](#search-documents-using-suggesters) - [App Data class](#app-data-class) - [Using completion suggester](#using-completion-suggester) @@ -110,7 +115,7 @@ OpenSearchClient client = new OpenSearchClient(transport); import org.apache.hc.core5.http.HttpHost; final HttpHost[] hosts = new HttpHost[] { - new HttpHost("localhost", "http", 9200) + new HttpHost("http", "localhost", 9200) }; final OpenSearchTransport transport = ApacheHttpClient5TransportBuilder @@ -129,12 +134,33 @@ The Apache HttpClient 5 based transport has dependences on Apache HttpClient 5 a ## Create an index +### Create an index with default settings + ```java String index = "sample-index"; CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(index).build(); client.indices().create(createIndexRequest); ``` +### Create an index with custom settings and mappings + +```java +String index = "sample-index"; +IndexSettings settings = new IndexSettings.Builder() + .numberOfShards("2") + .numberOfReplicas("1") + .build(); +TypeMapping mapping = new TypeMapping.Builder() + .properties("age", new Property.Builder().integer(new IntegerNumberProperty.Builder().build()).build()) + .build(); +CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(index) + .settings(settings) + .mappings(mapping) + .build(); +client.indices().create(createIndexRequest); +``` + ## Index data ```java @@ -180,6 +206,172 @@ for (int i = 0; i < searchResponse.hits().hits().size(); i++) { } ``` +## Search documents using k-NN + +### Exact k-NN with scoring script + +1. Create index with custom mapping + +```java +String index = "my-knn-index-1"; +TypeMapping mapping = new TypeMapping.Builder() + .properties("my_vector", new Property.Builder() + .knnVector(new KnnVectorProperty.Builder() + .dimension(4) + .build()) + .build()) + .build(); +CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(index) + .mappings(mapping) + .build(); +client.indices().create(createIndexRequest); +``` + +2. Index documents + +```java +JsonObject doc1 = Json.createObjectBuilder() + .add("my_vector", Json.createArrayBuilder().add(1.5).add(5.5).add(4.5).add(6.4).build()) + .add("price", 10.3) + .build(); +JsonObject doc2 = Json.createObjectBuilder() + .add("my_vector", Json.createArrayBuilder().add(2.5).add(3.5).add(5.6).add(6.7).build()) + .add("price", 5.5) + .build(); +JsonObject doc3 = Json.createObjectBuilder() + .add("my_vector", Json.createArrayBuilder().add(4.5).add(5.5).add(6.7).add(3.7).build()) + .add("price", 4.4) + .build(); + +ArrayList operations = new ArrayList<>(); +operations.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(index).id("1").document(doc1)) + ).build()); +operations.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(index).id("2").document(doc2)) + ).build()); +operations.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(index).id("3").document(doc3)) + ).build()); + +BulkRequest bulkRequest = new BulkRequest.Builder() + .index(index) + .operations(operations) + .build(); +client.bulk(bulkRequest); +``` + +3. Search documents using k-NN script score (_This implementation utilizes `com.fasterxml.jackson.databind.JsonNode` as the target document class, which is not part of the OpenSearch Java library. However, any document class that matches the searched data can be used instead._) + +```java +InlineScript inlineScript = new InlineScript.Builder() + .source("knn_score") + .lang("knn") + .params(Map.of( + "field", JsonData.of("my_vector"), + "query_value", JsonData.of(List.of(1.5, 5.5, 4.5, 6.4)), + "space_type", JsonData.of("cosinesimil") + )) + .build(); +Query query = new Query.Builder() + .scriptScore(new ScriptScoreQuery.Builder() + .query(new Query.Builder() + .matchAll(new MatchAllQuery.Builder().build()) + .build()) + .script(new Script.Builder() + .inline(inlineScript) + .build()) + .build()) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .query(query) + .build(); +SearchResponse searchResponse = client.search(searchRequest, JsonNode.class); +``` + +### Exact k-NN with painless scripting extension + +1. Create index with custom mapping + +```java +String index = "my-knn-index-1"; +TypeMapping mapping = new TypeMapping.Builder() + .properties("my_vector", new Property.Builder() + .knnVector(new KnnVectorProperty.Builder() + .dimension(4) + .build()) + .build()) + .build(); +CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(index) + .mappings(mapping) + .build(); +client.indices().create(createIndexRequest); +``` + +2. Index documents + +```java +JsonObject doc1 = Json.createObjectBuilder() + .add("my_vector", Json.createArrayBuilder().add(1.5).add(5.5).add(4.5).add(6.4).build()) + .add("price", 10.3) + .build(); +JsonObject doc2 = Json.createObjectBuilder() + .add("my_vector", Json.createArrayBuilder().add(2.5).add(3.5).add(5.6).add(6.7).build()) + .add("price", 5.5) + .build(); +JsonObject doc3 = Json.createObjectBuilder() + .add("my_vector", Json.createArrayBuilder().add(4.5).add(5.5).add(6.7).add(3.7).build()) + .add("price", 4.4) + .build(); + +ArrayList operations = new ArrayList<>(); +operations.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(index).id("1").document(doc1)) + ).build()); +operations.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(index).id("2").document(doc2)) + ).build()); +operations.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(index).id("3").document(doc3)) + ).build()); + +BulkRequest bulkRequest = new BulkRequest.Builder() + .index(index) + .operations(operations) + .build(); +client.bulk(bulkRequest); +``` + +3. Search documents using k-NN with painless scripting extension (_This implementation utilizes `com.fasterxml.jackson.databind.JsonNode` as the target document class, which is not part of the OpenSearch Java library. However, any document class that matches the searched data can be used instead._) + +```java +InlineScript inlineScript = new InlineScript.Builder() + .source("1.0 + cosineSimilarity(params.query_value, doc[params.field])") + .params(Map.of( + "field", JsonData.of("my_vector"), + "query_value", JsonData.of(List.of(1.5, 5.5, 4.5, 6.4)) + )) + .build(); +Query query = new Query.Builder() + .scriptScore(new ScriptScoreQuery.Builder() + .query(new Query.Builder() + .matchAll(new MatchAllQuery.Builder().build()) + .build()) + .script(new Script.Builder() + .inline(inlineScript) + .build()) + .build()) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .query(query) + .build(); +SearchResult searchResult = client.search(searchRequest, JsonNode.class); +``` + ## Search documents using suggesters ### App Data class @@ -268,7 +460,7 @@ SearchResponse response = client.search(searchRequest, AppData.class); ```java String index = "term-suggester"; - + // term suggester does not require a special mapping client.indices().create(c -> c .index(index)); @@ -444,12 +636,14 @@ DeleteIndexResponse deleteIndexResponse = client.indices().delete(deleteIndexReq ## Data Stream API -### Create a data stream +### Create a data stream + Before creating a data stream, you need to create an index template which configures a set of indices as a data stream. -A data stream must have a timestamp field. If not specified, OpenSearch uses `@timestamp` as the default timestamp field name. +A data stream must have a timestamp field. If not specified, OpenSearch uses `@timestamp` as the default timestamp field name. + +The following sample code creates an index template for data stream with a custom timestamp field, and creates a data stream +which matches the name pattern specified in the index template. -The following sample code creates an index template for data stream with a custom timestamp field, and creates a data stream -which matches the name pattern specified in the index template. ```java String dataStreamIndexTemplateName = "sample-data-stream-template"; String timestampFieldName = "my_timestamp_field"; @@ -472,18 +666,21 @@ CreateDataStreamResponse createDataStreamResponse = javaClient().indices().creat ``` ### Get data stream + ```java GetDataStreamRequest getDataStreamRequest = new GetDataStreamRequest.Builder().name(dataStreamName).build(); GetDataStreamResponse getDataStreamResponse = javaClient().indices().getDataStream(getDataStreamRequest); ``` ### Data stream stats + ```java DataStreamsStatsRequest dataStreamsStatsRequest = new DataStreamsStatsRequest.Builder().name(dataStreamName).build(); DataStreamsStatsResponse dataStreamsStatsResponse = javaClient().indices().dataStreamsStats(dataStreamsStatsRequest); ``` ### Delete data stream and backing indices + ```java DeleteDataStreamRequest deleteDataStreamRequest = new DeleteDataStreamRequest.Builder().name(dataStreamName).build(); DeleteDataStreamResponse deleteDataStreamResponse = javaClient().indices().deleteDataStream(deleteDataStreamRequest); @@ -501,7 +698,7 @@ CreatePitRequest createPitRequest = new CreatePitRequest.Builder() .keepAlive(new Time.Builder().time("100m").build()).build(); CreatePitResponse createPitResponse = javaClient() - .createPit(createPitRequest); + .createPit(createPitRequest); ``` ### List all point in time @@ -524,10 +721,10 @@ DeletePitResponse deletePitResponse = javaClient() .deletePit(deletePitRequest); ``` - ## Cat API ### Cat Indices + The following sample code cat indices with required headers and sorted by creation date ```java @@ -536,22 +733,27 @@ IndicesRequest indicesRequest = new IndicesRequest.Builder() IndicesResponse indicesResponse = javaClient().cat().indices(indicesRequest); ``` - ### Cat aliases + The following sample code cat aliases with name "test-alias" and sorted by index + ```java AliasesRequest aliasesRequest = new AliasesRequest.Builder().name("test-alias").sort("index").build(); AliasesResponse aliasesResponse = javaClient().cat().aliases(aliasesRequest); ``` ### Cat nodes + The following sample code cat nodes sorted by cpu + ```java NodesResponse nodesResponse = javaClient().cat().nodes(r -> r.sort("cpu")); ``` ### Cat point in time segments -Similarly to the CAT Segments API, the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. + +Similarly to the CAT Segments API, the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. + ```java SegmentsResponse pitSegmentsResponse = javaClient().cat() .pitSegments(r -> r.headers("index,shard,id,segment,size")); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorIndexOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorIndexOptions.java deleted file mode 100644 index 5e5647730c..0000000000 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorIndexOptions.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package org.opensearch.client.opensearch._types.mapping; - -import org.opensearch.client.json.JsonpDeserializable; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.JsonpSerializable; -import org.opensearch.client.json.ObjectBuilderDeserializer; -import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; -import org.opensearch.client.util.ObjectBuilder; -import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; - -// typedef: _types.mapping.DenseVectorIndexOptions - -@JsonpDeserializable -public class DenseVectorIndexOptions implements JsonpSerializable { - private final String type; - - private final int m; - - private final int efConstruction; - - // --------------------------------------------------------------------------------------------- - - private DenseVectorIndexOptions(Builder builder) { - - this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - this.m = ApiTypeHelper.requireNonNull(builder.m, this, "m"); - this.efConstruction = ApiTypeHelper.requireNonNull(builder.efConstruction, this, "efConstruction"); - - } - - public static DenseVectorIndexOptions of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code type} - */ - public final String type() { - return this.type; - } - - /** - * Required - API name: {@code m} - */ - public final int m() { - return this.m; - } - - /** - * Required - API name: {@code ef_construction} - */ - public final int efConstruction() { - return this.efConstruction; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("type"); - generator.write(this.type); - - generator.writeKey("m"); - generator.write(this.m); - - generator.writeKey("ef_construction"); - generator.write(this.efConstruction); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DenseVectorIndexOptions}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String type; - - private Integer m; - - private Integer efConstruction; - - /** - * Required - API name: {@code type} - */ - public final Builder type(String value) { - this.type = value; - return this; - } - - /** - * Required - API name: {@code m} - */ - public final Builder m(int value) { - this.m = value; - return this; - } - - /** - * Required - API name: {@code ef_construction} - */ - public final Builder efConstruction(int value) { - this.efConstruction = value; - return this; - } - - /** - * Builds a {@link DenseVectorIndexOptions}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DenseVectorIndexOptions build() { - _checkSingleUse(); - - return new DenseVectorIndexOptions(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DenseVectorIndexOptions} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DenseVectorIndexOptions::setupDenseVectorIndexOptionsDeserializer); - - protected static void setupDenseVectorIndexOptionsDeserializer( - ObjectDeserializer op) { - - op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); - op.add(Builder::m, JsonpDeserializer.integerDeserializer(), "m"); - op.add(Builder::efConstruction, JsonpDeserializer.integerDeserializer(), "ef_construction"); - - } - -} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorProperty.java deleted file mode 100644 index 722b79de35..0000000000 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DenseVectorProperty.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package org.opensearch.client.opensearch._types.mapping; - -import org.opensearch.client.json.JsonpDeserializable; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.ObjectBuilderDeserializer; -import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ApiTypeHelper; -import org.opensearch.client.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: _types.mapping.DenseVectorProperty - - -@JsonpDeserializable -public class DenseVectorProperty extends PropertyBase implements PropertyVariant { - private final int dims; - - @Nullable - private final String similarity; - - @Nullable - private final Boolean index; - - @Nullable - private final DenseVectorIndexOptions indexOptions; - - // --------------------------------------------------------------------------------------------- - - private DenseVectorProperty(Builder builder) { - super(builder); - - this.dims = ApiTypeHelper.requireNonNull(builder.dims, this, "dims"); - this.similarity = builder.similarity; - this.index = builder.index; - this.indexOptions = builder.indexOptions; - - } - - public static DenseVectorProperty of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Property variant kind. - */ - @Override - public Property.Kind _propertyKind() { - return Property.Kind.DenseVector; - } - - /** - * Required - API name: {@code dims} - */ - public final int dims() { - return this.dims; - } - - /** - * API name: {@code similarity} - */ - @Nullable - public final String similarity() { - return this.similarity; - } - - /** - * API name: {@code index} - */ - @Nullable - public final Boolean index() { - return this.index; - } - - /** - * API name: {@code index_options} - */ - @Nullable - public final DenseVectorIndexOptions indexOptions() { - return this.indexOptions; - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.write("type", "dense_vector"); - super.serializeInternal(generator, mapper); - generator.writeKey("dims"); - generator.write(this.dims); - - if (this.similarity != null) { - generator.writeKey("similarity"); - generator.write(this.similarity); - - } - if (this.index != null) { - generator.writeKey("index"); - generator.write(this.index); - - } - if (this.indexOptions != null) { - generator.writeKey("index_options"); - this.indexOptions.serialize(generator, mapper); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DenseVectorProperty}. - */ - - public static class Builder extends PropertyBase.AbstractBuilder - implements - ObjectBuilder { - private Integer dims; - - @Nullable - private String similarity; - - @Nullable - private Boolean index; - - @Nullable - private DenseVectorIndexOptions indexOptions; - - /** - * Required - API name: {@code dims} - */ - public final Builder dims(int value) { - this.dims = value; - return this; - } - - /** - * API name: {@code similarity} - */ - public final Builder similarity(@Nullable String value) { - this.similarity = value; - return this; - } - - /** - * API name: {@code index} - */ - public final Builder index(@Nullable Boolean value) { - this.index = value; - return this; - } - - /** - * API name: {@code index_options} - */ - public final Builder indexOptions(@Nullable DenseVectorIndexOptions value) { - this.indexOptions = value; - return this; - } - - /** - * API name: {@code index_options} - */ - public final Builder indexOptions( - Function> fn) { - return this.indexOptions(fn.apply(new DenseVectorIndexOptions.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DenseVectorProperty}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DenseVectorProperty build() { - _checkSingleUse(); - - return new DenseVectorProperty(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DenseVectorProperty} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DenseVectorProperty::setupDenseVectorPropertyDeserializer); - - protected static void setupDenseVectorPropertyDeserializer(ObjectDeserializer op) { - PropertyBase.setupPropertyBaseDeserializer(op); - op.add(Builder::dims, JsonpDeserializer.integerDeserializer(), "dims"); - op.add(Builder::similarity, JsonpDeserializer.stringDeserializer(), "similarity"); - op.add(Builder::index, JsonpDeserializer.booleanDeserializer(), "index"); - op.add(Builder::indexOptions, DenseVectorIndexOptions._DESERIALIZER, "index_options"); - - op.ignore("type"); - } - -} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java index a6620a1dda..07b2ac13b3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java @@ -122,8 +122,7 @@ public enum FieldType implements JsonEnum { AggregateMetricDouble("aggregate_metric_double"), - DenseVector("dense_vector"), - + KnnVector("knn_vector"), ; private final String jsonValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java new file mode 100644 index 0000000000..af27ae1c80 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java @@ -0,0 +1,205 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch._types.mapping; + +import java.util.Map; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonData; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _types.mapping.KnnVectorMethod + +@JsonpDeserializable +public class KnnVectorMethod implements JsonpSerializable { + /** + * Builder for {@link KnnVectorMethod}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String name; + + @Nullable + private String spaceType; + + @Nullable + private String engine; + + @Nullable + private Map parameters; + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * API name: {@code space_type} + */ + public final Builder spaceType(@Nullable String value) { + this.spaceType = value; + return this; + } + + /** + * API name: {@code engine} + */ + public final Builder engine(@Nullable String value) { + this.engine = value; + return this; + } + + /** + * API name: {@code parameters} + */ + public final Builder parameters(@Nullable Map map) { + this.parameters = _mapPutAll(this.parameters, map); + return this; + } + + /** + * Builds a {@link KnnVectorMethod}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public KnnVectorMethod build() { + _checkSingleUse(); + + return new KnnVectorMethod(this); + } + } + + /** + * Json deserializer for {@link KnnVectorMethod} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, KnnVectorMethod::setupKnnVectorMethodDeserializer); + + public static KnnVectorMethod of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + protected static void setupKnnVectorMethodDeserializer( + ObjectDeserializer op) { + + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::spaceType, JsonpDeserializer.stringDeserializer(), "space_type"); + op.add(Builder::engine, JsonpDeserializer.stringDeserializer(), "engine"); + op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + + } + + // --------------------------------------------------------------------------------------------- + + private final String name; + + @Nullable + private final String spaceType; + + @Nullable + private final String engine; + + @Nullable + private final Map parameters; + + private KnnVectorMethod(Builder builder) { + + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.spaceType = builder.spaceType; + this.engine = builder.engine; + this.parameters = builder.parameters; + + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * API name: {@code space_type} + */ + @Nullable + public final String spaceType() { + return this.spaceType; + } + + /** + * API name: {@code engine} + */ + @Nullable + public final String engine() { + return this.engine; + } + + // --------------------------------------------------------------------------------------------- + + /** + * API name: {@code parameters} + */ + @Nullable + public final Map parameters() { + return this.parameters; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("name"); + generator.write(this.name); + + if (this.spaceType != null) { + generator.writeKey("space_type"); + generator.write(this.spaceType); + } + + if (this.engine != null) { + generator.writeKey("engine"); + generator.write(this.engine); + } + + if (this.parameters != null) { + generator.writeKey("parameters"); + for (Map.Entry item0 : this.parameters.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + } + } + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java new file mode 100644 index 0000000000..16a9ca6d3b --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java @@ -0,0 +1,182 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch._types.mapping; + +import java.util.function.Function; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _types.mapping.KnnVectorProperty + +@JsonpDeserializable +public class KnnVectorProperty extends PropertyBase implements PropertyVariant { + /** + * Builder for {@link KnnVectorProperty}. + */ + + public static class Builder extends PropertyBase.AbstractBuilder + implements + ObjectBuilder { + private Integer dimension; + + @Nullable + private String modelId; + + @Nullable + private KnnVectorMethod method; + + /** + * Required - API name: {@code dimension} + */ + public final Builder dimension(int value) { + this.dimension = value; + return this; + } + + /** + * API name: {@code model_id} + */ + public final Builder modelId(@Nullable String value) { + this.modelId = value; + return this; + } + + /** + * API name: {@code method} + */ + public final Builder method(@Nullable KnnVectorMethod value) { + this.method = value; + return this; + } + + /** + * Builds a {@link KnnVectorProperty}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public KnnVectorProperty build() { + _checkSingleUse(); + + return new KnnVectorProperty(this); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Json deserializer for {@link KnnVectorProperty} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, KnnVectorProperty::setupKnnVectorPropertyDeserializer); + + public static KnnVectorProperty of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + protected static void setupKnnVectorPropertyDeserializer(ObjectDeserializer op) { + PropertyBase.setupPropertyBaseDeserializer(op); + op.add(Builder::dimension, JsonpDeserializer.integerDeserializer(), "dimension"); + op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); + op.add(Builder::method, KnnVectorMethod._DESERIALIZER, "method"); + + op.ignore("type"); + } + + private final int dimension; + + @Nullable + private final String modelId; + + @Nullable + private final KnnVectorMethod method; + + private KnnVectorProperty(Builder builder) { + super(builder); + + this.dimension = ApiTypeHelper.requireNonNull(builder.dimension, this, "dimension"); + this.modelId = builder.modelId; + this.method = builder.method; + + } + + /** + * Property variant kind. + */ + @Override + public Property.Kind _propertyKind() { + return Property.Kind.KnnVector; + } + + /** + * Required - API name: {@code dimension} + */ + public final int dimension() { + return this.dimension; + } + + // --------------------------------------------------------------------------------------------- + + /** + * API name: {@code model_id} + */ + @Nullable + public final String modelId() { + return this.modelId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * API name: {@code method} + */ + @Nullable + public final KnnVectorMethod method() { + return this.method; + } + + @Override + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "knn_vector"); + super.serializeInternal(generator, mapper); + generator.writeKey("dimension"); + generator.write(this.dimension); + + if (this.modelId != null) { + + generator.writeKey("model_id"); + generator.write(this.modelId); + + } + + if (this.method != null) { + + generator.writeKey("method"); + this.method.serialize(generator, mapper); + } + + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java index 6e2381ce82..9bff87715a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java @@ -84,8 +84,6 @@ public enum Kind implements JsonEnum { DateRange("date_range"), - DenseVector("dense_vector"), - Double("double"), DoubleRange("double_range"), @@ -118,6 +116,8 @@ public enum Kind implements JsonEnum { Keyword("keyword"), + KnnVector("knn_vector"), + Long("long"), LongRange("long_range"), @@ -354,23 +354,6 @@ public DateRangeProperty dateRange() { return TaggedUnionUtils.get(this, Kind.DateRange); } - /** - * Is this variant instance of kind {@code dense_vector}? - */ - public boolean isDenseVector() { - return _kind == Kind.DenseVector; - } - - /** - * Get the {@code dense_vector} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code dense_vector} kind. - */ - public DenseVectorProperty denseVector() { - return TaggedUnionUtils.get(this, Kind.DenseVector); - } - /** * Is this variant instance of kind {@code double}? */ @@ -643,6 +626,19 @@ public KeywordProperty keyword() { return TaggedUnionUtils.get(this, Kind.Keyword); } + /** + * Is this variant instance of kind {@code knn_vector}? + */ + public boolean isKnnVector() { return _kind == Kind.KnnVector; } + + /** + * Get the {@code knn_vector} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code knn_vector} kind. + */ + public KnnVectorProperty knnVector() { return TaggedUnionUtils.get(this, Kind.KnnVector); } + /** * Is this variant instance of kind {@code long}? */ @@ -1057,17 +1053,6 @@ public ObjectBuilder dateRange( return this.dateRange(fn.apply(new DateRangeProperty.Builder()).build()); } - public ObjectBuilder denseVector(DenseVectorProperty v) { - this._kind = Kind.DenseVector; - this._value = v; - return this; - } - - public ObjectBuilder denseVector( - Function> fn) { - return this.denseVector(fn.apply(new DenseVectorProperty.Builder()).build()); - } - public ObjectBuilder double_(DoubleNumberProperty v) { this._kind = Kind.Double; this._value = v; @@ -1240,6 +1225,16 @@ public ObjectBuilder keyword(Function knnVector(KnnVectorProperty v) { + this._kind = Kind.KnnVector; + this._value = v; + return this; + } + + public ObjectBuilder knnVector(Function> fn) { + return this.knnVector(fn.apply(new KnnVectorProperty.Builder()).build()); + } + public ObjectBuilder long_(LongNumberProperty v) { this._kind = Kind.Long; this._value = v; @@ -1450,7 +1445,6 @@ protected static void setupPropertyDeserializer(ObjectDeserializer op) op.add(Builder::dateNanos, DateNanosProperty._DESERIALIZER, "date_nanos"); op.add(Builder::date, DateProperty._DESERIALIZER, "date"); op.add(Builder::dateRange, DateRangeProperty._DESERIALIZER, "date_range"); - op.add(Builder::denseVector, DenseVectorProperty._DESERIALIZER, "dense_vector"); op.add(Builder::double_, DoubleNumberProperty._DESERIALIZER, "double"); op.add(Builder::doubleRange, DoubleRangeProperty._DESERIALIZER, "double_range"); op.add(Builder::alias, FieldAliasProperty._DESERIALIZER, "alias"); @@ -1467,6 +1461,7 @@ protected static void setupPropertyDeserializer(ObjectDeserializer op) op.add(Builder::ipRange, IpRangeProperty._DESERIALIZER, "ip_range"); op.add(Builder::join, JoinProperty._DESERIALIZER, "join"); op.add(Builder::keyword, KeywordProperty._DESERIALIZER, "keyword"); + op.add(Builder::knnVector, KnnVectorProperty._DESERIALIZER, "knn_vector"); op.add(Builder::long_, LongNumberProperty._DESERIALIZER, "long"); op.add(Builder::longRange, LongRangeProperty._DESERIALIZER, "long_range"); op.add(Builder::murmur3, Murmur3HashProperty._DESERIALIZER, "murmur3"); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java index 4c143e2e6a..4013fdf8b0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java @@ -114,14 +114,6 @@ public static DateRangeProperty.Builder dateRange() { return new DateRangeProperty.Builder(); } - /** - * Creates a builder for the {@link DenseVectorProperty dense_vector} - * {@code Property} variant. - */ - public static DenseVectorProperty.Builder denseVector() { - return new DenseVectorProperty.Builder(); - } - /** * Creates a builder for the {@link DoubleNumberProperty double} * {@code Property} variant. @@ -248,6 +240,14 @@ public static KeywordProperty.Builder keyword() { return new KeywordProperty.Builder(); } + /** + * Creates a builder for the {@link KnnVectorProperty long} {@code Property} + * variant. + */ + public static KnnVectorProperty.Builder knnVector() { + return new KnnVectorProperty.Builder(); + } + /** * Creates a builder for the {@link LongNumberProperty long} {@code Property} * variant. diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java index bae7d418cb..4b7e26558d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java @@ -222,6 +222,12 @@ public class IndexSettings implements JsonpSerializable { @Nullable private final IndexSettingsMapping mapping; + @Nullable + private final Boolean knn; + + @Nullable + private final Integer knnAlgoParamEfSearch; + // --------------------------------------------------------------------------------------------- private IndexSettings(Builder builder) { @@ -282,6 +288,8 @@ private IndexSettings(Builder builder) { this.analysis = builder.analysis; this.settings = builder.settings; this.mapping = builder.mapping; + this.knn = builder.knn; + this.knnAlgoParamEfSearch = builder.knnAlgoParamEfSearch; } @@ -736,6 +744,22 @@ public final IndexSettingsMapping mapping() { return this.mapping; } + /** + * API name: {@code knn} + */ + @Nullable + public final Boolean knn() { + return this.knn; + } + + /** + * API name: {@code knn.algo_param.ef_search} + */ + @Nullable + public final Integer knnAlgoParamEfSearch() { + return this.knnAlgoParamEfSearch; + } + /** * Serialize this object to JSON. */ @@ -1032,6 +1056,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.mapping.serialize(generator, mapper); } + if (this.knn != null) { + generator.writeKey("knn"); + generator.write(this.knn); + + } + if (this.knnAlgoParamEfSearch != null) { + generator.writeKey("knn.algo_param_ef_search"); + generator.write(this.knnAlgoParamEfSearch); + + } } @@ -1210,6 +1244,12 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder Date: Tue, 27 Jun 2023 10:58:58 -0400 Subject: [PATCH 061/123] Bumps 'jackson' from 2.14.2 to 2.15.2 (#537) (#542) Signed-off-by: Andriy Redko (cherry picked from commit f606949b3ed4380dc31494855f197ac911554706) --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b2e80df19..23e8722f41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 - Bumps `io.github.classgraph:classgraph` from 4.8.157 to 4.8.160 +- Bumps `jackson` from 2.14.2 to 2.15.2 ((#537)[https://github.com/opensearch-project/opensearch-java/pull/537]) ### Changed diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index ce614717a8..dfa4a6e665 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -140,8 +140,8 @@ val integrationTest = task("integrationTest") { dependencies { val opensearchVersion = "2.7.0" - val jacksonVersion = "2.14.2" - val jacksonDatabindVersion = "2.14.2" + val jacksonVersion = "2.15.2" + val jacksonDatabindVersion = "2.15.2" // Apache 2.0 implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) From ccb59f5e5d9f917c365fc2e59bd98e3dc4351e79 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:49:43 -0400 Subject: [PATCH 062/123] fix: add missing translog sync interval option to index settings (#518) (#544) * fix: add missing translog sync interval option to index settings Additionally, server response contains separate `translog` object, which cannot be deserialized by present translog option deserializers. Therefore, this commit introduces a corresponding `Translog` class, similarly to how it is done for the `blocks` property. * fix: encapsulate translog options into translog in index settings Now that all the translog options are stored in a separate object, we should remove the separate fields to avoid confusion. Public methods (getters, builder setters) should remain intact, mark them deprecated and point them to the corresponding translog fields. Deserializer should still recognize string-valued translog attributes, keep the deprecated setters as field deserializers. Serializer does not have to produce string-valued translog attributes, as server parses `translog` attribute. Do not write translog contents to old `translog.xxx` fields. * refactor: use ModelTestCase in tests for json serialization/deserialization --------- (cherry picked from commit 13237962d5fad1a02d445e761ae0c58f1abce665) Signed-off-by: Maksim Strutovskii Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 + .../opensearch/indices/IndexSettings.java | 76 +++++--- .../client/opensearch/indices/Translog.java | 170 ++++++++++++++++++ .../opensearch/experiments/ParsingTests.java | 146 +++++++-------- .../experiments/containers/SomeUnionTest.java | 25 +-- .../inheritance/InheritanceTest.java | 41 +---- .../integTest/AbstractRequestIT.java | 19 +- .../client/opensearch/json/JsonDataTest.java | 22 +-- .../opensearch/json/JsonpMapperTest.java | 25 +-- .../opensearch/model/BuiltinTypesTest.java | 8 +- .../opensearch/model/SerializationTest.java | 20 +-- 11 files changed, 344 insertions(+), 210 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/indices/Translog.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e8722f41..4dff4bb058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added - Add support for knn_vector field type ([#529](https://github.com/opensearch-project/opensearch-java/pull/524)) +- Add translog option object and missing translog sync interval option in index settings ([#518](https://github.com/opensearch-project/opensearch-java/pull/518)) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 @@ -13,6 +14,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed ### Deprecated +- Deprecate translogDurability and translogFlushThresholdSize in IndexSettings in favor of a separate translog object ([#518](https://github.com/opensearch-project/opensearch-java/pull/518)) ### Removed diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java index 4b7e26558d..e0ec17254a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java @@ -36,20 +36,21 @@ package org.opensearch.client.opensearch.indices; -import org.opensearch.client.opensearch._types.Time; +import jakarta.json.stream.JsonGenerator; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.Time; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; + +import javax.annotation.Nullable; import java.util.List; import java.util.function.Function; -import javax.annotation.Nullable; // typedef: indices._types.IndexSettings @@ -199,10 +200,7 @@ public class IndexSettings implements JsonpSerializable { private final Integer maxSlicesPerScroll; @Nullable - private final String translogDurability; - - @Nullable - private final String translogFlushThresholdSize; + private final Translog translog; @Nullable private final Boolean queryStringLenient; @@ -280,8 +278,7 @@ private IndexSettings(Builder builder) { this.verifiedBeforeClose = builder.verifiedBeforeClose; this.format = builder.format; this.maxSlicesPerScroll = builder.maxSlicesPerScroll; - this.translogDurability = builder.translogDurability; - this.translogFlushThresholdSize = builder.translogFlushThresholdSize; + this.translog = builder.translog; this.queryStringLenient = builder.queryStringLenient; this.priority = builder.priority; this.topMetricsMaxSize = builder.topMetricsMaxSize; @@ -680,20 +677,32 @@ public final Integer maxSlicesPerScroll() { return this.maxSlicesPerScroll; } + /** + * API name: {@code translog} + */ + @Nullable + public final Translog translog() { + return this.translog; + } + /** * API name: {@code translog.durability} + * @deprecated use {@link #translog()} instead */ + @Deprecated @Nullable public final String translogDurability() { - return this.translogDurability; + return this.translog != null ? this.translog.durability() : null; } /** * API name: {@code translog.flush_threshold_size} + * @deprecated use {@link #translog()} instead */ + @Deprecated @Nullable public final String translogFlushThresholdSize() { - return this.translogFlushThresholdSize; + return this.translog != null ? this.translog.flushThresholdSize() : null; } /** @@ -1016,14 +1025,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.maxSlicesPerScroll); } - if (this.translogDurability != null) { - generator.writeKey("translog.durability"); - generator.write(this.translogDurability); - - } - if (this.translogFlushThresholdSize != null) { - generator.writeKey("translog.flush_threshold_size"); - generator.write(this.translogFlushThresholdSize); + if (this.translog != null) { + generator.writeKey("translog"); + this.translog.serialize(generator, mapper); } if (this.queryStringLenient != null) { @@ -1221,10 +1225,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder b.durability(value)); + } else { + translog = Translog.of(b -> b.durability(value) + .flushThresholdSize(translog.flushThresholdSize()) + .syncInterval(translog.syncInterval())); + } return this; } /** * API name: {@code translog.flush_threshold_size} + * @deprecated use {@link #translog()} instead */ + @Deprecated public final Builder translogFlushThresholdSize(@Nullable String value) { - this.translogFlushThresholdSize = value; + if (translog == null) { + translog = Translog.of(b -> b.flushThresholdSize(value)); + } else { + translog = Translog.of(b -> b.flushThresholdSize(value) + .durability(translog.durability()) + .syncInterval(translog.syncInterval())); + } return this; } @@ -1920,6 +1945,7 @@ protected static void setupIndexSettingsDeserializer(ObjectDeserializer> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code durability} + */ + @Nullable + public final String durability() { + return this.durability; + } + + /** + * API name: {@code flush_threshold_size} + */ + @Nullable + public final String flushThresholdSize() { + return this.flushThresholdSize; + } + + /** + * API name: {@code sync_interval} + */ + @Nullable + public final Time syncInterval() { + return this.syncInterval; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.durability != null) { + generator.writeKey("durability"); + generator.write(this.durability); + + } + if (this.flushThresholdSize != null) { + generator.writeKey("flush_threshold_size"); + generator.write(this.flushThresholdSize); + + } + if (this.syncInterval != null) { + generator.writeKey("sync_interval"); + this.syncInterval.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Translog}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + @Nullable + private String durability; + + @Nullable + private String flushThresholdSize; + + @Nullable + private Time syncInterval; + + /** + * API name: {@code durability} + */ + public final Translog.Builder durability(@Nullable String value) { + this.durability = value; + return this; + } + + /** + * API name: {@code flush_threshold_size} + */ + public final Translog.Builder flushThresholdSize(@Nullable String value) { + this.flushThresholdSize = value; + return this; + } + + /** + * API name: {@code sync_interval} + */ + public final Translog.Builder syncInterval(@Nullable Time value) { + this.syncInterval = value; + return this; + } + + /** + * Builds a {@link Translog}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Translog build() { + _checkSingleUse(); + + return new Translog(this); + } + } + + /** + * Json deserializer for {@link Translog} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Translog::setupTranslogDeserializer); + + protected static void setupTranslogDeserializer(ObjectDeserializer op) { + + op.add(Translog.Builder::durability, JsonpDeserializer.stringDeserializer(), "durability"); + op.add(Translog.Builder::flushThresholdSize, JsonpDeserializer.stringDeserializer(), "flush_threshold_size"); + op.add(Translog.Builder::syncInterval, Time._DESERIALIZER, "sync_interval"); + + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java index 6bbf1917a8..a356560bf1 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java @@ -32,96 +32,84 @@ package org.opensearch.client.opensearch.experiments; -import jakarta.json.spi.JsonProvider; -import jakarta.json.stream.JsonGenerator; -import jakarta.json.stream.JsonParser; -import jakarta.json.stream.JsonParsingException; -import org.junit.Assert; import org.junit.Test; -import org.opensearch.client.json.jsonb.JsonbJsonpMapper; +import org.opensearch.client.opensearch._types.Time; import org.opensearch.client.opensearch.experiments.api.FooRequest; +import org.opensearch.client.opensearch.indices.IndexSettings; import org.opensearch.client.opensearch.indices.IndexSettingsMapping; +import org.opensearch.client.opensearch.indices.Translog; +import org.opensearch.client.opensearch.model.ModelTestCase; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.nio.charset.StandardCharsets; - -public class ParsingTests extends Assert { +public class ParsingTests extends ModelTestCase { @Test - public void testFoo() throws Exception { - - try { - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - FooRequest foo = FooRequest.builder() - .name("z") - .value(1) - .indices("a", "b", "c") - .bar(b -> b - .name("Raise the bar") - ) - .build(); - - JsonProvider provider = JsonProvider.provider(); - JsonGenerator generator = provider.createGenerator(baos); - foo.serialize(generator, new JsonbJsonpMapper()); - - generator.close(); - String str = baos.toString(); - - assertEquals("{\"name\":\"z\",\"value\":1,\"indices\":[\"a\",\"b\",\"c\"],\"bar\":{\"name\":\"Raise the bar\"}}", str); - - JsonParser parser = provider.createParser(new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8))); - - FooRequest foo2 = FooRequest.parser().deserialize(parser, new JsonbJsonpMapper()); + public void testFoo() { + + FooRequest foo = FooRequest.builder() + .name("z") + .value(1) + .indices("a", "b", "c") + .bar(b -> b + .name("Raise the bar") + ) + .build(); + + String str = toJson(foo); + assertEquals("{\"name\":\"z\",\"value\":1,\"indices\":[\"a\",\"b\",\"c\"],\"bar\":{\"name\":\"Raise the bar\"}}", str); + + FooRequest foo2 = fromJson(str, FooRequest.parser()); + assertEquals(foo.name(), foo2.name()); + assertEquals(foo.value(), foo2.value()); + assertNull(foo2.size()); + assertEquals(foo.indices(), foo2.indices()); + assertEquals("Raise the bar", foo.bar().name()); + } - assertEquals(foo.name(), foo2.name()); - assertEquals(foo.value(), foo2.value()); - assertNull(foo2.size()); - assertEquals(foo.indices(), foo2.indices()); - assertEquals("Raise the bar", foo.bar().name()); - } catch (JsonParsingException je) { - throw new JsonParsingException(je.getMessage() + " at " + je.getLocation(), je, je.getLocation()); - } + @Test + public void testIndexSettingsTranslogOptionsParsing() { + + var indexSettings = IndexSettings.of(_1 -> _1.translog(Translog.of(tr -> tr + .syncInterval(Time.of(t -> t.time("10s"))) + .durability("async") + .flushThresholdSize("256mb")))); + + var str = toJson(indexSettings); + assertEquals("{\"translog\":{\"durability\":\"async\",\"flush_threshold_size\":\"256mb\"," + + "\"sync_interval\":\"10s\"}}", str); + + IndexSettings deserialized = fromJson(str, IndexSettings._DESERIALIZER); + assertEquals(indexSettings.translog().syncInterval().time(), deserialized.translog().syncInterval().time()); + assertEquals(indexSettings.translog().durability(), deserialized.translog().durability()); + assertEquals(indexSettings.translog().flushThresholdSize(), deserialized.translog().flushThresholdSize()); + + var deprecatedForm = "{\"translog\":{\"sync_interval\":\"10s\"},\"translog.durability\":\"async\",\"translog" + + ".flush_threshold_size\":\"256mb\"}"; + IndexSettings deprecatedDeserialized = fromJson(deprecatedForm, IndexSettings._DESERIALIZER); + assertEquals(indexSettings.translog().syncInterval().time(), deprecatedDeserialized.translog().syncInterval().time()); + assertEquals(indexSettings.translog().durability(), deprecatedDeserialized.translog().durability()); + assertEquals(indexSettings.translog().flushThresholdSize(), deprecatedDeserialized.translog().flushThresholdSize()); } @Test public void testIndexSettingsMappingParsing() { - try { - - var baos = new ByteArrayOutputStream(); - - var mapping = IndexSettingsMapping.of(b -> b - .totalFields(d -> d.limit(1L)) - .depth(d -> d.limit(2L)) - .nestedFields(d -> d.limit(3L)) - .nestedObjects(d -> d.limit(4L)) - .fieldNameLength(d -> d.limit(5L))); - - var provider = JsonProvider.provider(); - var generator = provider.createGenerator(baos); - mapping.serialize(generator, new JsonbJsonpMapper()); - - generator.close(); - var str = baos.toString(); - - assertEquals("{\"total_fields\":{\"limit\":1},\"depth\":{\"limit\":2},\"nested_fields\":{\"limit\":3}," + - "\"nested_objects\":{\"limit\":4},\"field_name_length\":{\"limit\":5}}", str); - - var parser = provider.createParser(new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8))); - - var deserialized = IndexSettingsMapping._DESERIALIZER.deserialize(parser, new JsonbJsonpMapper()); - - assertEquals(mapping.totalFields().limit(), deserialized.totalFields().limit()); - assertEquals(mapping.depth().limit(), deserialized.depth().limit()); - assertEquals(mapping.nestedFields().limit(), deserialized.nestedFields().limit()); - assertEquals(mapping.nestedObjects().limit(), deserialized.nestedObjects().limit()); - assertEquals(mapping.fieldNameLength().limit(), deserialized.fieldNameLength().limit()); - } catch (JsonParsingException je) { - throw new JsonParsingException(je.getMessage() + " at " + je.getLocation(), je, je.getLocation()); - } + var mapping = IndexSettingsMapping.of(b -> b + .totalFields(d -> d.limit(1L)) + .depth(d -> d.limit(2L)) + .nestedFields(d -> d.limit(3L)) + .nestedObjects(d -> d.limit(4L)) + .fieldNameLength(d -> d.limit(5L))); + + var str = toJson(mapping); + assertEquals("{\"total_fields\":{\"limit\":1},\"depth\":{\"limit\":2},\"nested_fields\":{\"limit\":3}," + + "\"nested_objects\":{\"limit\":4},\"field_name_length\":{\"limit\":5}}", str); + + var deserialized = fromJson(str, IndexSettingsMapping._DESERIALIZER); + assertEquals(mapping.totalFields().limit(), deserialized.totalFields().limit()); + assertEquals(mapping.depth().limit(), deserialized.depth().limit()); + assertEquals(mapping.nestedFields().limit(), deserialized.nestedFields().limit()); + assertEquals(mapping.nestedObjects().limit(), deserialized.nestedObjects().limit()); + assertEquals(mapping.fieldNameLength().limit(), deserialized.fieldNameLength().limit()); } + } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/containers/SomeUnionTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/containers/SomeUnionTest.java index 5a6f564fd6..3342bbb65b 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/containers/SomeUnionTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/containers/SomeUnionTest.java @@ -32,16 +32,9 @@ package org.opensearch.client.opensearch.experiments.containers; -import org.opensearch.client.opensearch.model.ModelTestCase; -import org.opensearch.client.json.jsonb.JsonbJsonpMapper; -import jakarta.json.spi.JsonProvider; -import jakarta.json.stream.JsonGenerator; -import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; import org.junit.Test; - -import java.io.ByteArrayOutputStream; -import java.io.StringReader; +import org.opensearch.client.opensearch.model.ModelTestCase; public class SomeUnionTest extends ModelTestCase { @@ -67,16 +60,11 @@ public void testDeserialization() { @Test public void testSerialization() { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - JsonProvider provider = JsonProvider.provider(); - JsonGenerator generator = provider.createGenerator(baos); + String str = toJson(su); - su.serialize(generator, new JsonbJsonpMapper()); - generator.close(); + System.out.println(str); - System.out.println(baos.toString()); - - assertEquals(json, baos.toString()); + assertEquals(json, str); } @@ -84,11 +72,8 @@ public void testSerialization() { public void testMissingVariantDeserialization() { String json = "{}"; - JsonProvider provider = JsonProvider.provider(); - JsonParser parser = provider.createParser(new StringReader(json)); - JsonParsingException e = assertThrows(JsonParsingException.class, () -> { - SomeUnion c = SomeUnion._DESERIALIZER.deserialize(parser, new JsonbJsonpMapper()); + fromJson(json, SomeUnion._DESERIALIZER); }); assertEquals("Property 'type' not found", e.getMessage()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/inheritance/InheritanceTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/inheritance/InheritanceTest.java index 24ea0b8200..6f1f677844 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/inheritance/InheritanceTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/inheritance/InheritanceTest.java @@ -32,26 +32,16 @@ package org.opensearch.client.opensearch.experiments.inheritance; +import org.junit.Test; import org.opensearch.client.opensearch.experiments.inheritance.child.ChildClass; import org.opensearch.client.opensearch.experiments.inheritance.final_.FinalClass; -import org.opensearch.client.json.jsonb.JsonbJsonpMapper; -import jakarta.json.spi.JsonProvider; -import jakarta.json.stream.JsonGenerator; -import jakarta.json.stream.JsonParser; -import org.junit.Assert; -import org.junit.Test; +import org.opensearch.client.opensearch.model.ModelTestCase; -import java.io.ByteArrayOutputStream; -import java.io.StringReader; - -public class InheritanceTest extends Assert { +public class InheritanceTest extends ModelTestCase { @Test public void testSerialization() { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - JsonProvider provider = JsonProvider.provider(); - FinalClass fc = new FinalClass.Builder() // Start fields from the top of the hierarchy to test setter return values .baseField("baseValue") @@ -59,49 +49,36 @@ public void testSerialization() { .finalField("finalValue") .build(); - JsonGenerator generator = provider.createGenerator(baos); - fc.serialize(generator, new JsonbJsonpMapper()); - - generator.close(); - String str = baos.toString(); + String str = toJson(fc); assertEquals("{\"baseField\":\"baseValue\",\"childField\":\"childValue\",\"finalField\":\"finalValue\"}", str); - baos.reset(); - ChildClass cc = new ChildClass.Builder() // Start fields from the top of the hierarchy to test setter return values .baseField("baseValue") .childField("childValue") .build(); - generator = provider.createGenerator(baos); - cc.serialize(generator, new JsonbJsonpMapper()); - - generator.close(); - str = baos.toString(); + str = toJson(cc); assertEquals("{\"baseField\":\"baseValue\",\"childField\":\"childValue\"}", str); } @Test public void testDeserialization() { - JsonProvider provider = JsonProvider.provider(); - JsonParser parser = provider.createParser(new StringReader( - "{\"baseField\":\"baseValue\",\"childField\":\"childValue\",\"finalField\":\"finalValue\"}")); + String json = "{\"baseField\":\"baseValue\",\"childField\":\"childValue\",\"finalField\":\"finalValue\"}"; - FinalClass fc = FinalClass.JSONP_PARSER.deserialize(parser, new JsonbJsonpMapper()); + FinalClass fc = fromJson(json, FinalClass.JSONP_PARSER); assertEquals("baseValue", fc.baseField()); assertEquals("childValue", fc.childField()); assertEquals("finalValue", fc.finalField()); - parser = provider.createParser(new StringReader( - "{\"baseField\":\"baseValue\",\"childField\":\"childValue\"}")); + json = "{\"baseField\":\"baseValue\",\"childField\":\"childValue\"}"; - ChildClass cc = ChildClass.JSONP_PARSER.deserialize(parser, new JsonbJsonpMapper()); + ChildClass cc = fromJson(json, ChildClass.JSONP_PARSER); assertEquals("baseValue", cc.baseField()); assertEquals("childValue", cc.childField()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java index c8529fc470..c52908bbcb 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java @@ -82,6 +82,7 @@ import org.opensearch.client.opensearch.indices.IndexSettings; import org.opensearch.client.opensearch.indices.IndexSettingsAnalysis; import org.opensearch.client.opensearch.indices.IndexState; +import org.opensearch.client.opensearch.indices.Translog; import org.opensearch.client.opensearch.model.ModelTestCase; import org.opensearch.client.transport.endpoints.BooleanResponse; @@ -126,10 +127,11 @@ public void testIndexCreation() throws Exception { } @Test - public void testIndexSettingsMapping() throws Exception { + public void testIndexSettings() throws Exception { var createResponse = javaClient().indices() .create(r -> r.index("test-settings") .settings(s -> s + .translog(Translog.of(tl -> tl.syncInterval(Time.of(t -> t.time("10s"))))) .mapping(m -> m .fieldNameLength(f -> f.limit(300L)) .totalFields(f -> f.limit(30L)) @@ -145,6 +147,9 @@ public void testIndexSettingsMapping() throws Exception { assertNotNull(createdIndexSettings); assertNotNull(createdIndexSettings.settings()); assertNotNull(createdIndexSettings.settings().index()); + assertNotNull(createdIndexSettings.settings().index().translog()); + assertNotNull(createdIndexSettings.settings().index().translog().syncInterval()); + assertEquals("10s", createdIndexSettings.settings().index().translog().syncInterval().time()); var createdMappingSettings = createdIndexSettings.settings().index().mapping(); assertNotNull(createdMappingSettings); assertNotNull(createdMappingSettings.fieldNameLength()); @@ -161,6 +166,7 @@ public void testIndexSettingsMapping() throws Exception { var putSettingsResponse = javaClient().indices().putSettings(r -> r .index("test-settings") .settings(s -> s + .translog(Translog.of(tl -> tl.syncInterval(Time.of(t -> t.time("5s"))))) .mapping(m -> m .fieldNameLength(f -> f.limit(400L)) .totalFields(f -> f.limit(130L)) @@ -175,6 +181,9 @@ public void testIndexSettingsMapping() throws Exception { assertNotNull(updatedIndexSettings); assertNotNull(updatedIndexSettings.settings()); assertNotNull(updatedIndexSettings.settings().index()); + assertNotNull(updatedIndexSettings.settings().index().translog()); + assertNotNull(updatedIndexSettings.settings().index().translog().syncInterval()); + assertEquals("5s", updatedIndexSettings.settings().index().translog().syncInterval().time()); var updatedMappingSettings = updatedIndexSettings.settings().index().mapping(); assertNotNull(updatedMappingSettings); assertNotNull(updatedMappingSettings.fieldNameLength()); @@ -557,7 +566,7 @@ public void testDefaultIndexSettings() throws IOException { public void testCompletionSuggesterFailure() throws IOException { String index = "test-completion-suggester-failure"; - + Property intValueProp = new Property.Builder() .long_(v -> v) @@ -623,7 +632,7 @@ public void testPit() throws IOException { } assumeTrue("The PIT is supported in OpenSearch 2.4.0 and later", Version.fromString(version).onOrAfter(Version.fromString("2.4.0"))); - + String index = "test-point-in-time"; javaClient().indices().create(c -> c @@ -736,7 +745,7 @@ public void testCompletionSuggester() throws IOException { public void testTermSuggester() throws IOException { String index = "test-term-suggester"; - + // term suggester does not require a special mapping javaClient().indices().create(c -> c .index(index)); @@ -818,7 +827,7 @@ public void testPhraseSuggester() throws IOException { .text(new TextProperty.Builder().analyzer("trigram").build()) .build()).build()) .build()).build(); - + javaClient().indices().create(c -> c .index(index) diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonDataTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonDataTest.java index 50aa79eb93..b42c9b7897 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonDataTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonDataTest.java @@ -32,18 +32,18 @@ package org.opensearch.client.opensearch.json; -import org.opensearch.client.json.JsonData; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.jsonb.JsonbJsonpMapper; import jakarta.json.JsonString; import jakarta.json.JsonValue; -import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import org.junit.Assert; import org.junit.Test; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.jsonb.JsonbJsonpMapper; +import org.opensearch.client.opensearch.model.ModelTestCase; import java.io.StringReader; -import java.io.StringWriter; + public class JsonDataTest extends Assert { @@ -69,9 +69,7 @@ public void testSerialize() { String json = "{\"children\":[{\"doubleValue\":3.2,\"intValue\":2}],\"doubleValue\":2.1,\"intValue\":1," + "\"stringValue\":\"foo\"}"; - JsonParser parser = mapper.jsonProvider().createParser(new StringReader(json)); - JsonpMapperTest.SomeClass sc = - mapper.deserialize(parser, JsonpMapperTest.SomeClass.class); + JsonpMapperTest.SomeClass sc = ModelTestCase.fromJson(json, JsonpMapperTest.SomeClass.class, mapper); assertEquals("foo", sc.getStringValue()); assertEquals(1, sc.getChildren().size()); @@ -80,13 +78,7 @@ public void testSerialize() { JsonData data = JsonData.of(sc); - StringWriter sw = new StringWriter(); - JsonGenerator generator = mapper.jsonProvider().createGenerator(sw); - - data.serialize(generator, mapper); - generator.close(); - - assertEquals(json, sw.toString()); + assertEquals(json, ModelTestCase.toJson(data, mapper)); } @Test diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java index f7b69e4082..2cdb878e7e 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/json/JsonpMapperTest.java @@ -32,25 +32,24 @@ package org.opensearch.client.opensearch.json; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.jackson.JacksonJsonpMapper; -import org.opensearch.client.json.jsonb.JsonbJsonpMapper; -import org.opensearch.client.opensearch.IOUtils; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.databind.MappingJsonFactory; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.datatype.jsonp.JSONPModule; - import jakarta.json.Json; import jakarta.json.JsonValue; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import org.junit.Assert; import org.junit.Test; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.json.jsonb.JsonbJsonpMapper; +import org.opensearch.client.opensearch.IOUtils; +import org.opensearch.client.opensearch.model.ModelTestCase; import java.io.StringReader; import java.io.StringWriter; @@ -186,20 +185,14 @@ private void testSerialize(JsonpMapper mapper, String expected) { other.setDoubleValue(3.2); something.setChildren(Collections.singletonList(other)); - StringWriter strw = new StringWriter(); - JsonGenerator generator = mapper.jsonProvider().createGenerator(strw); - - mapper.serialize(something, generator); - - generator.close(); + String str = ModelTestCase.toJson(something, mapper); - assertEquals(expected, strw.getBuffer().toString()); + assertEquals(expected, str); } private void testDeserialize(JsonpMapper mapper, String json) { - JsonParser parser = mapper.jsonProvider().createParser(new StringReader(json)); - SomeClass parsed = mapper.deserialize(parser, SomeClass.class); + SomeClass parsed = ModelTestCase.fromJson(json, SomeClass.class, mapper); assertEquals(1, parsed.getIntValue()); assertEquals(2.1, parsed.getDoubleValue(), 0.0); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/BuiltinTypesTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/BuiltinTypesTest.java index 42930ce102..c501ff12d6 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/BuiltinTypesTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/BuiltinTypesTest.java @@ -32,6 +32,7 @@ package org.opensearch.client.opensearch.model; +import org.junit.Test; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.opensearch._types.FieldValue; import org.opensearch.client.opensearch._types.SortOptions; @@ -41,14 +42,10 @@ import org.opensearch.client.opensearch._types.query_dsl.SpanGapQuery; import org.opensearch.client.opensearch.core.SearchRequest; import org.opensearch.client.opensearch.indices.IndexSettings; -import org.junit.Test; -import java.io.StringReader; import java.util.ArrayList; import java.util.List; -import jakarta.json.stream.JsonParser; - public class BuiltinTypesTest extends ModelTestCase { @Test @@ -239,10 +236,9 @@ public void testNullableInt() { public void testNullableStringInArray() { // stringOrNullDeserializer allows to handle null events in string arrays String json = "[\"lettuce\", null, \"tomato\"]"; - JsonParser jsonParser = mapper.jsonProvider().createParser(new StringReader(json)); JsonpDeserializer stringDeserializer = JsonpDeserializer.stringOrNullDeserializer(); - List result = JsonpDeserializer.arrayDeserializer(stringDeserializer).deserialize(jsonParser, mapper); + List result = fromJson(json, JsonpDeserializer.arrayDeserializer(stringDeserializer)); List expected = new ArrayList<>(); expected.add("lettuce"); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/SerializationTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/SerializationTest.java index 9ae0230e18..b61b15f723 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/SerializationTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/SerializationTest.java @@ -32,23 +32,20 @@ package org.opensearch.client.opensearch.model; -import org.opensearch.client.opensearch.cat.NodesResponse; -import org.opensearch.client.opensearch.core.GetSourceResponse; -import org.opensearch.client.json.JsonpDeserializable; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpMapperBase; -import org.opensearch.client.json.JsonpUtils; import io.github.classgraph.ClassGraph; import io.github.classgraph.ClassInfo; import io.github.classgraph.ClassInfoList; import io.github.classgraph.ScanResult; import jakarta.json.Json; import jakarta.json.JsonValue; -import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; import org.junit.Test; - -import java.io.StringReader; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapperBase; +import org.opensearch.client.json.JsonpUtils; +import org.opensearch.client.opensearch.cat.NodesResponse; +import org.opensearch.client.opensearch.core.GetSourceResponse; public class SerializationTest extends ModelTestCase { @@ -71,8 +68,7 @@ public void loadAllDeserializers() throws Exception { assertNotNull(deserializer); // Deserialize something dummy to resolve lazy deserializers - JsonParser parser = mapper.jsonProvider().createParser(new StringReader("-")); - assertThrows(JsonParsingException.class, () -> deserializer.deserialize(parser, mapper)); + assertThrows(JsonParsingException.class, () -> fromJson("-", deserializer)); } // Check that all classes that have a _DESERIALIZER field also have the annotation @@ -119,7 +115,7 @@ public void testGenericValueBody() { JsonpDeserializer> deserializer = GetSourceResponse.createGetSourceResponseDeserializer(JsonpDeserializer.stringDeserializer()); - r = deserializer.deserialize(mapper.jsonProvider().createParser(new StringReader(json)), mapper); + r = fromJson(json, deserializer); assertEquals("The value", r.valueBody()); From 8be26ff6dfd1f61da9cca26a89d77f83e7ff6fb2 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 15:11:57 -0400 Subject: [PATCH 063/123] Fixes #283 (#538) (#552) (cherry picked from commit 852553075a363d2c397e7cd8d645a6b3af42cf06) Signed-off-by: Uriel Dan Nudelman Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + .../opensearch/core/DeleteByQueryRequest.java | 6 ++-- .../opensearch/core/ReindexRequest.java | 6 ++-- .../opensearch/core/UpdateByQueryRequest.java | 6 ++-- .../core/DeleteByQueryRequestTest.java | 36 +++++++++++++++++++ .../opensearch/core/ReindexRequestTest.java | 34 ++++++++++++++++++ .../core/UpdateByQueryRequestTest.java | 36 +++++++++++++++++++ 7 files changed, 116 insertions(+), 9 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/core/DeleteByQueryRequestTest.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/core/ReindexRequestTest.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/core/UpdateByQueryRequestTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dff4bb058..b160101271 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - Add support for knn_vector field type ([#529](https://github.com/opensearch-project/opensearch-java/pull/524)) - Add translog option object and missing translog sync interval option in index settings ([#518](https://github.com/opensearch-project/opensearch-java/pull/518)) +- Adds the option to set slices=auto for UpdateByQueryRequest, DeleteByQueryRequest and ReindexRequest ([#538](https://github.com/opensearch-project/opensearch-java/pull/538)) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java index e684435b8f..516f62060c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java @@ -509,7 +509,7 @@ public final SlicedScroll slice() { /** * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * the task isn't sliced into subtasks. Can be set to 0 for auto. *

* API name: {@code slices} */ @@ -1125,7 +1125,7 @@ public final Builder slice(Functionauto. + * the task isn't sliced into subtasks. Can be set to 0 for auto. *

* API name: {@code slices} */ @@ -1327,7 +1327,7 @@ protected static void setupDeleteByQueryRequestDeserializer(ObjectDeserializer { Map params = new HashMap<>(); if (request.slices != null) { - params.put("slices", String.valueOf(request.slices)); + params.put("slices", request.slices == 0 ? "auto" : String.valueOf(request.slices)); } if (request.df != null) { params.put("df", request.df); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java index 4d15889524..fd105054e7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java @@ -219,7 +219,7 @@ public final Long size() { /** * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * the task isn't sliced into subtasks. Can be set to 0 for auto. *

* API name: {@code slices} */ @@ -467,7 +467,7 @@ public final Builder size(@Nullable Long value) { /** * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * the task isn't sliced into subtasks. Can be set to 0 for auto. *

* API name: {@code slices} */ @@ -605,7 +605,7 @@ protected static void setupReindexRequestDeserializer(ObjectDeserializer { Map params = new HashMap<>(); if (request.slices != null) { - params.put("slices", String.valueOf(request.slices)); + params.put("slices", request.slices == 0 ? "auto" : String.valueOf(request.slices)); } if (request.requestsPerSecond != null) { params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java index 847e0e8bd7..f651b23696 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java @@ -525,7 +525,7 @@ public final SlicedScroll slice() { /** * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * the task isn't sliced into subtasks. Can be set to 0 for auto. *

* API name: {@code slices} */ @@ -1181,7 +1181,7 @@ public final Builder slice(Functionauto. + * the task isn't sliced into subtasks. Can be set to 0 for auto. *

* API name: {@code slices} */ @@ -1397,7 +1397,7 @@ protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer { Map params = new HashMap<>(); if (request.slices != null) { - params.put("slices", String.valueOf(request.slices)); + params.put("slices", request.slices == 0 ? "auto" : String.valueOf(request.slices)); } if (request.df != null) { params.put("df", request.df); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/DeleteByQueryRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/DeleteByQueryRequestTest.java new file mode 100644 index 0000000000..7afa14d9a2 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/DeleteByQueryRequestTest.java @@ -0,0 +1,36 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Map; + +public class DeleteByQueryRequestTest extends Assert { + @Test + public void testEndpointSlicesAuto() { + DeleteByQueryRequest deleteByQueryRequest = DeleteByQueryRequest.of(b -> b + .index("test-index") + .slices(0L)); + Map queryParameters = DeleteByQueryRequest._ENDPOINT.queryParameters(deleteByQueryRequest); + assertTrue("Must have a slices query parameter", queryParameters.containsKey("slices")); + assertEquals("auto", queryParameters.get("slices")); + } + + @Test + public void DeleteByQueryRequest() { + DeleteByQueryRequest deleteByQueryRequest = DeleteByQueryRequest.of(b -> b + .index("test-index") + .slices(6L)); + Map queryParameters = DeleteByQueryRequest._ENDPOINT.queryParameters(deleteByQueryRequest); + assertTrue("Must have a slices query parameter", queryParameters.containsKey("slices")); + assertEquals("6", queryParameters.get("slices")); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/ReindexRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/ReindexRequestTest.java new file mode 100644 index 0000000000..22fd150b66 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/ReindexRequestTest.java @@ -0,0 +1,34 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Map; + +public class ReindexRequestTest extends Assert { + @Test + public void testEndpointSlicesAuto() { + ReindexRequest reindexRequest = ReindexRequest.of(b -> b + .slices(0L)); + Map queryParameters = ReindexRequest._ENDPOINT.queryParameters(reindexRequest); + assertTrue("Must have a slices query parameter", queryParameters.containsKey("slices")); + assertEquals("auto", queryParameters.get("slices")); + } + + @Test + public void testEndpointSlicesNumber() { + ReindexRequest reindexRequest = ReindexRequest.of(b -> b + .slices(6L)); + Map queryParameters = ReindexRequest._ENDPOINT.queryParameters(reindexRequest); + assertTrue("Must have a slices query parameter", queryParameters.containsKey("slices")); + assertEquals("6", queryParameters.get("slices")); + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/UpdateByQueryRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/UpdateByQueryRequestTest.java new file mode 100644 index 0000000000..6883dea8a3 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/UpdateByQueryRequestTest.java @@ -0,0 +1,36 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.core; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Map; + +public class UpdateByQueryRequestTest extends Assert { + @Test + public void testEndpointSlicesAuto() { + UpdateByQueryRequest updateByQueryRequest = UpdateByQueryRequest.of(b -> b + .index("test-index") + .slices(0L)); + Map queryParameters = UpdateByQueryRequest._ENDPOINT.queryParameters(updateByQueryRequest); + assertTrue("Must have a slices query parameter", queryParameters.containsKey("slices")); + assertEquals("auto", queryParameters.get("slices")); + } + + @Test + public void testEndpointSlicesNumber() { + UpdateByQueryRequest updateByQueryRequest = UpdateByQueryRequest.of(b -> b + .index("test-index") + .slices(6L)); + Map queryParameters = UpdateByQueryRequest._ENDPOINT.queryParameters(updateByQueryRequest); + assertTrue("Must have a slices query parameter", queryParameters.containsKey("slices")); + assertEquals("6", queryParameters.get("slices")); + } +} From b540c9815055652994fa8a3105193682849f2707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Schmitt?= Date: Wed, 5 Jul 2023 17:35:48 +0100 Subject: [PATCH 064/123] Fixes #553: fix highlight max_analyzer_offset field name to match with the one introduced in OpenSearch 2.2.0 (#557) Signed-off-by: Joao Schmitt --- CHANGELOG.md | 3 +- .../opensearch/core/search/Highlight.java | 26 +-- .../integTest/AbstractHighlightIT.java | 172 ++++++++++++++++++ .../integTest/httpclient5/HighlightIT.java | 14 ++ .../integTest/restclient/HighlightIT.java | 25 +++ 5 files changed, 226 insertions(+), 14 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index b160101271..99ceb3c8b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -132,7 +132,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix missing cause message in missing permission to call Fine Grained Access Control Amazon OpenSearch domain ([#473](https://github.com/opensearch-project/opensearch-java/issues/473)) - Fix catching JsonParsingException ([#494](https://github.com/opensearch-project/opensearch-java/issues/494)) - Fix StoryStats numeric value out of range of int ([#489](https://github.com/opensearch-project/opensearch-java/pull/489)) - +- Fix highlight max_analyzer_offset field name to match with the one introduced in OpenSearch 2.2.0 ([#555](https://github.com/opensearch-project/opensearch-java/pull/555)) +- ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java index 5c9c22c67d..20cabf1393 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java @@ -112,7 +112,7 @@ public class Highlight implements JsonpSerializable { private final Query highlightQuery; @Nullable - private final String maxAnalyzedOffset; + private final String maxAnalyzerOffset; // --------------------------------------------------------------------------------------------- @@ -137,7 +137,7 @@ private Highlight(Builder builder) { this.requireFieldMatch = builder.requireFieldMatch; this.tagsSchema = builder.tagsSchema; this.highlightQuery = builder.highlightQuery; - this.maxAnalyzedOffset = builder.maxAnalyzedOffset; + this.maxAnalyzerOffset = builder.maxAnalyzerOffset; } @@ -295,11 +295,11 @@ public final Query highlightQuery() { } /** - * API name: {@code max_analyzed_offset} + * API name: {@code max_analyzer_offset} */ @Nullable - public final String maxAnalyzedOffset() { - return this.maxAnalyzedOffset; + public final String maxAnalyzerOffset() { + return this.maxAnalyzerOffset; } /** @@ -419,9 +419,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.highlightQuery.serialize(generator, mapper); } - if (this.maxAnalyzedOffset != null) { - generator.writeKey("max_analyzed_offset"); - generator.write(this.maxAnalyzedOffset); + if (this.maxAnalyzerOffset != null) { + generator.writeKey("max_analyzer_offset"); + generator.write(this.maxAnalyzerOffset); } @@ -491,7 +491,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder } /** - * API name: {@code max_analyzed_offset} + * API name: {@code max_analyzer_offset} */ - public final Builder maxAnalyzedOffset(@Nullable String value) { - this.maxAnalyzedOffset = value; + public final Builder maxAnalyzerOffset(@Nullable String value) { + this.maxAnalyzerOffset = value; return this; } @@ -756,7 +756,7 @@ protected static void setupHighlightDeserializer(ObjectDeserializer>> highlights = highlightQuery("spread", + h -> h.fields("content", b -> b)); + + assertEquals(2, highlights.size()); + for (Map> hit : highlights) { + assertEquals(1, hit.size()); + assertEquals(1, hit.get("content").size()); + assertTrue(hit.get("content").get(0).contains("spread")); + } + } + + @Test + public void testMultiFieldHighlight() throws Exception { + String index = "queries_highlight"; + createTestDocuments(index); + + List>> highlights = highlightQuery("real decades", + h -> h.fields("title", b -> b).fields("content", b -> b)); + + assertEquals(3, highlights.size()); + for (Map> hit : highlights) { + assertEquals(2, hit.size()); + assertEquals(1, hit.get("title").size()); + assertTrue(hit.get("title").get(0).contains("Real")); + assertEquals(1, hit.get("content").size()); + assertTrue(hit.get("content").get(0).contains("decades")); + } + } + + @Test + public void testDifferentMarkersHighlight() throws Exception { + String index = "queries_highlight"; + createTestDocuments(index); + + List>> highlights = highlightQuery("spread", + h -> h.preTags("").postTags("").fields("content", b -> b)); + + assertEquals(2, highlights.size()); + for (Map> hit : highlights) { + assertEquals(1, hit.size()); + assertEquals(1, hit.get("content").size()); + assertTrue(hit.get("content").get(0).contains("spread")); + } + } + + @Test + public void testAnalyzerOffset() throws Exception { + + String[] versionNumber = javaClient().info().version().number().split("\\."); + int major = Integer.parseInt(versionNumber[0]); + int minor = Integer.parseInt(versionNumber[1]); + + // The max_analyzer_offset setting was introduced in OpenSearch 2.2.0 + // before that, the max_analyzer_offset thrown an unknown field exception + // For more details, see: + // https://github.com/opensearch-project/OpenSearch/pull/4031 + // https://github.com/opensearch-project/OpenSearch/pull/3893 + if (major >= 2 && minor >= 2) { + String index = "queries_highlight"; + createTestDocuments(index); + List>> highlights = highlightQuery("real", + h -> h.maxAnalyzerOffset("5").fields("title", b -> b)); + + assertEquals(3, highlights.size()); + assertEquals(0, highlights.get(0).size()); + assertEquals(1, highlights.get(1).size()); + assertEquals(1, highlights.get(2).size()); + + assertTrue(highlights.get(1).get("title").get(0).contains("Real")); + assertTrue(highlights.get(2).get("title").get(0).contains("Real")); + } + } + + private List>> highlightQuery(String query, + Function> fn) + throws IOException { + SearchResponse

response = javaClient() + .search(s -> s + .query(q -> q + .simpleQueryString(sqs -> sqs + .fields("title", "content", "author") + .query(query))) + .highlight(fn), Article.class); + return response.hits().hits().stream().map(Hit::highlight).collect(Collectors.toList()); + } + + private void createTestDocuments(String index) throws IOException { + javaClient().create(_1 -> _1.index(index).id("1").document(createArticle( + "Superheroes are Real", "Meet these man avoid the fire spread during last decades.", "John Doe")) + .refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2").document(createArticle( + "Real Slow Ideas", "Why some innovations spread quick while others take decades to catch hold.", "John Foo")) + .refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3").document(createArticle( + "Real Two Degrees", "How the world failed on climate change during the decades.", "Anne Doe")) + .refresh(Refresh.True)); + } + + private Article createArticle(String title, String content, String author) { + return new Article(title, content, author); + } + + public static class Article { + public String title; + public String content; + public String author; + + public Article() { + } + + public Article(String title, String content, String author) { + this.title = title; + this.content = content; + this.author = author; + } + + public String getTitle() { + return title; + } + + public void setTitle(final String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(final String content) { + this.content = content; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(final String author) { + this.author = author; + } + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java new file mode 100644 index 0000000000..1f097e2497 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractHighlightIT; + +public class HighlightIT extends AbstractHighlightIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java new file mode 100644 index 0000000000..0db9f5a545 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractHighlightIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +import java.io.IOException; + +public class HighlightIT extends AbstractHighlightIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} From b9f70b3318a218faedaafb93707327b020a00587 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 5 Jul 2023 14:38:45 -0400 Subject: [PATCH 065/123] Update `httpcomponents` dependencies. (#554) (#560) (cherry picked from commit d786611431e78a6c5f7212d6304621f401dbde8f) Signed-off-by: Yury-Fridlyand Signed-off-by: Andriy Redko Co-authored-by: Yury-Fridlyand --- CHANGELOG.md | 1 + USER_GUIDE.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ceb3c8b9..45aab40dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 - Bumps `io.github.classgraph:classgraph` from 4.8.157 to 4.8.160 - Bumps `jackson` from 2.14.2 to 2.15.2 ((#537)[https://github.com/opensearch-project/opensearch-java/pull/537]) +- Update `org.apache.httpcomponents.client5:httpclient5` from `5.1.4` to `5.2.1` and `org.apache.httpcomponents.core5:httpcore5` from `5.1.5` to `5.2.2` ### Changed diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 62ea29adcd..aba3e6f193 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -128,8 +128,8 @@ OpenSearchClient client = new OpenSearchClient(transport); The Apache HttpClient 5 based transport has dependences on Apache HttpClient 5 and Apache HttpCore 5 which has to be added to the project explicitly. ```gradle - implementation("org.apache.httpcomponents.client5", "httpclient5", "5.1.4") - implementation("org.apache.httpcomponents.core5", "httpcore5", "5.1.5") + implementation("org.apache.httpcomponents.client5", "httpclient5", "5.2.1") + implementation("org.apache.httpcomponents.core5", "httpcore5", "5.2.2") ``` ## Create an index From 1eb8fc5c5f368fd9ea0419f689c04e65b22e0140 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:04:28 -0400 Subject: [PATCH 066/123] [Backport 2.x] Add support for approximate k-NN queries (#559) * Add support for approximate k-NN queries (#548) * Add Knn query type Signed-off-by: Thomas Farr * Integration test Signed-off-by: Thomas Farr * Checkstyle fix Signed-off-by: Thomas Farr * Run unreleased test Signed-off-by: Thomas Farr * Fixes Signed-off-by: Thomas Farr * Assume knn plugin installed Signed-off-by: Thomas Farr * Changelog Signed-off-by: Thomas Farr * Add to QueryBuilders Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr Signed-off-by: Thomas Farr (cherry picked from commit f427f27276254bcebdc3331a6e132678c7b153c0) Signed-off-by: github-actions[bot] * Fixing compile errors Signed-off-by: Vacha Shah --------- Signed-off-by: Thomas Farr Signed-off-by: Thomas Farr Signed-off-by: github-actions[bot] Signed-off-by: Vacha Shah Co-authored-by: github-actions[bot] Co-authored-by: Vacha Shah --- CHANGELOG.md | 3 +- .../_types/mapping/KnnVectorMethod.java | 10 + .../_types/mapping/KnnVectorProperty.java | 7 + .../opensearch/_types/query_dsl/KnnQuery.java | 202 ++++++++++++++++++ .../opensearch/_types/query_dsl/Query.java | 30 +++ .../_types/query_dsl/QueryBuilders.java | 7 + .../opensearch/indices/IndexSettings.java | 2 +- .../opensearch/integTest/AbstractKnnIT.java | 107 ++++++++++ .../integTest/httpclient5/KnnIT.java | 14 ++ .../integTest/restclient/KnnIT.java | 24 +++ 10 files changed, 404 insertions(+), 2 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/KnnQuery.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java create mode 100644 java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 45aab40dc8..d4b9acfd1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added -- Add support for knn_vector field type ([#529](https://github.com/opensearch-project/opensearch-java/pull/524)) +- Add support for knn_vector field type ([#524](https://github.com/opensearch-project/opensearch-java/pull/524)) - Add translog option object and missing translog sync interval option in index settings ([#518](https://github.com/opensearch-project/opensearch-java/pull/518)) - Adds the option to set slices=auto for UpdateByQueryRequest, DeleteByQueryRequest and ReindexRequest ([#538](https://github.com/opensearch-project/opensearch-java/pull/538)) +- Add support for approximate k-NN queries ([#548](https://github.com/opensearch-project/opensearch-java/pull/548)) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 2.2 to 2.4 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java index af27ae1c80..5bf4786523 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorMethod.java @@ -78,6 +78,14 @@ public final Builder parameters(@Nullable Map map) { return this; } + /** + * API name: {@code parameters} + */ + public final Builder parameters(String key, JsonData value) { + this.parameters = _mapPut(this.parameters, key, value); + return this; + } + /** * Builds a {@link KnnVectorMethod}. * @@ -194,10 +202,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (this.parameters != null) { generator.writeKey("parameters"); + generator.writeStartObject(); for (Map.Entry item0 : this.parameters.entrySet()) { generator.writeKey(item0.getKey()); item0.getValue().serialize(generator, mapper); } + generator.writeEnd(); } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java index 16a9ca6d3b..0f931e7ffe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java @@ -65,6 +65,13 @@ public final Builder method(@Nullable KnnVectorMethod value) { return this; } + /** + * API name: {@code method} + */ + public final Builder method(Function> fn) { + return this.method(fn.apply(new KnnVectorMethod.Builder()).build()); + } + /** * Builds a {@link KnnVectorProperty}. * diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/KnnQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/KnnQuery.java new file mode 100644 index 0000000000..91beeec75b --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/KnnQuery.java @@ -0,0 +1,202 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch._types.query_dsl; + +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; + +@JsonpDeserializable +public class KnnQuery extends QueryBase implements QueryVariant { + private final String field; + private final float[] vector; + private final int k; + @Nullable + private final Query filter; + + private KnnQuery(Builder builder) { + super(builder); + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.vector = ApiTypeHelper.requireNonNull(builder.vector, this, "vector"); + this.k = ApiTypeHelper.requireNonNull(builder.k, this, "k"); + this.filter = builder.filter; + } + + public static KnnQuery of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Query variant kind. + * @return The query variant kind. + */ + @Override + public Query.Kind _queryKind() { + return Query.Kind.Knn; + } + + /** + * Required - The target field. + * @return The target field. + */ + public final String field() { + return this.field; + } + + /** + * Required - The vector to search for. + * @return The vector to search for. + */ + public final float[] vector() { + return this.vector; + } + + /** + * Required - The number of neighbors the search of each graph will return. + * @return The number of neighbors to return. + */ + public final int k() { + return this.k; + } + + /** + * Optional - A query to filter the results of the query. + * @return The filter query. + */ + @Nullable + public final Query filter() { + return this.filter; + } + + @Override + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + // TODO: Implement the rest of the serialization. + + generator.writeKey("vector"); + generator.writeStartArray(); + for (float value : this.vector) { + generator.write(value); + } + generator.writeEnd(); + + generator.write("k", this.k); + + if (this.filter != null) { + generator.writeKey("filter"); + this.filter.serialize(generator, mapper); + } + + generator.writeEnd(); + } + + /** + * Builder for {@link KnnQuery}. + */ + public static class Builder extends QueryBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String field; + @Nullable + private float[] vector; + @Nullable + private Integer k; + @Nullable + private Query filter; + + /** + * Required - The target field. + * @param field The target field. + * @return This builder. + */ + public Builder field(@Nullable String field) { + this.field = field; + return this; + } + + /** + * Required - The vector to search for. + * + * @param vector The vector to search for. + * @return This builder. + */ + public Builder vector(@Nullable float[] vector) { + this.vector = vector; + return this; + } + + /** + * Required - The number of neighbors the search of each graph will return. + * + * @param k The number of neighbors to return. + * @return This builder. + */ + public Builder k(@Nullable Integer k) { + this.k = k; + return this; + } + + /** + * Optional - A query to filter the results of the knn query. + * + * @param filter The filter query. + * @return This builder. + */ + public Builder filter(@Nullable Query filter) { + this.filter = filter; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link KnnQuery}. + * + * @return The built {@link KnnQuery}. + */ + @Override + public KnnQuery build() { + _checkSingleUse(); + + return new KnnQuery(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, KnnQuery::setupKnnQueryDeserializer); + + protected static void setupKnnQueryDeserializer(ObjectDeserializer op) { + setupQueryBaseDeserializer(op); + op.add((b, v) -> { + float[] vector = new float[v.size()]; + int i = 0; + for (Float value : v) { + vector[i++] = value; + } + b.vector(vector); + }, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.floatDeserializer()), "vector"); + op.add(Builder::k, JsonpDeserializer.integerDeserializer(), "k"); + op.add(Builder::filter, Query._DESERIALIZER, "filter"); + + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + } +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java index 6a22bafbfc..d62b8ede42 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java @@ -103,6 +103,8 @@ public enum Kind implements JsonEnum { Intervals("intervals"), + Knn("knn"), + Match("match"), MatchAll("match_all"), @@ -535,6 +537,23 @@ public IntervalsQuery intervals() { return TaggedUnionUtils.get(this, Kind.Intervals); } + /** + * Is this variant instance of kind {@code knn}? + */ + public boolean isKnn() { + return _kind == Kind.Knn; + } + + /** + * Get the {@code knn} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code knn} kind. + */ + public KnnQuery knn() { + return TaggedUnionUtils.get(this, Kind.Knn); + } + /** * Is this variant instance of kind {@code match}? */ @@ -1340,6 +1359,16 @@ public ObjectBuilder intervals(Function knn(KnnQuery v) { + this._kind = Kind.Knn; + this._value = v; + return this; + } + + public ObjectBuilder knn(Function> fn) { + return this.knn(fn.apply(new KnnQuery.Builder()).build()); + } + public ObjectBuilder match(MatchQuery v) { this._kind = Kind.Match; this._value = v; @@ -1728,6 +1757,7 @@ protected static void setupQueryDeserializer(ObjectDeserializer op) { op.add(Builder::hasParent, HasParentQuery._DESERIALIZER, "has_parent"); op.add(Builder::ids, IdsQuery._DESERIALIZER, "ids"); op.add(Builder::intervals, IntervalsQuery._DESERIALIZER, "intervals"); + op.add(Builder::knn, KnnQuery._DESERIALIZER, "knn"); op.add(Builder::match, MatchQuery._DESERIALIZER, "match"); op.add(Builder::matchAll, MatchAllQuery._DESERIALIZER, "match_all"); op.add(Builder::matchBoolPrefix, MatchBoolPrefixQuery._DESERIALIZER, "match_bool_prefix"); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java index d24d067cf6..d591b343c4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java @@ -182,6 +182,13 @@ public static IntervalsQuery.Builder intervals() { return new IntervalsQuery.Builder(); } + /** + * Creates a builder for the {@link KnnQuery knn} {@code Query} variant. + */ + public static KnnQuery.Builder knn() { + return new KnnQuery.Builder(); + } + /** * Creates a builder for the {@link MatchQuery match} {@code Query} variant. */ diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java index e0ec17254a..14f6697f55 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java @@ -1066,7 +1066,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } if (this.knnAlgoParamEfSearch != null) { - generator.writeKey("knn.algo_param_ef_search"); + generator.writeKey("knn.algo_param.ef_search"); generator.write(this.knnAlgoParamEfSearch); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java new file mode 100644 index 0000000000..ae3f6bee5d --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java @@ -0,0 +1,107 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Objects; +import java.util.stream.Collectors; +import org.junit.Test; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch.core.bulk.BulkOperation; + +public abstract class AbstractKnnIT extends OpenSearchJavaClientTestCase { + @Test + public void testCanIndexAndSearchKnn() throws Exception { + assumeKnnInstalled(); + + final String indexName = "knn-index-and-search"; + + var createIndexResponse = javaClient() + .indices() + .create(c -> c + .index(indexName) + .settings(s -> s + .knn(true) + .knnAlgoParamEfSearch(100)) + .mappings(m -> m + .properties("vector", p -> p + .knnVector(k -> k + .dimension(4) + .method(km -> km + .name("hnsw") + .spaceType("l2") + .engine("nmslib") + .parameters("ef_construction", JsonData.of(256)) + .parameters("m", JsonData.of(16))))))); + + assertEquals(true, createIndexResponse.acknowledged()); + + var docs = new Doc[] { + new Doc(new float[] { 1.5f, 5.5f, 4.5f, 6.4f }, 10.3f), + new Doc(new float[] { 2.5f, 3.5f, 5.6f, 6.7f }, 5.5f), + new Doc(new float[] { 4.5f, 5.5f, 6.7f, 3.7f }, 4.4f), + new Doc(new float[] { 1.5f, 5.5f, 4.5f, 6.4f }, 8.9f) + }; + var bulkOps = Arrays.stream(docs) + .map(d -> BulkOperation.of(o -> o.index(i -> i.document(d)))) + .collect(Collectors.toList()); + + var bulkResponse = javaClient() + .bulk(b -> b + .index(indexName) + .refresh(Refresh.WaitFor) + .operations(bulkOps)); + + assertFalse(bulkResponse.errors()); + + var searchResponse = javaClient() + .search(s -> s + .index(indexName) + .size(2) + .query(q -> q + .knn(k -> k + .field("vector") + .vector(new float[] { 2.0f, 3.0f, 5.0f, 6.0f }) + .k(2))), + Doc.class); + + var hits = searchResponse.hits().hits(); + + assertEquals(2, hits.size()); + assertEquals(5.5f, hits.get(0).source().price, 0.01f); + assertEquals(10.3f, hits.get(1).source().price, 0.01f); + } + + private void assumeKnnInstalled() throws IOException { + var plugins = javaClient().cat().plugins(); + + var knnInstalled = plugins + .valueBody() + .stream() + .anyMatch(p -> Objects.equals(p.component(), "opensearch-knn")); + + assumeTrue("KNN plugin is not installed", knnInstalled); + } + + private static class Doc { + public float[] vector; + public float price; + + Doc() { + + } + + Doc(float[] vector, float price) { + this.vector = vector; + this.price = price; + } + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java new file mode 100644 index 0000000000..a709f7c2a4 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.httpclient5; + +import org.opensearch.client.opensearch.integTest.AbstractKnnIT; + +public class KnnIT extends AbstractKnnIT implements HttpClient5TransportSupport { +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java new file mode 100644 index 0000000000..175c0b37a6 --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java @@ -0,0 +1,24 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.opensearch.integTest.restclient; + +import java.io.IOException; +import org.apache.http.HttpHost; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.integTest.AbstractKnnIT; +import org.opensearch.client.transport.OpenSearchTransport; +import org.opensearch.client.transport.rest_client.RestClientTransport; +import org.opensearch.common.settings.Settings; + +public class KnnIT extends AbstractKnnIT { + @Override + public OpenSearchTransport buildTransport(Settings settings, HttpHost[] hosts) throws IOException { + return new RestClientTransport(buildClient(settings, hosts), new JacksonJsonpMapper()); + } +} From 15018fdfdac78844803f3f2c27e5901cfcb74ae8 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 5 Jul 2023 14:13:41 -0700 Subject: [PATCH 067/123] Bumping client version to 2.7.0 post 2.6.0 release (#562) * Bumping client version to 2.7.0 post 2.6.0 release Signed-off-by: Vacha Shah * Fixing a changelog line Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah --- CHANGELOG.md | 22 +++++++++++++++++++--- COMPATIBILITY.md | 1 + gradle.properties | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4b9acfd1a..f7c78b48e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,21 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added + +### Dependencies + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + +## [2.6.0] - 07/05/2023 +### Added - Add support for knn_vector field type ([#524](https://github.com/opensearch-project/opensearch-java/pull/524)) - Add translog option object and missing translog sync interval option in index settings ([#518](https://github.com/opensearch-project/opensearch-java/pull/518)) - Adds the option to set slices=auto for UpdateByQueryRequest, DeleteByQueryRequest and ReindexRequest ([#538](https://github.com/opensearch-project/opensearch-java/pull/538)) @@ -23,6 +38,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fixed Suggesters for Completion, Term, and Phrase and refactored the Suggestion class ([#477](https://github.com/opensearch-project/opensearch-java/pull/477)) +- Fix highlight max_analyzer_offset field name to match with the one introduced in OpenSearch 2.2.0 ([#555](https://github.com/opensearch-project/opensearch-java/pull/555)) ### Security @@ -134,12 +150,12 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix missing cause message in missing permission to call Fine Grained Access Control Amazon OpenSearch domain ([#473](https://github.com/opensearch-project/opensearch-java/issues/473)) - Fix catching JsonParsingException ([#494](https://github.com/opensearch-project/opensearch-java/issues/494)) - Fix StoryStats numeric value out of range of int ([#489](https://github.com/opensearch-project/opensearch-java/pull/489)) -- Fix highlight max_analyzer_offset field name to match with the one introduced in OpenSearch 2.2.0 ([#555](https://github.com/opensearch-project/opensearch-java/pull/555)) -- + ### Security -[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/v2.5.0...2.x +[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/v2.6.0...2.x +[2.6.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.5.0...v2.6.0 [2.5.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.4.0...v2.5.0 [2.4.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.3.0...v2.4.0 [2.3.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.2.0...v2.3.0 diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 77ba8b8f43..0a1ec94bc8 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -14,6 +14,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | 2.3.0 | 1.3.9-2.7.0 | | 2.4.0 | 1.3.9-2.7.0 | | 2.5.0 | 1.3.9-2.7.0 | +| 2.6.0 | 1.3.9-2.7.0 | ## Upgrading diff --git a/gradle.properties b/gradle.properties index e5508d890e..571b2a3a96 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -systemProp.version = 2.6.0 +systemProp.version = 2.7.0 From 22627f404fc07dfcbf8ad96871377ab1c71991fd Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 17:53:34 -0400 Subject: [PATCH 068/123] Bump org.ajoberstar.grgit:grgit-gradle from 5.0.0 to 5.2.0 (#458) (#563) * Bump org.ajoberstar.grgit:grgit-gradle from 5.0.0 to 5.2.0 Bumps [org.ajoberstar.grgit:grgit-gradle](https://github.com/ajoberstar/grgit) from 5.0.0 to 5.2.0. - [Release notes](https://github.com/ajoberstar/grgit/releases) - [Commits](https://github.com/ajoberstar/grgit/compare/5.0.0...5.2.0) --- updated-dependencies: - dependency-name: org.ajoberstar.grgit:grgit-gradle dependency-type: direct:production update-type: version-update:semver-minor ... * Update changelog --------- (cherry picked from commit de3379f62edd20049ff131d109b96134b4daf2d8) Signed-off-by: dependabot[bot] Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 4 ++++ buildSrc/build.gradle.kts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c78b48e0..6906a80fd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [Unreleased] +### Dependencies +- Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 + ## [Unreleased] ### Added diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 81e081c058..be0dd199c3 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -31,7 +31,7 @@ */ dependencies { - implementation("org.ajoberstar.grgit:grgit-gradle:5.0.0") + implementation("org.ajoberstar.grgit:grgit-gradle:5.2.0") } repositories { From 23de3e616597c6db6605f53f6bcacac0bd9841b0 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 18:55:23 -0400 Subject: [PATCH 069/123] Update jenkins file to use updated docker image (#571) (#572) (cherry picked from commit e819e3e56474441137915353fcae8e0ef4e4b416) Signed-off-by: Sayali Gaikawad Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- jenkins/release.jenkinsFile | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins/release.jenkinsFile b/jenkins/release.jenkinsFile index d8289b3866..66c3b992ce 100644 --- a/jenkins/release.jenkinsFile +++ b/jenkins/release.jenkinsFile @@ -4,6 +4,7 @@ lib = library(identifier: 'jenkins@1.5.3', retriever: modernSCM([ ])) standardReleasePipelineWithGenericTrigger( + overrideDockerImage: 'opensearchstaging/ci-runner:release-centos7-clients-v4', tokenIdCredential: 'jenkins-opensearch-java-generic-webhook-token', causeString: 'A tag was cut on opensearch-project/opensearch-java repository causing this workflow to run', downloadReleaseAsset: true, From 960483fe59aedf2f7829ffd6ad6f0a9b5b047c85 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Mon, 10 Jul 2023 13:56:15 -0400 Subject: [PATCH 070/123] Update Gradle to 8.2.1 (#570) (#577) Signed-off-by: Andriy Redko --- gradle/wrapper/gradle-wrapper.jar | Bin 61608 -> 63375 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 5 ++++- java-client/build.gradle.kts | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7710deaf9f98673a68957ea02138b60d0a..033e24c4cdf41af1ab109bc7f253b2b887023340 100644 GIT binary patch delta 21856 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 delta 20086 zcmV)LK)Jte0)X>cxMY+-YAg;Yy- z(?%5jCbA>NR(J?f!lS7g9!V6CS|EiaGzCIvX-#;TgeIhmi8DAuWyzJsr0J%c{)zYx zbi<-_VRG72y6=zb=^fbw7tBG6nYoX--*+FQfByaBC4lqzu7Es(0*>Po6Q5c*Z{k7$ z7co_UfzN;R>5_%ZdY`s1qy1(rT+#C9T9~u&g@vnHzGmUNg?S4%EG!go6JHMCE8Nni zuPuCIqQuaDMMhH1F&N_$%M7{sctbGkFUd$OHfrl4dBE30(m18K!oy{rNG*4iIkhQM zhS5@-RD){5H$o9KlnetIDUn1x3|3{m9LoAE!-0R4KNch|L@L={z`x34CZ{91~QL*I2j0P*iz% zEvbJtY9dk#KUPG&9ei}`bUNnB)Qw{0a#wS9f0A`qXx6Sy*{8C-j&x`J2{ANr+r}d9 zXt=vJ?%^y03vArixNOaammOwol<~mEq_+3@6v^%iNTSzl& z%5;Ct9~vU6h-?Hb5p8ttbW`6>m8dZkt3usP z;<`vQLfaurJbMr{1bs{8z0vG45aFVVOYxRS=6TvR?cF{-^2EpVi1W~29!$>^ts{RV z1++7*^~NIu?Is-08Ej$S4hDaBv400G&Gb- zD2P^_CAm$uU3PJ^f&LAB@To6-(I=-bzH~-}>P-8lGyQA)^`bL&JogfQbP6~flgYU^ z_uO;7@4M&h-Dl5#d;;Jte4!(W_gc_~F=57q$?0UyhjBs2MZ6zD3YWynWgS;A5y2#; ze>CJZe4rzW4?~xhAU`?^m=@-$h8YdlG|V!DY`0qF9z$2r^{UybXI5;UUH8n@Rqkbr z(wSojSGdiqrq3D99<*`NU3YBPtX%ips>kc~qE+{~BSVj`dVI}t8};2i+$(d(XJ7@w zKW{mff05y8`UnEA1Uaz45S(x;#I?0(e>wbGV`Z6p^X9TmD~Y08Hthw|v&8@AV$iQy zb%vfve#>mw{$ZIJjDkbsgl*RAoB}Q!#q0EcWTT@=Rhqt%Z~Be;M9p-nyu#3yF5WiR z%&f!x?2WlXZhBg1(#%RlBw&cW=w^tPU5AqTMebDn8lCJkgT9koWQ-C*`Ob{Ff7(=> z5?q~~QkYd}-_iQsK`%gq*Mr|y>ds&BatvFM>z;48E@gOU~%>OAymp@(X_x(p-DMv`dMUS5fR+2Br@ z=LYsUF3a7bF>)`^EBT(~RH^aSOuNBnZ&Bsbh5dos8z?AwP%`3}o;Vbze`7zj`I_gh zONWpa+jGpAqA8RW^RDQjLP7M9vSLx$x{f$A^wMpZ1o4G}gyA$8Bu&lrYS0AnmD*=2|`q3yC8#~VmX zcHDZ*Wp@ zPN`eaiFUmIF(LshW>PAh;zP8Kt3M&S)TwSF_VkeiAH^7qri|AR23Qy|)`D)PV}wO8 z%34W66gd{d6pKqK=ZIX4$Y)8YiX6SyM)0OAOnz5hUW#IJCPXPxR2a(W6%9s&bkPmb z)HO${M07G~P$P%wS5Z%|r+?afYl@p^B(xv}&Q`57HeQDz)J=?s5> z83$0u5B>o^_=(}{ZQ4oFPKup$_nh75oIU3`XZJpO{?pF@PNQVtC`O|+oHo#hca?f3 ziudrol0Go-A1*+37j7)an_5s8pnvn{+oE+ZCm80-m!R%RkRBnCgg3FENA* zZb>rq6fH+i*S=hn-hx=OX(dr~O<^wy&r*70F|0zMy;;w_w>f`N^Vg;0Tc+?`kAYux z9O)HoQLReCxemk0RJwRqd@XX0^mF@z$V056{O)Y4 zBmx^-IOW{D?^#ZnKoJ7@uIbtg(Ez_#l@xz$-WTQk z7!J+O&D>aKIQ6oAo1!GD7w3w!)EpJ95Q;bJ4BhIY>^5=l4!*U`k9S~+>Mu-FR;$U; zJT++cfOlfsea*M*9NiD~!YG78ZbnjjkKP+iqxIC?^WB}MinTbUs!>uzT(iTOwY$>v zTO2l)hy#D$EvyS~!t=x?JxrY3z9{wdQOmi($NBBD&`UVzB zU3KWi%=ge9Ao38=6L;_zO#F=s{t1%FP{6C` z#oJ^RBJ?f1LlPsKaimC6gwz_Trs@9(wC6B&^lbnB1CN6^9BMEyNd_UsS7vAnY=8a+ zw-G`Or%D>8YOp{WK{lvDF0jnwO(^dns@xdaX%sH~#Um76AEqz%zW`860|XQR00;;G z002P%hp<%o-4Xx*fGGd~A(LTw9+TdJ41c-*zRYrOCO07&ATWq9DogeVB47eh5)uex z!At@MRJAZA(tJ;8+v7YT?1ck(nb6pNumVXucu zdAeB45W`GCpj72q;?!)FeG1R<&^$iL!*ls$4;|-uVwf+`{9-u8Lv4Jj!lx;`z(b39 zp@$anA`iX8i^X=C7|Koi>74QmP>7h6IES2j#T+ge-q16JiTHywT&-PFwJ5)YLeAkGfQROD_U8{1l_!fv8 zTNGX=*j+D%RxxZ4!$vW*iJ@H#9SV0Uyh-JAJ=DW3LVzxn10EXYZk2mf-hZs}76Cm^ zXtdWu{k&D>Z65k1pRe)-3STHd+f}|uWnH0{6yD+CKJHi95O)kHJgD%H%0ZQPs=Q0( zkjle?$FQItQF%n=i&c)Q98=j;Ij-_DbuOxus+K=H{+I zYi9@0+IH%@_1cgg9;^+R(O`J6o~f`Y5{{XA*xam#;)cqXFfCZy+_I*pt$TY%bN80c zu8rHfTicsEd%Cx`x3;yl2AZ2XJJtr6xYa?lxR|M+v8Sb_xodl%b$@F!KxM>Kw5h9e zT~~7;u)S$L_;3g-Gr2>N!9l_BNo|qnVC`U3?++QZd!qWth!L%Albc{k!MZ~qHV_S% zZ8oB@U?j{`JTgh}>Rk7HoStxVacm#v!`K0$85G)`W+^3Z21B*&`UsHn1Hr+tZpNcv z;LPmZRg*P18Pb3|ihsg}xhE3c)g2r*B5@OzKs;T=Y_Ti+2fgoz`4dT6sA4T`l5becm!NP6;A$^y?#|6k5p1#7eVBH`UoZeWt8 z7nfxyGrdt?KFI`u--wyPuzhz?_E`jT^WHvVL~P=4agt_h*fgSH zJ%j`Cm=RqwXxNnsalIoxFd(Wx-nK>%4#$VP48df988P)xn-Lx~hca$5`ja5ufYg~R zCQXsJAb~6iU4XCInQXVAIEE4DUEh@O((4n+EP8Gojo;Zw{5&ml8@X-dG(xH%Fx zp?O0e#&%vXoJwifZ4GB`DlvV)=!u3V=&!9_;VTrrQsGZ2e3imiD|}4~Imk3`f?>)h zD*xmxKww|k)c0ob92eJ=!g`H*EZ8^E6UuWMezKB;3wZicYdDXvT5EV9g0^Od9y69N zYYz9x;(xWMEJtn2)u9v*8m4t9+HROb5tw*R242({2!UFywFi97kjP0~#ac$Q`yV@h zL(KwqW@ofnkA{K*Yi0&kriLWqiVQ@z^eRkdWt@;*TbtZ~$*yH8LCNWhhji2ENonHL z+}6q#TWT&W+aPrWm!h43G~TT1WH>O*D9d?+M}NRJ8{vM@4i;DoyO%0SZ>3=FNX+WG z@*}ZK;F@UPkZ8sF`VcM)mYjY%Q%%nNmg*%YSM7A3->mU1e5=Nv;oF#| z=YJ^Y8sE;hY5ZCGP~$tq>`wk18qq1l(CAkBj7GQ7wHn<{FlGG|$O}H9Ne9FHd5u0x zcW87s-JsF4bO=5*WSS#2BO><-b837S-;LZPps_R<`kspNNpGc$DNmbhOSh`*@uqx_gg@6vl3 z{f0h-jRnKi(l0gs5+Bg`%ls9Mzbb~u`3a4m)Y15eY4q0!>W36gXgtb?H9o@6F_FS!8b8l)j2DD<=YK+~Mt|f^ zjGD%HFeGETBuN=S|3EY{?AQ23J}QQn5QY8$9Xjc+^PAS4{xY%i4dl_`Sh?Wso5(|% zF|P5qgy(%*3@-~6922uw#PBKxocIpBaf%#`q?cy43pERbGd8EUNQV4o#6O}(V}@VQ zq+ijm(M3yl()cz0F4O)kYq~mGJAc;sdtySe_1)c@{4(SFvs1o5f+pUthoSVC(T4`X zpU&!nNV2N>amc?;dZxc0z8($khzpz=|E7?Ed@qj0f>5bHo+22iLHG-Dk!bJ|yTG_D zCNz4Vey;KN`1=~a&Tk<33!!U7DAzQ~@}co@eiMF{E(!>k3Hev!xA<+_e}6O2E=Zjy zvWh}?#4@{0C$lst{Eo&y;2%PNJ>4zUD>eQR|2PXTd31V?dcouu(7iQ#heI_xg5my} zwYsUBcycsZ&m-w$Be=k{SZhRMB%V4KWcpnWy~g}|g67Z^b_>S*;fU#v#YaXWAk*&$ zY#;Kjf5YZ>=-q2&ks3RTSbyoIG#j|dt~SD@f1>fbBCcimsM&276U|=PMPiz@98N=& zNUX-HT^`J`z`86aCoPQCE{yrh7RKu3f8`ldjo;&+B0J?sdaY|yz39nP<-{fE)=+T@ zvkC#EPp?~H0_ztgGjcuBlHqG-za-X#ZVsx;-3VnSv~UJ`W=?3!a(|ufp=e}}^&Fj< zvz^HHJ^8wZfCz(3re~LB*50gVuqq$b0R#O)Nfs7B^;xQtIBGDZpwcY#q~b)gI;6)s zjJ>9ODQrax9hQsib|lqlxxwp313s>rsjyQ4v)g&ci0GPEmQ6l78Itq{_x~!0!R{YJ%P=84F!%Ms}a4j6bOuiH0 z)UCKXDqoeZvTcoGS)3KJa;p&aQRqCm&h~!`Dk3ZxYfX1B2=iPIAV^X9N4P3(Nmk+j z>PtMgp4E zx!J8${RI3RL4Pz6e=e*!#dgKiu98ZmQknTMYoKq)5T!`Le0?NlTC+_kkM>L#))uMg z+_)i%Z~>+*QGIY&zOF`2$Tf5PI`sc`OmOW+c<7kKk`P zCIw6{k=9XJeS`{`5>$lAG^SVZzC1vhwE*-86+39lf$>)=58_Uz#M-B_U^*oT?K2nEwfiu`L($7LE*CG{Nj^r7R5=dQP(of6GfbfFtDqmZJzSbV*4y8~;wo=d#&)TC(+w&DLvx zE8=hE6{F;>s60f|E2)aXgEzOee>-c$=4%tCq;IzOguXvW&d(sh_n+Go|k*kyC>KIKMqj|j*JWBHqlYc)g zR*_`kT$)P(Dx)6BzD2OyX8&>NlzDRtNO`f$7oUS z7%lDv;j&RG@9?=3R8i-wsPrKLRDZ&JRdtHb>8r<+rf3a0Z<SMI6Izi_gpzb?`_3A zK^uI^C~Z7iH!b&tin!1>?da3ce-Rz04`_|}@_cCf13pE5EqAyVeok~D^nMY1O$SyV z&7%Qik|C->jaf=Nk(G8KdVfRk_hIUWrMA%s?VyX{g;8L|Xg8U3CB;!|_QJFGAr3F4 zC+RYH>*e%q`V{Ezr=OrQy^qTDx4`-ZD$)mZHGN3efRp`PLDz9DUC+ztMqWub@hZBR z&qieu9&|T6Ma0#Mh!_Qw<8%}`Rt4n?=^Kccd~gz`Z(`;FKfCB#pnq5Zu7>Dk%nBjL zcMuD&z{ftMT6z^LMfg?HBQdi*5;Myq^SA-|I;~-V2P>Diq3LRJIO@-c4=xv4Gk(qOd*ojCVM<`5%#S-hZ(s3}a%m4;LrYe=QB2Kp%+ zBoC)o($8di7koomzoP3)HqfK^L`GdG!SC@b)=gp#B6I z9aY`|u^x0{-GA%w4g~QBeE8_8W%SRo`J9I&^+C#aP<20|2CM7B=5LU1d+>q$z`2Wt}jWgU2=VCYVG!3R;)@#!N!b0ufU%f=!Lrldfh%( zpjYv^1HEcxptsmvg+Zwf9Hz?;rkVgNnqG%=Z+~EZ9QJqTy2IAU zG)Vq0(!%qQ-2YW-q#6b2-=s!X(`Nd2*(|lA75fj&T)1aB{U>JbVwL`j{@XTeExsZm zr9^3l+!DAjqs?*AZzbV8`X4#|FDeuv1v%lu_=ihN@dmgGEmT-0#rpfr>?XULB_-zb$$RtO``y3q@AuxG`|m>!16YNB&Or+-9)D6i zyqE`@hcpk4j8kR^xOcU4BPP=Xk z%+IfEy+7mVmbu3^CYemliSFs{Ag0ThEM}R9^+d*2nNDC?r)4Li30sXDT7PudR#Pd> zj`n(UTOld&hfCG;45+KttnJAp1!_EHhH56FJw#w8h#}|<=;@^^1s0dn(qX0@)i9WD zqi*WXW`R2*GZ7XCq1-C(>m@ri-Rfm~1^jJRoT5IjQ#ZA)OtN3IcdPxJhnh}K%U;#i zd7azzvzG!&hiQ^{LrteOT7Ofc9F2{0GwTCp@Bd;lZhtHe$7bTK>T%TA z&<-`_vPk%pgi{h8AZsU0PfIv0aCttMZboj~!uo0US zZ06y4xIw`dY*o;Pc7FxiktJD$suYZ2m%zeOh;Gg3MqINMjN^=ghj5ni+GGtW_zbVN zo}+28~CP#M-+Suk1F^!CM0}E!FTaJ zfk0DAwH*cD#}CM;JOD^{JuCd7gdZvRF?0O{Kb7z^1wY3x6n~t@FBSX>k16;yexu;G ztp9gN5N6snLvxs&@JA81>|-S8ar|Dw9~Ar%Pbl~k{;c3H_$v{Y0VW};&B_?@ded_1 zGv=*&s-6m{-mz#BO#-2AO-);7D@pwuJN$S2L&1}n5U87qUU$ZH^rSW^lw(CM?BpOX zo~c+#dnslFu78{nGy>OMVu|LHo@-sywu{Swn$FZlhoe#Bvg~}6T#E{#RCjTugxZ*` zsg7H_0xe}bZP^|sj-rS!*ta#QZWk2uUek8HDEr<&Z)N4#v5mP%;;lQ9pHGNqkrBv30tQ zBgGGdWq+k_qr6+IpEaQ6bKGeq5-wPaz@58bW&(HkqQWQ>hLxByZ4H~YarUNlNbXr07Ay{3_Pa%Nj&AFK# zMD9#)B6p@|kvr47iGCyc=zlw&Puv~!wI3CbXuh^#`6xugicwTFG>*d85cZG4-w+Or zB7e{j4vr$&Fb3%XqO8CRXbciRNYe{xtff7YfKGG)?iXvK2L(R~=#2FEh7e#q6*XrO z>T7rq6v}z*HTOdDpMQYgw~5yNaV+XuJc6MaO;|i>LaRUQ&xsP_ zxH3mta}^OZW^pwUWl`@PK8MAJ{b#Vmhp^w1c1>^I;&Ci(bx)rw&>9E_&fr>s5p3eG z>jXV7L#@FQB@t2*4w9RmH91A$;5e4`o_J;=CpnNsLl(FVq-P-uuUY9WeYs_Gk-`GDRcsL{ynd1(9LU?@qj)T*gs^jNN|w0R(s%7RR#QIK zu#Ppi?x0Hb;TIgO+bi)A}Lbzqu%dg>uxNeaSI}Z-xfk|C*ik;Ftv|R+fQgp z(9SS+;5gyyc0$-m+=SEU#-l{_7=L!t6Sx;oVV_utKCvGA#a0{;+i;6Gh(jU?jWnsk zM!&cpF>wxY@d!Pw&tpJ54qZHnLGdpPiDzI`1Yo)NJ`9;OE+Q?v3C$-7^?Rt&{3L%l z_R?37q#Yog`v~KN@LU~4#1rVFQ-NV|AJy3b;yo_z!Oc{iK0GDra0?ESlz;PB?Me>d zMZ~2Ly?1tqqM_1GGvo`{Cm|%E`)SOrx&dnKlFP7000@2PpCG3T~8B16o%hvw_Up3LapEU zRi#K<3R?=A5XBfth$clZYMS8Punc8kX~}M@{v&U=&_trq#7i&yQN}Z~+Yd?&G)>RU z*`4<}@7bB%KYxGx0#LzY1922(m`_kB$*>^PMIB{1E*VImqGOrCXn1_b6)#(df?=|{ z&);*)X;~Y8jw_zfg^oXq6tWVlZDd{Wf>q^*v!9 zsI)1(b(j0T@EO+fXVryj%WGJH3G0K$kB)?Ag_PVNjp}IYtsN>dRdt%;b?0zfcyIZ( zt6a5g?$){I$UMBLA9hXae#f>cVOY(d?r@yy@uyCI(`i3rm>GhMXsS+T+j|aG9H)Ze z_;ukqyN=jlh~^9L7*e%1w+}Y?QP`BhRVTTna+#r&zc5^~A|K0rKt%#p#{di;jV@?e zg4V_cojyUyZdF0Bu(7L9UUtSa~E`E z;s$Pi%J7IG-S_rpdtcaXhUx!f)F#!Dr8g=;FJ1&0>40V#X@|xH<>U@@LMdB;Ml-

eqt8i5@4B6x;LXnLi6iyKWHxb!jNZ6t*O5+rjpD50s zKr5C`5dG4_WT*sK2^w2Kf-Pc_SqhmAWSGW(EkMmAoT-^?HbOso@?n`5G|GFa;#X+D zp=+O@MUUx1biiw6z-uZ5-=%*Hk>qohp1?h-8t|-;7bDxT+@*c1Q&e=Pt2Ad_Kv7LzWk4u4q*d{oudKPR)i$?(_$0fx;{ z31lVg%LJhz1PO+Kgr$MHyd*El$SiT@4J6Xqiq^fgt+g%I-L`bGt*9hms%W*iTWfc% z*jj5_>(*6mRlfhZZ)P${9s>S8NbY^_E@%CpbI-eZ{DXV%C!#t0uAg@DSZNBS87Iwn zX(r^O34cg4QC=tcse~tMJjF%)iwFGV=czJxk~Bd-pUkI7bE==Gagm>{=jqbS(74!7 zW4T1umug(*<8nXU%@rEY^wUJH^wT{&OGakP(;Ru4tMNQP1$nZc=ko$T)$l@jT_nw7 zX+p#3AXoW#iN>eN^in^4l9$Qg$9!BZ{c=Co@P7&)*UHRFk^Xd9xXMrCxz5L{r9VUC zdOt1XH5xbgX))MgaIG}!q&ZXQte35gKHeZB8#Ugf@n#=?+{aBau*FZyd8;&^@Y4%? zmd0mme2zSx>!&l=@Y8B;*0{w_YlZr1ZuPM#FKyC+6;n(DN$Zbf=txO5s;M>Rx@Hb;c=DNY;K<*vb|iGOBS zOC*&HZ#P$lBW86=iO}6O+3p z-fA+9tPjV`hE%lKOl&YPDISQo7?DjzA}sIeLATWrhUX?ba<+X9>HRGU)3D4H;iSd1 z*inPcb`OWPh1*jJ!wSb^RVB95!+-Hgv5B~%C3l{wtWMn7gF0!flnzONTtLndKltz9kA7$YJY1JSmteA z&gAMayD%PxZ`%~ZyeNWXicKJCwxkkatGjXy&wm_|T zvcVAG<+qvFlF zn%OMxQWCm_I5u36$(rMb3X)E*bDT*nDLb0z5}sey_&PwnCEnSclj)dd_FE=513D{Y zLltIsDKNSs;sU>+Tr+LftXWL$jz?wYT>bw{c6nX1q?s+voPH_hi4@KUc18+EF4;OO zLukGbT5{rqa)0Zv46OynrghA0m7%pzXjPmDtu6hV7s=)`k7M(RX6n4Ix&2%g3zw=B zMnY~l4oj1oJ?n(k#cqG2Iw8`rnqD_kmg)2qJ+0GU=~bN`pa*sO1HGivA$mlo&(ftj zT}+qg)Jywyx{AL7#wS$u%BHXCbOl|h(`9tI#$VHUH-BHR^Vj(Xjc=5fn{>XJZ_)Wy zz6CYthoF775W7w1+xZ(%Ay-2riN;mc6)2o^{w9A5nId;KCx}4-y7C_Ww$9(-@9O+L z{)*0b@b{6hoXZ%Ef1vXZ`A(hp@?ARL&G$&NPv;)KLFZn2k?GvimAt{+QX@E{C^;k8 z8aI={Sby9KqT;oTa4cxVy0I*Q<2f!laAvSJeO3ppc(4s8LD1~Nu^#CT&d#puo{1`@ zU%0i+=V4gq{d_>@d$~{NAMssGXB}0DH18x>#Dmd~CV|fP@%2w?2uJgnE6P*viq};Jd%73PCi^}4`c$?GKV4DHwww_!RD~dG% z+>UFaMt88o*lq@!O*0m>jA*A65y2f{t7B$SOnqG>qCu;}u+W&n8IIo$GlHFoI5t|{ zLFmyfyljY8q#-&pJr9EhrGg5ElTbS$)`QDiWlPXVK(uro1iBQv^!8v|A|8c(tVAj) zo`0~5xtXF^Ft)_nb7$Wz5(@7 zKfczdVpce6X6qOUx<^q}^k?7dM8fEn6s+@O^rFs>^AkEhDNj$qfpl16!rvT@rQ=u# zJdG;iXcgE1bZ5RQJS`p3I7%kh!uj)c{(mWA4OE`d`DgsB&OaBxk8`dJnF0=nw>_ux zFZh>2=vUJGdVo^d%2DUvh(+9DPl>YMW|j@C0Cj#&mQDTeB2eS!b^aZ{pz~qLo#Th* zn6wE>YvQR$tBM?y$%w&BogD1!FO-9A@kA&n`R7HAf3Nc%btIWvZeQRA0%{(mFC ztnr_8eue+6^I!O{nBHO6mpZ@7f7AIjejO#PV;QB>Tl|L3Z;B(|;=gAsJfwEg`5%(I z|Ecr8_+_2{E$*H?*codF6oV6T({b*U_~Ad|mbZ0!m;S5sJN#Xs@#u#D(~RS+hfscJ zrX{FRZ_YXKkNS-7mCLeTWt#LMAAi!hc*!j*b0}@-NW^#8pOGU5RyC;ghs4PMhviha zOkW({ zo%E6JW(o$0t-hh)jL_^~c~O>@adF4zWI?YNb5t|Yxi`b)3c@taNI0)MA0z=#h( ztFi{d3AhGa7};e56dVQxl?JgEXgJ&98lvPF*FI-TJv8_Wb>?nS=cAqV^`)Q719shTp zI~l$J)^)*?LoAl{vs2hFkH;;9fYG@I1zDqIBrNg3NGbd3jZ_T9L1MLmk*UtNJN;3T z)n`un+j7wI4E#*SQz6Y_hQ+0DP9!XiI#QUHvxqtCucG(#}UoO8^ z+E-em0l^_^gp(^WH7@LFv;tA59{c_gEJi_?8Y32up+=3^(u^y1xOh>~kQ7UcxVet% zzh%;P7-0+b2Mz-jn>m?$d`^NIcpE#x`I18Tjp?6C-k%uqyktP`} zXF*Mek!VDOm`K(t8r%_8Bot=BJdjSHIM-rT+vq!j2RIr4I3kJWj88mw3(Sg(ca~aZnJON1O2cZa)VZxYp4Mi zbw|U$X9vzElTN0cR6;}^3eczNGsJWe-tuS{70AT}o(tp_L-m)@<*L7eu0%fuYpJ~5Q)rozbCu04E9X-BGF=CWWc^p@tDxeCR$qgaT-aMmyXgjK zHVJy(NH<~CDKwdG#*>$B!EQHp-ikf=rnmLsyD{d&%yk75_ETU@A5Cm3>!nEzt_AMV zqv%JzkbkGpop&=$t_XN~Xz~Jgq5GyIZGTcyCX5pR z&2P~jn6eYk--e+z+5!-L2eab3>$0x7j=l>+BdkE>dvu4A{Zjfq{QxpI(CPF;P;rC% zQh&OW_JZDB*fWo`BOvS5Xs1TwHM(1)dsw4=gm12?D>drzeL$n}u2GQRqv;yeyi3Ce zxUv_Jv;*Y`XnI8cQh3nQP;r1}Fz_(8pxAvMl{C4^8~0P`ek!{YGv&xvH)E<|@RaKS z&CDY}RM5PiDj&h3S%VhI#Oynj4C0IFlz)%*TIl^{XnY+70n1WAvWmVAt#6>Ufa19T z;WbKMC1KWPZ3?EWo({mad7yGG-AjG2+3B$Sk1*?|`!KI7%gWsSm=oKLB-eWs)ac;E z_h=fdMC|Mkuc3!kVw5Kd(meI_6BW#Nsnp5;1HoK(AEHOn8XiF}k-NH& z79-X|l8mZ$(-L$`8ld&u3UT563xDhoEcDz)CrkLvu|w~)-K3WXv;(v>kL-{;Tt3*P z2SEQ`m>DSyj+g*9%!ct7(?Q5|AHwP3tV?IpXa#-^E9cRp^cWO?WLZU5r`_zsPH}Et z)}{8y{TLC2%gA*EsY}a*!$FN6#}C6qQw83x>;x7+p_1s6_ovM0Q&cU>PyO_oq+3Rnh9#psE{iHy=TF#gMX&b&jC&!IIRcm zUji*5I)i=%`W{gB(r>`Q4Z1p>o>O3dD2suIR4}6kM*4eRfxQr^@poCU*OJe71blrN zALFM+qvaaCpwVg#X@uURsTdO=xN{egEZT@An}-KM_Au13GvXO|lb9M)VC<*nyQrmy zTI2=dw{md5n{?ygrRm+665%$atVsq zeu_iAkXK$hkxwKh&IkG*@1q1lC)pJ6_L9|0sgPEx>WA$Ct(SI4Y;^6R;US-T3iuB0 zIr3F-?3OYjUw<9~`AE8M;Jl4ukShj6N}rDdei!;(sML04bJcp}9HReW_I>0koTf+? zMVv zaLQ}2&q9;2I6wB5=>&70$2D8vSbeM}PWAyPE!~aGsCi<6rb|xG9tM z?4AF?PH{~&X%HRprP15((;|(c!1WO@&kY5cv}ZJWhfpK*yhHi_r94$6WRHlAVD~Ql zH+@9hh%td_(P%eHxrQ>>c5>4K_t$Aed4($AF4%MAb%1dy5>HqEF{f%$E+j8cpwS$l z$vhe5$A1)>##3_+@uIB8MX>%4l*UB}(Kpp0ZWm218i8~9eN{-^rF74GPl}y=?@=N5 z3q8t5AHZ{VY}I0yoE}E1A-W*D2Ab+o_$((oF3CEk&#cS&VI{ARC10DAr zCrD=);BF&g9SkmT^})FK9C7V+q-1{_`LdLJpk&u6K3LbTQ+x;?N!=MI-U>b=cx0N- zKquxov-xl*3Y#2+@F>KlgE82d_EC&Md5CVT=P~#|5Tv{C!LSn_41SeG^bn^v~a4 zzX4zc_CgSbCjvYTz_TEX!iE5w0obC;=QLz#*cRXg%{w&g(vTA%FF=8SSko-q)T%9i zTQhV5qos4@vm)!NEgzMOn*<`A^4K%G!FR z)g&N%(Jovkx^jC*@x)8R{B)=_RikASAVmWHElt<#EP=sv=9qvlXVg#>E@`^D-)dG> z^H8Za93bOVX&fu2MxVV+pM9oT1TrOm!>r47Q(c^SIMm-B#|K#>>kOl@Z;hRdiXr?XSmvWM(xipsu|T}-ybFL!>Pdw=(K&-ah>`JVH7&ht6v zuXCRBKJQ`}>Tn1pD~mFFxV4m(i}|u9W0o8K^W0pc`*Kr-$O}>xH%HxQk!xd9Om#O{ z>L85MJa8(A`%UnNK7VhykK-*G!|$f}Tpp+v$=}zjUW7?1{Zo zcDhhJ3xTKhfmEx1Vk_d6ea(Pb!1a8ZOw6pYQ~I3<2AsUEZOTQ%2S4MTijA`xp6)!b zobF3ylF(1qI$ZqPJ`u^F@PspM(IB?bNh*#mBC(Y3S4gdnfrfPy7mEW*wQF!G4%uRN z0mj~KrxnGZqiZm<)OB)PE422(hqYvRt(YZfyNP*0U#1NZ(D@Zm7<9kmy`dbT8IDTHA1X;m^UD5>A{&9-fo`s<8v7v01x&i=PD14(7J?2)Oz!qDTnt@!scSlnz+8bAQg zu64qoLhuRV4RfgyZp8bXcUIsm!0(W73ZKUlc4<1jM;Kd_CUnRn0x)eFWZEJggZU}JukgeUej<&@&S@wr>nhFmocKl5OTSWt^iUkw_xlcP;O_<-xjYD6?Nz{snZ~ zQz*9x!TPMcW$UPQ>!_%9E9~M1=^h>OWb`oppmnBc=3oH9H#T(Av)bh+CKrM{@6>;r7WVMw;p7;NCfY@`JMlD^+MuWotk?)p#5MCAjPaqXlbOSQ74+2mQJV4Is#iHPDYs{zrNfAc zgsk&Wc}#DPlR>>;;{bcY*UkO*-=g%Q-k>snC`#;^DN0ao!OStQ&?BFE2vVcyFX-T& zABL}C09*F^+GI+PYwAf58zMJ7E0f7?;Os=Q<^7ZTdm&#%rd$cq+Z^+QClW|Uo8WMx zG4RxtrtilIFRWwIv2tGdZsP^nDeJ?dvLC7gFvw15j^%=*SN?Nm(+(d&u^RQ48jL%7 zq1zu#K&>S=!Xb6#OQK`&n8{_jNA3&NE1us{4p&PXflZbA4oP3tmr2}iD1pyR=|to5 zF?wi&w4vLzw;m+qz`46ugph9wHEe8?asmw)zB{88)%6YaExoM*-z0wI^ymX45C!#S zm{&WJ{Z6#82~~?2ZczG4xg+Bs(?gerNt=obds;wMGMZ!4{Fl)YHRhfvSvT}4@58>O z-&(`U;(PXd2!nbRUBqmnf~k1*?$Gg2?<>RiWp4VrEhsCgS49Ym7LmzrR4Dkao!i|) zl0Uw%a6Wy-d@zn5*s@}#(BA0IV?u^uLSIHW2z?Wh;c-SAd-|L5gNMTzKl=2a3HOoe?` z82K#d7doV`E~1_*3L<%u!XeBd!qv!`25D>AUZ}4i4{1`nkyd{uH05TgH~dL9dQ( z=^x$}QH0B-d^zL3VvqmgdD1<<`S}{~=cOv~w|K+qr6sA#lE_lz=L6+RVpC4!8;i?2{n@yJPsMzCBzD4L%h{Ou@Fp&oL5(B~z8b-Chmhpe z`?2Uup5eaU#_IV{1+}PkcS9{nwcH(ARL=;HnoV`xXNOq1lp)UQ;$HlH4i#g11OHFT zx?(U?>)Aunl9l*~PS}jt0K1WkQDA3>-^}=8ni6?p-bU>HW~hJ!(Q|vf<>4FnYVw=t z0Iyc>49my;dD|g9mtW#AtqmhL#*xlmVOh~pE468a3Ww}`rWf^TzxhApUVY4DRRw-o zGpHp~$7{3>4<-J$NJ*cv3dDme5JbYcOrgf0mnlx;K58$$EMZ5AZz1PS3^9@>D z$84GM2$D3dytG(8gr|TFv@gEmeHL9xU{BNZapi@5PI%5#@3k9%;Yqbu4ZFF_h8N56 zP(Yo5#7Mh79p%zGaA;?CkLf_nDhz;2;tQ{7ywsbbJQR{jHIZ@r@|mHNQ6%D4*>*3Y z-g$$q*;IgsiBvqQw8j`LOLf-=!t%P)H_Cy$;EKg5$86ieeW`csd!8u9 z6+x9^-GbFw%`D_GaVbz~|9#MvkaBzP*TkS)Vh}s}f?{;+%MW6tC9%lYAI6%#j5Qf; z$OP=?k*2HN5?tnEURUYYJ2xz3TyAncRJxTF8s+(HRtO@5<0E)#(u7qCo}E}>-9rq# zOJ4kSZoV;NzLhD}0rqVe#)XBYby{uos6aYvqkPqJ%X;2n>f?Vu^5!C8+56wQb`!~v zxivGMZa*po2YRG^cePc9f;A!}%+?e znN{YLUPt0JOetV9p8X)$1ee*#ujAS=7Z0`GJCkHl@4##Bo!wp{q+p{K=OKBqA{Diw zEdn%vF31Mn^to6uC}KAECQE8ZUAS5-)}_k%3B0OK6`$6j^2;WK2f_OMz3vSU!&_!1 z-=mYNb1Y?|%khp;(3hF6)&>qz5k!9W+zIU z&mkbp1rB{_wFp3QbmE{yDUqO_>(7o$y zE+XWOL#0xVw4nO5OB|PWM!M$9C8{ELdl^09rc|M&^z{`C*5+p_L}t0`+m38z>0ND269%(-HKYDlfZ5Su?c0UeSO*UX1_@>iVtaE$d;kSL=qd2|1LVx%y!m? z+i7)5=WP#XPFrgjjtYN3?=iUc zND%u6maT@{cNvV!=j{-~3YwBA|p*$mbR3->U%mL!|Q$_V+}$iYcHGHSOEe zd/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index dfa4a6e665..bcb56e9bcf 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -248,10 +248,10 @@ class SpdxReporter(val dest: File) : ReportRenderer { tasks.withType { doLast { ant.withGroovyBuilder { - "checksum"("algorithm" to "md5", "file" to archivePath) - "checksum"("algorithm" to "sha1", "file" to archivePath) - "checksum"("algorithm" to "sha-256", "file" to archivePath, "fileext" to ".sha256") - "checksum"("algorithm" to "sha-512", "file" to archivePath, "fileext" to ".sha512") + "checksum"("algorithm" to "md5", "file" to archiveFile.get()) + "checksum"("algorithm" to "sha1", "file" to archiveFile.get()) + "checksum"("algorithm" to "sha-256", "file" to archiveFile.get(), "fileext" to ".sha256") + "checksum"("algorithm" to "sha-512", "file" to archiveFile.get(), "fileext" to ".sha512") } } } From dfee24e814dc5d50bdba7098c02239315fe5caf8 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 9 Aug 2023 12:59:12 -0700 Subject: [PATCH 071/123] [Backport 2.x] Upgrade dependency-license-report and classgraph (#599) * Bump com.github.jk1.dependency-license-report from 2.4 to 2.5 (#575) * Bump com.github.jk1.dependency-license-report from 2.4 to 2.5 Bumps com.github.jk1.dependency-license-report from 2.4 to 2.5. --- updated-dependencies: - dependency-name: com.github.jk1.dependency-license-report dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update changelog Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Signed-off-by: Vacha Shah * Bump io.github.classgraph:classgraph from 4.8.160 to 4.8.161 in /java-client (#574) * Bump io.github.classgraph:classgraph in /java-client Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.160 to 4.8.161. - [Release notes](https://github.com/classgraph/classgraph/releases) - [Commits](https://github.com/classgraph/classgraph/commits/classgraph-4.8.161) --- updated-dependencies: - dependency-name: io.github.classgraph:classgraph dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Update changelog Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Signed-off-by: Vacha Shah --------- Signed-off-by: dependabot[bot] Signed-off-by: Vacha Shah Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 10 ++++------ java-client/build.gradle.kts | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6906a80fd3..728d55b838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,13 @@ # CHANGELOG Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [Unreleased] -### Dependencies -- Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 - - ## [Unreleased] ### Added ### Dependencies - +- Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 +- Bumps `com.github.jk1.dependency-license-report` from 2.4 to 2.5 +- Bumps `io.github.classgraph:classgraph` from 4.8.160 to 4.8.161 + ### Changed ### Deprecated diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index bcb56e9bcf..5092b68f41 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -48,7 +48,7 @@ plugins { `java-library` checkstyle `maven-publish` - id("com.github.jk1.dependency-license-report") version "2.4" + id("com.github.jk1.dependency-license-report") version "2.5" } checkstyle { @@ -186,7 +186,7 @@ dependencies { implementation("org.eclipse", "yasson", "2.0.2") // https://github.com/classgraph/classgraph - testImplementation("io.github.classgraph:classgraph:4.8.160") + testImplementation("io.github.classgraph:classgraph:4.8.161") // Eclipse 1.0 testImplementation("junit", "junit" , "4.13.2") { From c4addce091d97e1dd4c476a49957198672d6a5db Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 9 Aug 2023 13:43:06 -0700 Subject: [PATCH 072/123] Bump org.eclipse.parsson:parsson from 1.1.1 to 1.1.4 (#600) Signed-off-by: Vacha Shah --- CHANGELOG.md | 2 +- java-client/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 728d55b838..86bbc0f51f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies - Bumps `com.github.jk1.dependency-license-report` from 1.19 to 2.2 -- Bumps `org.eclipse.parsson:parsson` from 1.1.1 to 1.1.2 +- Bumps `org.eclipse.parsson:parsson` from 1.1.2 to 1.1.4 ### Changed - Improve time taken by Github actions by using cache ([#439](https://github.com/opensearch-project/opensearch-java/pull/439)) diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 5092b68f41..5096f81d83 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -154,7 +154,7 @@ dependencies { // Needed even if using Jackson to have an implementation of the Jsonp object model // EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 // https://github.com/eclipse-ee4j/parsson - api("org.eclipse.parsson:parsson:1.1.2") + api("org.eclipse.parsson:parsson:1.1.4") // EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 // http://json-b.net/ From 9362d0d9ebb032142408d958dcbb7797cf274a4d Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 9 Aug 2023 16:14:09 -0700 Subject: [PATCH 073/123] Remove code generated comments (#598) (#601) * Removing comments related to generated code * Update CHANGELOG --------- Signed-off-by: Vacha Shah --- CHANGELOG.md | 1 + .../opensearch/client/opensearch/OpenSearchAsyncClient.java | 4 ---- .../org/opensearch/client/opensearch/OpenSearchClient.java | 4 ---- .../client/opensearch/_types/AcknowledgedResponseBase.java | 4 ---- .../org/opensearch/client/opensearch/_types/BaseNode.java | 4 ---- .../client/opensearch/_types/BulkIndexByScrollFailure.java | 4 ---- .../org/opensearch/client/opensearch/_types/BulkStats.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Bytes.java | 4 ---- .../client/opensearch/_types/ClusterStatistics.java | 4 ---- .../opensearch/client/opensearch/_types/CompletionStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/Conflicts.java | 4 ---- .../opensearch/client/opensearch/_types/CoordsGeoBounds.java | 4 ---- .../org/opensearch/client/opensearch/_types/DistanceUnit.java | 4 ---- .../org/opensearch/client/opensearch/_types/DocStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/EmptyObject.java | 4 ---- .../opensearch/client/opensearch/_types/EmptyTransform.java | 4 ---- .../org/opensearch/client/opensearch/_types/ErrorCause.java | 4 ---- .../opensearch/client/opensearch/_types/ErrorResponse.java | 4 ---- .../opensearch/client/opensearch/_types/ExpandWildcard.java | 4 ---- .../opensearch/client/opensearch/_types/FieldMemoryUsage.java | 4 ---- .../opensearch/client/opensearch/_types/FieldSizeUsage.java | 4 ---- .../org/opensearch/client/opensearch/_types/FieldSort.java | 4 ---- .../client/opensearch/_types/FieldSortNumericType.java | 4 ---- .../org/opensearch/client/opensearch/_types/FieldValue.java | 4 ---- .../opensearch/client/opensearch/_types/FielddataStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/FlushStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/GeoBounds.java | 4 ---- .../client/opensearch/_types/GeoBoundsBuilders.java | 4 ---- .../opensearch/client/opensearch/_types/GeoDistanceSort.java | 4 ---- .../opensearch/client/opensearch/_types/GeoDistanceType.java | 4 ---- .../opensearch/client/opensearch/_types/GeoHashLocation.java | 4 ---- .../opensearch/client/opensearch/_types/GeoHashPrecision.java | 4 ---- .../client/opensearch/_types/GeoHashPrecisionBuilders.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/GeoLine.java | 4 ---- .../org/opensearch/client/opensearch/_types/GeoLocation.java | 4 ---- .../client/opensearch/_types/GeoLocationBuilders.java | 4 ---- .../opensearch/client/opensearch/_types/GeoShapeRelation.java | 4 ---- .../org/opensearch/client/opensearch/_types/GetStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/HealthStatus.java | 4 ---- .../opensearch/client/opensearch/_types/IndexingStats.java | 4 ---- .../client/opensearch/_types/IndicesResponseBase.java | 4 ---- .../org/opensearch/client/opensearch/_types/InlineGet.java | 4 ---- .../org/opensearch/client/opensearch/_types/InlineScript.java | 4 ---- .../client/opensearch/_types/LatLonGeoLocation.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Level.java | 4 ---- .../client/opensearch/_types/LifecycleOperationMode.java | 4 ---- .../org/opensearch/client/opensearch/_types/MergesStats.java | 4 ---- .../opensearch/client/opensearch/_types/NestedSortValue.java | 4 ---- .../opensearch/client/opensearch/_types/NodeAttributes.java | 4 ---- .../org/opensearch/client/opensearch/_types/NodeRole.java | 4 ---- .../org/opensearch/client/opensearch/_types/NodeShard.java | 4 ---- .../opensearch/client/opensearch/_types/NodeStatistics.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/OpType.java | 4 ---- .../client/opensearch/_types/OpenSearchVersionInfo.java | 4 ---- .../org/opensearch/client/opensearch/_types/PluginStats.java | 4 ---- .../opensearch/client/opensearch/_types/QueryCacheStats.java | 4 ---- .../opensearch/client/opensearch/_types/RecoveryStats.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Refresh.java | 4 ---- .../org/opensearch/client/opensearch/_types/RefreshStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/RequestBase.java | 4 ---- .../client/opensearch/_types/RequestCacheStats.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Result.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Retries.java | 4 ---- .../org/opensearch/client/opensearch/_types/ScoreSort.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Script.java | 4 ---- .../org/opensearch/client/opensearch/_types/ScriptBase.java | 4 ---- .../opensearch/client/opensearch/_types/ScriptBuilders.java | 4 ---- .../org/opensearch/client/opensearch/_types/ScriptField.java | 4 ---- .../org/opensearch/client/opensearch/_types/ScriptSort.java | 4 ---- .../opensearch/client/opensearch/_types/ScriptSortType.java | 4 ---- .../org/opensearch/client/opensearch/_types/SearchStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/SearchType.java | 4 ---- .../opensearch/client/opensearch/_types/SegmentsStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/ShardFailure.java | 4 ---- .../opensearch/client/opensearch/_types/ShardStatistics.java | 4 ---- .../client/opensearch/_types/ShardsOperationResponseBase.java | 4 ---- .../org/opensearch/client/opensearch/_types/SlicedScroll.java | 4 ---- .../org/opensearch/client/opensearch/_types/SortMode.java | 4 ---- .../org/opensearch/client/opensearch/_types/SortOptions.java | 4 ---- .../client/opensearch/_types/SortOptionsBuilders.java | 4 ---- .../client/opensearch/_types/SortOptionsVariant.java | 4 ---- .../org/opensearch/client/opensearch/_types/SortOrder.java | 4 ---- .../org/opensearch/client/opensearch/_types/StoreStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/StoredScript.java | 4 ---- .../opensearch/client/opensearch/_types/StoredScriptId.java | 4 ---- .../org/opensearch/client/opensearch/_types/SuggestMode.java | 4 ---- .../org/opensearch/client/opensearch/_types/ThreadType.java | 4 ---- .../java/org/opensearch/client/opensearch/_types/Time.java | 4 ---- .../org/opensearch/client/opensearch/_types/TimeBuilders.java | 4 ---- .../org/opensearch/client/opensearch/_types/TimeUnit.java | 4 ---- .../client/opensearch/_types/TopLeftBottomRightGeoBounds.java | 4 ---- .../client/opensearch/_types/TopRightBottomLeftGeoBounds.java | 4 ---- .../opensearch/client/opensearch/_types/TranslogStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/VersionType.java | 4 ---- .../client/opensearch/_types/WaitForActiveShardOptions.java | 4 ---- .../client/opensearch/_types/WaitForActiveShards.java | 4 ---- .../client/opensearch/_types/WaitForActiveShardsBuilders.java | 4 ---- .../opensearch/client/opensearch/_types/WaitForEvents.java | 4 ---- .../org/opensearch/client/opensearch/_types/WarmerStats.java | 4 ---- .../org/opensearch/client/opensearch/_types/WktGeoBounds.java | 4 ---- .../client/opensearch/_types/WriteResponseBase.java | 4 ---- .../_types/aggregations/AdjacencyMatrixAggregate.java | 4 ---- .../_types/aggregations/AdjacencyMatrixAggregation.java | 4 ---- .../opensearch/_types/aggregations/AdjacencyMatrixBucket.java | 4 ---- .../client/opensearch/_types/aggregations/Aggregate.java | 4 ---- .../client/opensearch/_types/aggregations/AggregateBase.java | 4 ---- .../opensearch/_types/aggregations/AggregateBuilders.java | 4 ---- .../opensearch/_types/aggregations/AggregateVariant.java | 4 ---- .../client/opensearch/_types/aggregations/Aggregation.java | 4 ---- .../opensearch/_types/aggregations/AggregationBase.java | 4 ---- .../opensearch/_types/aggregations/AggregationBuilders.java | 4 ---- .../opensearch/_types/aggregations/AggregationRange.java | 4 ---- .../opensearch/_types/aggregations/AggregationVariant.java | 4 ---- .../opensearch/_types/aggregations/ArrayPercentilesItem.java | 4 ---- .../_types/aggregations/AutoDateHistogramAggregate.java | 4 ---- .../_types/aggregations/AutoDateHistogramAggregation.java | 4 ---- .../opensearch/_types/aggregations/AverageAggregation.java | 4 ---- .../_types/aggregations/AverageBucketAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/AvgAggregate.java | 4 ---- .../opensearch/_types/aggregations/BoxPlotAggregate.java | 4 ---- .../opensearch/_types/aggregations/BoxplotAggregation.java | 4 ---- .../opensearch/_types/aggregations/BucketAggregationBase.java | 4 ---- .../_types/aggregations/BucketMetricValueAggregate.java | 4 ---- .../_types/aggregations/BucketScriptAggregation.java | 4 ---- .../_types/aggregations/BucketSelectorAggregation.java | 4 ---- .../opensearch/_types/aggregations/BucketSortAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/Buckets.java | 4 ---- .../opensearch/_types/aggregations/BucketsBuilders.java | 4 ---- .../client/opensearch/_types/aggregations/BucketsPath.java | 4 ---- .../opensearch/_types/aggregations/BucketsPathBuilders.java | 4 ---- .../opensearch/_types/aggregations/CalendarInterval.java | 4 ---- .../opensearch/_types/aggregations/CardinalityAggregate.java | 4 ---- .../_types/aggregations/CardinalityAggregation.java | 4 ---- .../opensearch/_types/aggregations/ChiSquareHeuristic.java | 4 ---- .../opensearch/_types/aggregations/ChildrenAggregate.java | 4 ---- .../opensearch/_types/aggregations/ChildrenAggregation.java | 4 ---- .../_types/aggregations/ClassificationInferenceOptions.java | 4 ---- .../opensearch/_types/aggregations/CompositeAggregate.java | 4 ---- .../opensearch/_types/aggregations/CompositeAggregation.java | 4 ---- .../_types/aggregations/CompositeAggregationSource.java | 4 ---- .../opensearch/_types/aggregations/CompositeBucket.java | 4 ---- .../_types/aggregations/CumulativeCardinalityAggregate.java | 4 ---- .../_types/aggregations/CumulativeCardinalityAggregation.java | 4 ---- .../_types/aggregations/CumulativeSumAggregation.java | 4 ---- .../_types/aggregations/DateHistogramAggregate.java | 4 ---- .../_types/aggregations/DateHistogramAggregation.java | 4 ---- .../opensearch/_types/aggregations/DateHistogramBucket.java | 4 ---- .../opensearch/_types/aggregations/DateRangeAggregate.java | 4 ---- .../opensearch/_types/aggregations/DateRangeAggregation.java | 4 ---- .../opensearch/_types/aggregations/DateRangeExpression.java | 4 ---- .../opensearch/_types/aggregations/DerivativeAggregate.java | 4 ---- .../opensearch/_types/aggregations/DerivativeAggregation.java | 4 ---- .../_types/aggregations/DiversifiedSamplerAggregation.java | 4 ---- .../opensearch/_types/aggregations/DoubleTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/DoubleTermsBucket.java | 4 ---- .../opensearch/_types/aggregations/EwmaModelSettings.java | 4 ---- .../_types/aggregations/EwmaMovingAverageAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/ExtendedBounds.java | 4 ---- .../_types/aggregations/ExtendedStatsAggregate.java | 4 ---- .../_types/aggregations/ExtendedStatsAggregation.java | 4 ---- .../_types/aggregations/ExtendedStatsBucketAggregate.java | 4 ---- .../_types/aggregations/ExtendedStatsBucketAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/FieldDateMath.java | 4 ---- .../opensearch/_types/aggregations/FieldDateMathBuilders.java | 4 ---- .../opensearch/_types/aggregations/FilterAggregate.java | 4 ---- .../opensearch/_types/aggregations/FiltersAggregate.java | 4 ---- .../opensearch/_types/aggregations/FiltersAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/FiltersBucket.java | 4 ---- .../_types/aggregations/FormatMetricAggregationBase.java | 4 ---- .../_types/aggregations/FormattableMetricAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/GapPolicy.java | 4 ---- .../opensearch/_types/aggregations/GeoBoundsAggregate.java | 4 ---- .../opensearch/_types/aggregations/GeoBoundsAggregation.java | 4 ---- .../opensearch/_types/aggregations/GeoCentroidAggregate.java | 4 ---- .../_types/aggregations/GeoCentroidAggregation.java | 4 ---- .../opensearch/_types/aggregations/GeoDistanceAggregate.java | 4 ---- .../_types/aggregations/GeoDistanceAggregation.java | 4 ---- .../opensearch/_types/aggregations/GeoHashGridAggregate.java | 4 ---- .../_types/aggregations/GeoHashGridAggregation.java | 4 ---- .../opensearch/_types/aggregations/GeoHashGridBucket.java | 4 ---- .../opensearch/_types/aggregations/GeoLineAggregate.java | 4 ---- .../opensearch/_types/aggregations/GeoLineAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/GeoLinePoint.java | 4 ---- .../client/opensearch/_types/aggregations/GeoLineSort.java | 4 ---- .../opensearch/_types/aggregations/GeoTileGridAggregate.java | 4 ---- .../_types/aggregations/GeoTileGridAggregation.java | 4 ---- .../opensearch/_types/aggregations/GeoTileGridBucket.java | 4 ---- .../opensearch/_types/aggregations/GlobalAggregate.java | 4 ---- .../opensearch/_types/aggregations/GlobalAggregation.java | 4 ---- .../aggregations/GoogleNormalizedDistanceHeuristic.java | 4 ---- .../client/opensearch/_types/aggregations/HdrMethod.java | 4 ---- .../_types/aggregations/HdrPercentileRanksAggregate.java | 4 ---- .../_types/aggregations/HdrPercentilesAggregate.java | 4 ---- .../opensearch/_types/aggregations/HistogramAggregate.java | 4 ---- .../opensearch/_types/aggregations/HistogramAggregation.java | 4 ---- .../opensearch/_types/aggregations/HistogramBucket.java | 4 ---- .../client/opensearch/_types/aggregations/HistogramOrder.java | 4 ---- .../_types/aggregations/HoltLinearModelSettings.java | 4 ---- .../_types/aggregations/HoltMovingAverageAggregation.java | 4 ---- .../_types/aggregations/HoltWintersModelSettings.java | 4 ---- .../aggregations/HoltWintersMovingAverageAggregation.java | 4 ---- .../opensearch/_types/aggregations/HoltWintersType.java | 4 ---- .../opensearch/_types/aggregations/InferenceAggregate.java | 4 ---- .../opensearch/_types/aggregations/InferenceAggregation.java | 4 ---- .../_types/aggregations/InferenceClassImportance.java | 4 ---- .../opensearch/_types/aggregations/InferenceConfig.java | 4 ---- .../_types/aggregations/InferenceFeatureImportance.java | 4 ---- .../_types/aggregations/InferenceTopClassEntry.java | 4 ---- .../opensearch/_types/aggregations/IpRangeAggregate.java | 4 ---- .../opensearch/_types/aggregations/IpRangeAggregation.java | 4 ---- .../_types/aggregations/IpRangeAggregationRange.java | 4 ---- .../client/opensearch/_types/aggregations/IpRangeBucket.java | 4 ---- .../_types/aggregations/LinearMovingAverageAggregation.java | 4 ---- .../_types/aggregations/LongRareTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/LongRareTermsBucket.java | 4 ---- .../opensearch/_types/aggregations/LongTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/LongTermsBucket.java | 4 ---- .../opensearch/_types/aggregations/MatrixAggregation.java | 4 ---- .../opensearch/_types/aggregations/MatrixStatsAggregate.java | 4 ---- .../_types/aggregations/MatrixStatsAggregation.java | 4 ---- .../opensearch/_types/aggregations/MatrixStatsFields.java | 4 ---- .../client/opensearch/_types/aggregations/MaxAggregate.java | 4 ---- .../client/opensearch/_types/aggregations/MaxAggregation.java | 4 ---- .../opensearch/_types/aggregations/MaxBucketAggregation.java | 4 ---- .../_types/aggregations/MedianAbsoluteDeviationAggregate.java | 4 ---- .../aggregations/MedianAbsoluteDeviationAggregation.java | 4 ---- .../opensearch/_types/aggregations/MetricAggregationBase.java | 4 ---- .../client/opensearch/_types/aggregations/MinAggregate.java | 4 ---- .../client/opensearch/_types/aggregations/MinAggregation.java | 4 ---- .../opensearch/_types/aggregations/MinBucketAggregation.java | 4 ---- .../opensearch/_types/aggregations/MinimumInterval.java | 4 ---- .../opensearch/_types/aggregations/MissingAggregate.java | 4 ---- .../opensearch/_types/aggregations/MissingAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/MissingOrder.java | 4 ---- .../_types/aggregations/MovingAverageAggregation.java | 4 ---- .../_types/aggregations/MovingAverageAggregationBase.java | 4 ---- .../_types/aggregations/MovingAverageAggregationBuilders.java | 4 ---- .../_types/aggregations/MovingAverageAggregationVariant.java | 4 ---- .../_types/aggregations/MovingFunctionAggregation.java | 4 ---- .../_types/aggregations/MovingPercentilesAggregation.java | 4 ---- .../_types/aggregations/MultiBucketAggregateBase.java | 4 ---- .../opensearch/_types/aggregations/MultiBucketBase.java | 4 ---- .../opensearch/_types/aggregations/MultiTermLookup.java | 4 ---- .../opensearch/_types/aggregations/MultiTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/MultiTermsAggregation.java | 4 ---- .../opensearch/_types/aggregations/MultiTermsBucket.java | 4 ---- .../_types/aggregations/MutualInformationHeuristic.java | 4 ---- .../opensearch/_types/aggregations/NestedAggregate.java | 4 ---- .../opensearch/_types/aggregations/NestedAggregation.java | 4 ---- .../opensearch/_types/aggregations/NormalizeAggregation.java | 4 ---- .../opensearch/_types/aggregations/NormalizeMethod.java | 4 ---- .../opensearch/_types/aggregations/ParentAggregation.java | 4 ---- .../_types/aggregations/PercentageScoreHeuristic.java | 4 ---- .../_types/aggregations/PercentileRanksAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/Percentiles.java | 4 ---- .../_types/aggregations/PercentilesAggregateBase.java | 4 ---- .../_types/aggregations/PercentilesAggregation.java | 4 ---- .../_types/aggregations/PercentilesBucketAggregate.java | 4 ---- .../_types/aggregations/PercentilesBucketAggregation.java | 4 ---- .../opensearch/_types/aggregations/PercentilesBuilders.java | 4 ---- .../_types/aggregations/PipelineAggregationBase.java | 4 ---- .../client/opensearch/_types/aggregations/RangeAggregate.java | 4 ---- .../opensearch/_types/aggregations/RangeAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/RangeBucket.java | 4 ---- .../opensearch/_types/aggregations/RareTermsAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/RateAggregate.java | 4 ---- .../opensearch/_types/aggregations/RateAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/RateMode.java | 4 ---- .../_types/aggregations/RegressionInferenceOptions.java | 4 ---- .../_types/aggregations/ReverseNestedAggregate.java | 4 ---- .../_types/aggregations/ReverseNestedAggregation.java | 4 ---- .../opensearch/_types/aggregations/SamplerAggregate.java | 4 ---- .../opensearch/_types/aggregations/SamplerAggregation.java | 4 ---- .../_types/aggregations/SamplerAggregationExecutionHint.java | 4 ---- .../opensearch/_types/aggregations/ScriptedHeuristic.java | 4 ---- .../_types/aggregations/ScriptedMetricAggregate.java | 4 ---- .../_types/aggregations/ScriptedMetricAggregation.java | 4 ---- .../_types/aggregations/SerialDifferencingAggregation.java | 4 ---- .../_types/aggregations/SignificantLongTermsAggregate.java | 4 ---- .../_types/aggregations/SignificantLongTermsBucket.java | 4 ---- .../_types/aggregations/SignificantStringTermsAggregate.java | 4 ---- .../_types/aggregations/SignificantStringTermsBucket.java | 4 ---- .../_types/aggregations/SignificantTermsAggregation.java | 4 ---- .../_types/aggregations/SignificantTermsBucketBase.java | 4 ---- .../_types/aggregations/SignificantTextAggregation.java | 4 ---- .../_types/aggregations/SimpleMovingAverageAggregation.java | 4 ---- .../opensearch/_types/aggregations/SimpleValueAggregate.java | 4 ---- .../_types/aggregations/SingleBucketAggregateBase.java | 4 ---- .../_types/aggregations/SingleMetricAggregateBase.java | 4 ---- .../_types/aggregations/StandardDeviationBounds.java | 4 ---- .../_types/aggregations/StandardDeviationBoundsAsString.java | 4 ---- .../client/opensearch/_types/aggregations/StatsAggregate.java | 4 ---- .../opensearch/_types/aggregations/StatsAggregation.java | 4 ---- .../opensearch/_types/aggregations/StatsBucketAggregate.java | 4 ---- .../_types/aggregations/StatsBucketAggregation.java | 4 ---- .../_types/aggregations/StringRareTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/StringRareTermsBucket.java | 4 ---- .../opensearch/_types/aggregations/StringStatsAggregate.java | 4 ---- .../_types/aggregations/StringStatsAggregation.java | 4 ---- .../opensearch/_types/aggregations/StringTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/StringTermsBucket.java | 4 ---- .../client/opensearch/_types/aggregations/SumAggregate.java | 4 ---- .../client/opensearch/_types/aggregations/SumAggregation.java | 4 ---- .../opensearch/_types/aggregations/SumBucketAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/TDigest.java | 4 ---- .../_types/aggregations/TDigestPercentileRanksAggregate.java | 4 ---- .../_types/aggregations/TDigestPercentilesAggregate.java | 4 ---- .../client/opensearch/_types/aggregations/TTestAggregate.java | 4 ---- .../opensearch/_types/aggregations/TTestAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/TTestType.java | 4 ---- .../opensearch/_types/aggregations/TermsAggregateBase.java | 4 ---- .../opensearch/_types/aggregations/TermsAggregation.java | 4 ---- .../_types/aggregations/TermsAggregationCollectMode.java | 4 ---- .../_types/aggregations/TermsAggregationExecutionHint.java | 4 ---- .../opensearch/_types/aggregations/TermsBucketBase.java | 4 ---- .../client/opensearch/_types/aggregations/TermsExclude.java | 4 ---- .../opensearch/_types/aggregations/TermsExcludeBuilders.java | 4 ---- .../client/opensearch/_types/aggregations/TermsInclude.java | 4 ---- .../opensearch/_types/aggregations/TermsIncludeBuilders.java | 4 ---- .../client/opensearch/_types/aggregations/TermsPartition.java | 4 ---- .../client/opensearch/_types/aggregations/TestPopulation.java | 4 ---- .../opensearch/_types/aggregations/TopHitsAggregate.java | 4 ---- .../opensearch/_types/aggregations/TopHitsAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/TopMetrics.java | 4 ---- .../opensearch/_types/aggregations/TopMetricsAggregate.java | 4 ---- .../opensearch/_types/aggregations/TopMetricsAggregation.java | 4 ---- .../opensearch/_types/aggregations/TopMetricsBucket.java | 4 ---- .../opensearch/_types/aggregations/TopMetricsValue.java | 4 ---- .../_types/aggregations/UnmappedRareTermsAggregate.java | 4 ---- .../aggregations/UnmappedSignificantTermsAggregate.java | 4 ---- .../_types/aggregations/UnmappedTermsAggregate.java | 4 ---- .../opensearch/_types/aggregations/ValueCountAggregate.java | 4 ---- .../opensearch/_types/aggregations/ValueCountAggregation.java | 4 ---- .../client/opensearch/_types/aggregations/ValueType.java | 4 ---- .../_types/aggregations/VariableWidthHistogramAggregate.java | 4 ---- .../aggregations/VariableWidthHistogramAggregation.java | 4 ---- .../_types/aggregations/VariableWidthHistogramBucket.java | 4 ---- .../_types/aggregations/WeightedAverageAggregation.java | 4 ---- .../opensearch/_types/aggregations/WeightedAverageValue.java | 4 ---- .../opensearch/_types/aggregations/WeightedAvgAggregate.java | 4 ---- .../client/opensearch/_types/analysis/Analyzer.java | 4 ---- .../client/opensearch/_types/analysis/AnalyzerBuilders.java | 4 ---- .../client/opensearch/_types/analysis/AnalyzerVariant.java | 4 ---- .../opensearch/_types/analysis/AsciiFoldingTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/CharFilter.java | 4 ---- .../client/opensearch/_types/analysis/CharFilterBase.java | 4 ---- .../client/opensearch/_types/analysis/CharFilterBuilders.java | 4 ---- .../opensearch/_types/analysis/CharFilterDefinition.java | 4 ---- .../_types/analysis/CharFilterDefinitionBuilders.java | 4 ---- .../_types/analysis/CharFilterDefinitionVariant.java | 4 ---- .../client/opensearch/_types/analysis/CharGroupTokenizer.java | 4 ---- .../opensearch/_types/analysis/CommonGramsTokenFilter.java | 4 ---- .../_types/analysis/CompoundWordTokenFilterBase.java | 4 ---- .../opensearch/_types/analysis/ConditionTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/CustomAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/CustomNormalizer.java | 4 ---- .../opensearch/_types/analysis/DelimitedPayloadEncoding.java | 4 ---- .../_types/analysis/DelimitedPayloadTokenFilter.java | 4 ---- .../_types/analysis/DictionaryDecompounderTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/DutchAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/EdgeNGramSide.java | 4 ---- .../opensearch/_types/analysis/EdgeNGramTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/EdgeNGramTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/ElisionTokenFilter.java | 4 ---- .../opensearch/_types/analysis/FingerprintAnalyzer.java | 4 ---- .../opensearch/_types/analysis/FingerprintTokenFilter.java | 4 ---- .../opensearch/_types/analysis/HtmlStripCharFilter.java | 4 ---- .../opensearch/_types/analysis/HunspellTokenFilter.java | 4 ---- .../_types/analysis/HyphenationDecompounderTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/IcuAnalyzer.java | 4 ---- .../opensearch/_types/analysis/IcuCollationAlternate.java | 4 ---- .../opensearch/_types/analysis/IcuCollationCaseFirst.java | 4 ---- .../opensearch/_types/analysis/IcuCollationDecomposition.java | 4 ---- .../opensearch/_types/analysis/IcuCollationStrength.java | 4 ---- .../opensearch/_types/analysis/IcuCollationTokenFilter.java | 4 ---- .../opensearch/_types/analysis/IcuFoldingTokenFilter.java | 4 ---- .../_types/analysis/IcuNormalizationCharFilter.java | 4 ---- .../opensearch/_types/analysis/IcuNormalizationMode.java | 4 ---- .../_types/analysis/IcuNormalizationTokenFilter.java | 4 ---- .../opensearch/_types/analysis/IcuNormalizationType.java | 4 ---- .../client/opensearch/_types/analysis/IcuTokenizer.java | 4 ---- .../opensearch/_types/analysis/IcuTransformDirection.java | 4 ---- .../opensearch/_types/analysis/IcuTransformTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/KStemTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/KeepTypesMode.java | 4 ---- .../opensearch/_types/analysis/KeepTypesTokenFilter.java | 4 ---- .../opensearch/_types/analysis/KeepWordsTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/KeywordAnalyzer.java | 4 ---- .../opensearch/_types/analysis/KeywordMarkerTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/KeywordTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/KuromojiAnalyzer.java | 4 ---- .../_types/analysis/KuromojiIterationMarkCharFilter.java | 4 ---- .../_types/analysis/KuromojiPartOfSpeechTokenFilter.java | 4 ---- .../_types/analysis/KuromojiReadingFormTokenFilter.java | 4 ---- .../_types/analysis/KuromojiStemmerTokenFilter.java | 4 ---- .../opensearch/_types/analysis/KuromojiTokenizationMode.java | 4 ---- .../client/opensearch/_types/analysis/KuromojiTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/Language.java | 4 ---- .../client/opensearch/_types/analysis/LanguageAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/LengthTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/LetterTokenizer.java | 4 ---- .../_types/analysis/LimitTokenCountTokenFilter.java | 4 ---- .../opensearch/_types/analysis/LowercaseNormalizer.java | 4 ---- .../opensearch/_types/analysis/LowercaseTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/LowercaseTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/MappingCharFilter.java | 4 ---- .../opensearch/_types/analysis/MultiplexerTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/NGramTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/NGramTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/NoriAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/NoriDecompoundMode.java | 4 ---- .../_types/analysis/NoriPartOfSpeechTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/NoriTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/Normalizer.java | 4 ---- .../client/opensearch/_types/analysis/NormalizerBuilders.java | 4 ---- .../client/opensearch/_types/analysis/NormalizerVariant.java | 4 ---- .../opensearch/_types/analysis/PathHierarchyTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/PatternAnalyzer.java | 4 ---- .../opensearch/_types/analysis/PatternCaptureTokenFilter.java | 4 ---- .../opensearch/_types/analysis/PatternReplaceCharFilter.java | 4 ---- .../opensearch/_types/analysis/PatternReplaceTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/PatternTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/PhoneticEncoder.java | 4 ---- .../client/opensearch/_types/analysis/PhoneticLanguage.java | 4 ---- .../client/opensearch/_types/analysis/PhoneticNameType.java | 4 ---- .../client/opensearch/_types/analysis/PhoneticRuleType.java | 4 ---- .../opensearch/_types/analysis/PhoneticTokenFilter.java | 4 ---- .../opensearch/_types/analysis/PorterStemTokenFilter.java | 4 ---- .../opensearch/_types/analysis/PredicateTokenFilter.java | 4 ---- .../_types/analysis/RemoveDuplicatesTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/ReverseTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/ShingleTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/SimpleAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/SnowballAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/SnowballLanguage.java | 4 ---- .../opensearch/_types/analysis/SnowballTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/StandardAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/StandardTokenizer.java | 4 ---- .../_types/analysis/StemmerOverrideTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/StemmerTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/StopAnalyzer.java | 4 ---- .../client/opensearch/_types/analysis/StopTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/SynonymFormat.java | 4 ---- .../opensearch/_types/analysis/SynonymGraphTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/SynonymTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/TokenChar.java | 4 ---- .../client/opensearch/_types/analysis/TokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/TokenFilterBase.java | 4 ---- .../opensearch/_types/analysis/TokenFilterBuilders.java | 4 ---- .../opensearch/_types/analysis/TokenFilterDefinition.java | 4 ---- .../_types/analysis/TokenFilterDefinitionBuilders.java | 4 ---- .../_types/analysis/TokenFilterDefinitionVariant.java | 4 ---- .../client/opensearch/_types/analysis/Tokenizer.java | 4 ---- .../client/opensearch/_types/analysis/TokenizerBase.java | 4 ---- .../client/opensearch/_types/analysis/TokenizerBuilders.java | 4 ---- .../opensearch/_types/analysis/TokenizerDefinition.java | 4 ---- .../_types/analysis/TokenizerDefinitionBuilders.java | 4 ---- .../_types/analysis/TokenizerDefinitionVariant.java | 4 ---- .../client/opensearch/_types/analysis/TrimTokenFilter.java | 4 ---- .../opensearch/_types/analysis/TruncateTokenFilter.java | 4 ---- .../opensearch/_types/analysis/UaxEmailUrlTokenizer.java | 4 ---- .../client/opensearch/_types/analysis/UniqueTokenFilter.java | 4 ---- .../opensearch/_types/analysis/UppercaseTokenFilter.java | 4 ---- .../client/opensearch/_types/analysis/WhitespaceAnalyzer.java | 4 ---- .../opensearch/_types/analysis/WhitespaceTokenizer.java | 4 ---- .../_types/analysis/WordDelimiterGraphTokenFilter.java | 4 ---- .../opensearch/_types/analysis/WordDelimiterTokenFilter.java | 4 ---- .../_types/mapping/AggregateMetricDoubleProperty.java | 4 ---- .../opensearch/client/opensearch/_types/mapping/AllField.java | 4 ---- .../client/opensearch/_types/mapping/BinaryProperty.java | 4 ---- .../client/opensearch/_types/mapping/BooleanProperty.java | 4 ---- .../client/opensearch/_types/mapping/ByteNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/CompletionProperty.java | 4 ---- .../opensearch/_types/mapping/ConstantKeywordProperty.java | 4 ---- .../client/opensearch/_types/mapping/CorePropertyBase.java | 4 ---- .../client/opensearch/_types/mapping/DateNanosProperty.java | 4 ---- .../client/opensearch/_types/mapping/DateProperty.java | 4 ---- .../client/opensearch/_types/mapping/DateRangeProperty.java | 4 ---- .../opensearch/_types/mapping/DocValuesPropertyBase.java | 4 ---- .../opensearch/_types/mapping/DoubleNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/DoubleRangeProperty.java | 4 ---- .../client/opensearch/_types/mapping/DynamicMapping.java | 4 ---- .../client/opensearch/_types/mapping/DynamicTemplate.java | 4 ---- .../client/opensearch/_types/mapping/FieldAliasProperty.java | 4 ---- .../client/opensearch/_types/mapping/FieldMapping.java | 4 ---- .../client/opensearch/_types/mapping/FieldNamesField.java | 4 ---- .../client/opensearch/_types/mapping/FieldType.java | 4 ---- .../client/opensearch/_types/mapping/FlattenedProperty.java | 4 ---- .../client/opensearch/_types/mapping/FloatNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/FloatRangeProperty.java | 4 ---- .../client/opensearch/_types/mapping/GeoOrientation.java | 4 ---- .../client/opensearch/_types/mapping/GeoPointProperty.java | 4 ---- .../client/opensearch/_types/mapping/GeoShapeProperty.java | 4 ---- .../client/opensearch/_types/mapping/GeoStrategy.java | 4 ---- .../opensearch/_types/mapping/HalfFloatNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/HistogramProperty.java | 4 ---- .../client/opensearch/_types/mapping/IndexField.java | 4 ---- .../client/opensearch/_types/mapping/IndexOptions.java | 4 ---- .../opensearch/_types/mapping/IntegerNumberProperty.java | 4 ---- .../opensearch/_types/mapping/IntegerRangeProperty.java | 4 ---- .../client/opensearch/_types/mapping/IpProperty.java | 4 ---- .../client/opensearch/_types/mapping/IpRangeProperty.java | 4 ---- .../client/opensearch/_types/mapping/JoinProperty.java | 4 ---- .../client/opensearch/_types/mapping/KeywordProperty.java | 4 ---- .../client/opensearch/_types/mapping/LongNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/LongRangeProperty.java | 4 ---- .../client/opensearch/_types/mapping/MatchType.java | 4 ---- .../client/opensearch/_types/mapping/Murmur3HashProperty.java | 4 ---- .../client/opensearch/_types/mapping/NestedProperty.java | 4 ---- .../client/opensearch/_types/mapping/NumberPropertyBase.java | 4 ---- .../client/opensearch/_types/mapping/ObjectProperty.java | 4 ---- .../client/opensearch/_types/mapping/OnScriptError.java | 4 ---- .../client/opensearch/_types/mapping/PercolatorProperty.java | 4 ---- .../client/opensearch/_types/mapping/PointProperty.java | 4 ---- .../opensearch/client/opensearch/_types/mapping/Property.java | 4 ---- .../client/opensearch/_types/mapping/PropertyBase.java | 4 ---- .../client/opensearch/_types/mapping/PropertyBuilders.java | 4 ---- .../client/opensearch/_types/mapping/PropertyVariant.java | 4 ---- .../client/opensearch/_types/mapping/RangePropertyBase.java | 4 ---- .../client/opensearch/_types/mapping/RankFeatureProperty.java | 4 ---- .../opensearch/_types/mapping/RankFeaturesProperty.java | 4 ---- .../client/opensearch/_types/mapping/RoutingField.java | 4 ---- .../client/opensearch/_types/mapping/RuntimeField.java | 4 ---- .../client/opensearch/_types/mapping/RuntimeFieldType.java | 4 ---- .../opensearch/_types/mapping/ScaledFloatNumberProperty.java | 4 ---- .../opensearch/_types/mapping/SearchAsYouTypeProperty.java | 4 ---- .../client/opensearch/_types/mapping/ShapeProperty.java | 4 ---- .../client/opensearch/_types/mapping/ShortNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/SizeField.java | 4 ---- .../client/opensearch/_types/mapping/SourceField.java | 4 ---- .../opensearch/_types/mapping/StandardNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/SuggestContext.java | 4 ---- .../client/opensearch/_types/mapping/TermVectorOption.java | 4 ---- .../client/opensearch/_types/mapping/TextIndexPrefixes.java | 4 ---- .../client/opensearch/_types/mapping/TextProperty.java | 4 ---- .../client/opensearch/_types/mapping/TokenCountProperty.java | 4 ---- .../client/opensearch/_types/mapping/TypeMapping.java | 4 ---- .../opensearch/_types/mapping/UnsignedLongNumberProperty.java | 4 ---- .../client/opensearch/_types/mapping/VersionProperty.java | 4 ---- .../client/opensearch/_types/mapping/WildcardProperty.java | 4 ---- .../client/opensearch/_types/query_dsl/BoolQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/BoostingQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/ChildScoreMode.java | 4 ---- .../opensearch/_types/query_dsl/CombinedFieldsOperator.java | 4 ---- .../opensearch/_types/query_dsl/CombinedFieldsQuery.java | 4 ---- .../opensearch/_types/query_dsl/CombinedFieldsZeroTerms.java | 4 ---- .../client/opensearch/_types/query_dsl/CommonTermsQuery.java | 4 ---- .../opensearch/_types/query_dsl/ConstantScoreQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/DecayFunction.java | 4 ---- .../client/opensearch/_types/query_dsl/DecayFunctionBase.java | 4 ---- .../client/opensearch/_types/query_dsl/DecayPlacement.java | 4 ---- .../client/opensearch/_types/query_dsl/DisMaxQuery.java | 4 ---- .../opensearch/_types/query_dsl/DistanceFeatureQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/ExistsQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/FieldAndFormat.java | 4 ---- .../client/opensearch/_types/query_dsl/FieldLookup.java | 4 ---- .../opensearch/_types/query_dsl/FieldValueFactorModifier.java | 4 ---- .../_types/query_dsl/FieldValueFactorScoreFunction.java | 4 ---- .../client/opensearch/_types/query_dsl/FunctionBoostMode.java | 4 ---- .../client/opensearch/_types/query_dsl/FunctionScore.java | 4 ---- .../opensearch/_types/query_dsl/FunctionScoreBuilders.java | 4 ---- .../client/opensearch/_types/query_dsl/FunctionScoreMode.java | 4 ---- .../opensearch/_types/query_dsl/FunctionScoreQuery.java | 4 ---- .../opensearch/_types/query_dsl/FunctionScoreVariant.java | 4 ---- .../client/opensearch/_types/query_dsl/FuzzyQuery.java | 4 ---- .../opensearch/_types/query_dsl/GeoBoundingBoxQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/GeoDistanceQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/GeoExecution.java | 4 ---- .../client/opensearch/_types/query_dsl/GeoPolygonPoints.java | 4 ---- .../client/opensearch/_types/query_dsl/GeoPolygonQuery.java | 4 ---- .../opensearch/_types/query_dsl/GeoShapeFieldQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/GeoShapeQuery.java | 4 ---- .../opensearch/_types/query_dsl/GeoValidationMethod.java | 4 ---- .../client/opensearch/_types/query_dsl/HasChildQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/HasParentQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/IdsQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/Intervals.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsAllOf.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsAnyOf.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsBuilders.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsFilter.java | 4 ---- .../opensearch/_types/query_dsl/IntervalsFilterBuilders.java | 4 ---- .../opensearch/_types/query_dsl/IntervalsFilterVariant.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsFuzzy.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsMatch.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsPrefix.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsQuery.java | 4 ---- .../opensearch/_types/query_dsl/IntervalsQueryBuilders.java | 4 ---- .../opensearch/_types/query_dsl/IntervalsQueryVariant.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsVariant.java | 4 ---- .../client/opensearch/_types/query_dsl/IntervalsWildcard.java | 4 ---- .../opensearch/client/opensearch/_types/query_dsl/Like.java | 4 ---- .../client/opensearch/_types/query_dsl/LikeBuilders.java | 4 ---- .../client/opensearch/_types/query_dsl/LikeDocument.java | 4 ---- .../client/opensearch/_types/query_dsl/MatchAllQuery.java | 4 ---- .../opensearch/_types/query_dsl/MatchBoolPrefixQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/MatchNoneQuery.java | 4 ---- .../opensearch/_types/query_dsl/MatchPhrasePrefixQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/MatchPhraseQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/MatchQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/MoreLikeThisQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/MultiMatchQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/MultiValueMode.java | 4 ---- .../client/opensearch/_types/query_dsl/NestedQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/Operator.java | 4 ---- .../client/opensearch/_types/query_dsl/ParentIdQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/PercolateQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/PinnedDoc.java | 4 ---- .../client/opensearch/_types/query_dsl/PinnedQuery.java | 4 ---- .../opensearch/_types/query_dsl/PinnedQueryBuilders.java | 4 ---- .../opensearch/_types/query_dsl/PinnedQueryVariant.java | 4 ---- .../client/opensearch/_types/query_dsl/PrefixQuery.java | 4 ---- .../opensearch/client/opensearch/_types/query_dsl/Query.java | 4 ---- .../client/opensearch/_types/query_dsl/QueryBase.java | 4 ---- .../client/opensearch/_types/query_dsl/QueryBuilders.java | 4 ---- .../client/opensearch/_types/query_dsl/QueryStringQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/QueryVariant.java | 4 ---- .../opensearch/_types/query_dsl/RandomScoreFunction.java | 4 ---- .../client/opensearch/_types/query_dsl/RangeQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/RangeQueryBase.java | 4 ---- .../client/opensearch/_types/query_dsl/RangeRelation.java | 4 ---- .../opensearch/_types/query_dsl/RankFeatureFunction.java | 4 ---- .../_types/query_dsl/RankFeatureFunctionLinear.java | 4 ---- .../_types/query_dsl/RankFeatureFunctionLogarithm.java | 4 ---- .../_types/query_dsl/RankFeatureFunctionSaturation.java | 4 ---- .../_types/query_dsl/RankFeatureFunctionSigmoid.java | 4 ---- .../client/opensearch/_types/query_dsl/RankFeatureQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/RegexpQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/ScoreFunctionBase.java | 4 ---- .../client/opensearch/_types/query_dsl/ScriptQuery.java | 4 ---- .../opensearch/_types/query_dsl/ScriptScoreFunction.java | 4 ---- .../client/opensearch/_types/query_dsl/ScriptScoreQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/ShapeFieldQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/ShapeQuery.java | 4 ---- .../opensearch/_types/query_dsl/SimpleQueryStringFlag.java | 4 ---- .../opensearch/_types/query_dsl/SimpleQueryStringFlags.java | 4 ---- .../_types/query_dsl/SimpleQueryStringFlagsBuilders.java | 4 ---- .../opensearch/_types/query_dsl/SimpleQueryStringQuery.java | 4 ---- .../opensearch/_types/query_dsl/SpanContainingQuery.java | 4 ---- .../opensearch/_types/query_dsl/SpanFieldMaskingQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanFirstQuery.java | 4 ---- .../opensearch/_types/query_dsl/SpanMultiTermQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanNearQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanNotQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanOrQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanQueryBuilders.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanQueryVariant.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanTermQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/SpanWithinQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/TermQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/TermsLookup.java | 4 ---- .../client/opensearch/_types/query_dsl/TermsQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/TermsQueryField.java | 4 ---- .../opensearch/_types/query_dsl/TermsQueryFieldBuilders.java | 4 ---- .../client/opensearch/_types/query_dsl/TermsSetQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/TextQueryType.java | 4 ---- .../client/opensearch/_types/query_dsl/TypeQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/WildcardQuery.java | 4 ---- .../client/opensearch/_types/query_dsl/ZeroTermsQuery.java | 4 ---- .../org/opensearch/client/opensearch/cat/AliasesRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/AliasesResponse.java | 4 ---- .../opensearch/client/opensearch/cat/AllocationRequest.java | 4 ---- .../opensearch/client/opensearch/cat/AllocationResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/CatRequestBase.java | 4 ---- .../client/opensearch/cat/ClusterManagerRequest.java | 4 ---- .../client/opensearch/cat/ClusterManagerResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/CountRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/CountResponse.java | 4 ---- .../opensearch/client/opensearch/cat/FielddataRequest.java | 4 ---- .../opensearch/client/opensearch/cat/FielddataResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/HealthRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/HealthResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/HelpRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/HelpResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/IndicesRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/IndicesResponse.java | 4 ---- .../opensearch/client/opensearch/cat/NodeattrsRequest.java | 4 ---- .../opensearch/client/opensearch/cat/NodeattrsResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/NodesRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/NodesResponse.java | 4 ---- .../client/opensearch/cat/OpenSearchCatAsyncClient.java | 4 ---- .../opensearch/client/opensearch/cat/OpenSearchCatClient.java | 4 ---- .../opensearch/client/opensearch/cat/PendingTasksRequest.java | 4 ---- .../client/opensearch/cat/PendingTasksResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/PluginsRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/PluginsResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/RecoveryRequest.java | 4 ---- .../opensearch/client/opensearch/cat/RecoveryResponse.java | 4 ---- .../opensearch/client/opensearch/cat/RepositoriesRequest.java | 4 ---- .../client/opensearch/cat/RepositoriesResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/SegmentsRequest.java | 4 ---- .../opensearch/client/opensearch/cat/SegmentsResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/ShardsRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/ShardsResponse.java | 4 ---- .../opensearch/client/opensearch/cat/SnapshotsRequest.java | 4 ---- .../opensearch/client/opensearch/cat/SnapshotsResponse.java | 4 ---- .../org/opensearch/client/opensearch/cat/TasksRequest.java | 4 ---- .../org/opensearch/client/opensearch/cat/TasksResponse.java | 4 ---- .../opensearch/client/opensearch/cat/TemplatesRequest.java | 4 ---- .../opensearch/client/opensearch/cat/TemplatesResponse.java | 4 ---- .../opensearch/client/opensearch/cat/ThreadPoolRequest.java | 4 ---- .../opensearch/client/opensearch/cat/ThreadPoolResponse.java | 4 ---- .../client/opensearch/cat/aliases/AliasesRecord.java | 4 ---- .../client/opensearch/cat/allocation/AllocationRecord.java | 4 ---- .../opensearch/cat/cluster_manager/ClusterManagerRecord.java | 4 ---- .../opensearch/client/opensearch/cat/count/CountRecord.java | 4 ---- .../client/opensearch/cat/fielddata/FielddataRecord.java | 4 ---- .../opensearch/client/opensearch/cat/health/HealthRecord.java | 4 ---- .../org/opensearch/client/opensearch/cat/help/HelpRecord.java | 4 ---- .../client/opensearch/cat/indices/IndicesRecord.java | 4 ---- .../client/opensearch/cat/nodeattrs/NodeAttributesRecord.java | 4 ---- .../opensearch/client/opensearch/cat/nodes/NodesRecord.java | 4 ---- .../opensearch/cat/pending_tasks/PendingTasksRecord.java | 4 ---- .../client/opensearch/cat/plugins/PluginsRecord.java | 4 ---- .../client/opensearch/cat/recovery/RecoveryRecord.java | 4 ---- .../opensearch/cat/repositories/RepositoriesRecord.java | 4 ---- .../client/opensearch/cat/segments/SegmentsRecord.java | 4 ---- .../opensearch/client/opensearch/cat/shards/ShardsRecord.java | 4 ---- .../client/opensearch/cat/snapshots/SnapshotsRecord.java | 4 ---- .../opensearch/client/opensearch/cat/tasks/TasksRecord.java | 4 ---- .../client/opensearch/cat/templates/TemplatesRecord.java | 4 ---- .../client/opensearch/cat/thread_pool/ThreadPoolRecord.java | 4 ---- .../client/opensearch/cat/thread_pool/ThreadPoolSize.java | 4 ---- .../client/opensearch/cluster/AllocationExplainRequest.java | 4 ---- .../client/opensearch/cluster/AllocationExplainResponse.java | 4 ---- .../client/opensearch/cluster/ClusterStatsRequest.java | 4 ---- .../client/opensearch/cluster/ClusterStatsResponse.java | 4 ---- .../client/opensearch/cluster/ComponentTemplate.java | 4 ---- .../client/opensearch/cluster/ComponentTemplateNode.java | 4 ---- .../client/opensearch/cluster/ComponentTemplateSummary.java | 4 ---- .../opensearch/cluster/DeleteComponentTemplateRequest.java | 4 ---- .../opensearch/cluster/DeleteComponentTemplateResponse.java | 4 ---- .../cluster/DeleteVotingConfigExclusionsRequest.java | 4 ---- .../cluster/DeleteVotingConfigExclusionsResponse.java | 4 ---- .../opensearch/cluster/ExistsComponentTemplateRequest.java | 4 ---- .../opensearch/cluster/ExistsComponentTemplateResponse.java | 4 ---- .../client/opensearch/cluster/GetClusterSettingsRequest.java | 4 ---- .../client/opensearch/cluster/GetClusterSettingsResponse.java | 4 ---- .../opensearch/cluster/GetComponentTemplateRequest.java | 4 ---- .../opensearch/cluster/GetComponentTemplateResponse.java | 4 ---- .../opensearch/client/opensearch/cluster/HealthRequest.java | 4 ---- .../opensearch/client/opensearch/cluster/HealthResponse.java | 4 ---- .../opensearch/cluster/OpenSearchClusterAsyncClient.java | 4 ---- .../client/opensearch/cluster/OpenSearchClusterClient.java | 4 ---- .../client/opensearch/cluster/PendingTasksRequest.java | 4 ---- .../client/opensearch/cluster/PendingTasksResponse.java | 4 ---- .../opensearch/cluster/PostVotingConfigExclusionsRequest.java | 4 ---- .../cluster/PostVotingConfigExclusionsResponse.java | 4 ---- .../client/opensearch/cluster/PutClusterSettingsRequest.java | 4 ---- .../client/opensearch/cluster/PutClusterSettingsResponse.java | 4 ---- .../opensearch/cluster/PutComponentTemplateRequest.java | 4 ---- .../opensearch/cluster/PutComponentTemplateResponse.java | 4 ---- .../client/opensearch/cluster/RemoteInfoRequest.java | 4 ---- .../client/opensearch/cluster/RemoteInfoResponse.java | 4 ---- .../opensearch/client/opensearch/cluster/RerouteRequest.java | 4 ---- .../opensearch/client/opensearch/cluster/RerouteResponse.java | 4 ---- .../opensearch/client/opensearch/cluster/StateRequest.java | 4 ---- .../opensearch/client/opensearch/cluster/StateResponse.java | 4 ---- .../cluster/allocation_explain/AllocationDecision.java | 4 ---- .../cluster/allocation_explain/AllocationExplainDecision.java | 4 ---- .../cluster/allocation_explain/AllocationStore.java | 4 ---- .../opensearch/cluster/allocation_explain/ClusterInfo.java | 4 ---- .../opensearch/cluster/allocation_explain/CurrentNode.java | 4 ---- .../opensearch/cluster/allocation_explain/Decision.java | 4 ---- .../opensearch/cluster/allocation_explain/DiskUsage.java | 4 ---- .../cluster/allocation_explain/NodeAllocationExplanation.java | 4 ---- .../opensearch/cluster/allocation_explain/NodeDiskUsage.java | 4 ---- .../opensearch/cluster/allocation_explain/ReservedSize.java | 4 ---- .../cluster/allocation_explain/UnassignedInformation.java | 4 ---- .../allocation_explain/UnassignedInformationReason.java | 4 ---- .../client/opensearch/cluster/health/IndexHealthStats.java | 4 ---- .../client/opensearch/cluster/health/ShardHealthStats.java | 4 ---- .../client/opensearch/cluster/pending_tasks/PendingTask.java | 4 ---- .../opensearch/cluster/remote_info/ClusterRemoteInfo.java | 4 ---- .../cluster/remote_info/ClusterRemoteInfoBuilders.java | 4 ---- .../cluster/remote_info/ClusterRemoteInfoVariant.java | 4 ---- .../cluster/remote_info/ClusterRemoteProxyInfo.java | 4 ---- .../cluster/remote_info/ClusterRemoteSniffInfo.java | 4 ---- .../opensearch/client/opensearch/cluster/reroute/Command.java | 4 ---- .../cluster/reroute/CommandAllocatePrimaryAction.java | 4 ---- .../cluster/reroute/CommandAllocateReplicaAction.java | 4 ---- .../opensearch/cluster/reroute/CommandCancelAction.java | 4 ---- .../client/opensearch/cluster/reroute/CommandMoveAction.java | 4 ---- .../client/opensearch/cluster/reroute/RerouteDecision.java | 4 ---- .../client/opensearch/cluster/reroute/RerouteExplanation.java | 4 ---- .../client/opensearch/cluster/reroute/RerouteParameters.java | 4 ---- .../client/opensearch/cluster/stats/CharFilterTypes.java | 4 ---- .../client/opensearch/cluster/stats/ClusterFileSystem.java | 4 ---- .../client/opensearch/cluster/stats/ClusterIndices.java | 4 ---- .../client/opensearch/cluster/stats/ClusterIndicesShards.java | 4 ---- .../opensearch/cluster/stats/ClusterIndicesShardsIndex.java | 4 ---- .../client/opensearch/cluster/stats/ClusterIngest.java | 4 ---- .../client/opensearch/cluster/stats/ClusterJvm.java | 4 ---- .../client/opensearch/cluster/stats/ClusterJvmMemory.java | 4 ---- .../client/opensearch/cluster/stats/ClusterJvmVersion.java | 4 ---- .../client/opensearch/cluster/stats/ClusterNetworkTypes.java | 4 ---- .../client/opensearch/cluster/stats/ClusterNodeCount.java | 4 ---- .../client/opensearch/cluster/stats/ClusterNodes.java | 4 ---- .../opensearch/cluster/stats/ClusterOperatingSystem.java | 4 ---- .../cluster/stats/ClusterOperatingSystemArchitecture.java | 4 ---- .../opensearch/cluster/stats/ClusterOperatingSystemName.java | 4 ---- .../cluster/stats/ClusterOperatingSystemPrettyName.java | 4 ---- .../client/opensearch/cluster/stats/ClusterProcess.java | 4 ---- .../client/opensearch/cluster/stats/ClusterProcessCpu.java | 4 ---- .../cluster/stats/ClusterProcessOpenFileDescriptors.java | 4 ---- .../client/opensearch/cluster/stats/ClusterProcessor.java | 4 ---- .../client/opensearch/cluster/stats/ClusterShardMetrics.java | 4 ---- .../client/opensearch/cluster/stats/FieldTypes.java | 4 ---- .../client/opensearch/cluster/stats/FieldTypesMappings.java | 4 ---- .../client/opensearch/cluster/stats/IndicesVersions.java | 4 ---- .../client/opensearch/cluster/stats/NodePackagingType.java | 4 ---- .../opensearch/cluster/stats/OperatingSystemMemoryInfo.java | 4 ---- .../client/opensearch/cluster/stats/RuntimeFieldTypes.java | 4 ---- .../org/opensearch/client/opensearch/core/BulkRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/BulkResponse.java | 4 ---- .../opensearch/client/opensearch/core/ClearScrollRequest.java | 4 ---- .../client/opensearch/core/ClearScrollResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/CountRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/CountResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/CreateRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/CreateResponse.java | 4 ---- .../client/opensearch/core/DeleteByQueryRequest.java | 4 ---- .../client/opensearch/core/DeleteByQueryResponse.java | 4 ---- .../opensearch/core/DeleteByQueryRethrottleRequest.java | 4 ---- .../opensearch/core/DeleteByQueryRethrottleResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/DeleteRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/DeleteResponse.java | 4 ---- .../client/opensearch/core/DeleteScriptRequest.java | 4 ---- .../client/opensearch/core/DeleteScriptResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/ExistsRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/ExistsResponse.java | 4 ---- .../client/opensearch/core/ExistsSourceRequest.java | 4 ---- .../client/opensearch/core/ExistsSourceResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/ExplainRequest.java | 4 ---- .../opensearch/client/opensearch/core/ExplainResponse.java | 4 ---- .../opensearch/client/opensearch/core/FieldCapsRequest.java | 4 ---- .../opensearch/client/opensearch/core/FieldCapsResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/GetRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/GetResponse.java | 4 ---- .../client/opensearch/core/GetScriptContextRequest.java | 4 ---- .../client/opensearch/core/GetScriptContextResponse.java | 4 ---- .../client/opensearch/core/GetScriptLanguagesRequest.java | 4 ---- .../client/opensearch/core/GetScriptLanguagesResponse.java | 4 ---- .../opensearch/client/opensearch/core/GetScriptRequest.java | 4 ---- .../opensearch/client/opensearch/core/GetScriptResponse.java | 4 ---- .../opensearch/client/opensearch/core/GetSourceRequest.java | 4 ---- .../opensearch/client/opensearch/core/GetSourceResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/IndexRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/IndexResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/InfoRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/InfoResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/MgetRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/MgetResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/MsearchRequest.java | 4 ---- .../opensearch/client/opensearch/core/MsearchResponse.java | 4 ---- .../client/opensearch/core/MsearchTemplateRequest.java | 4 ---- .../client/opensearch/core/MsearchTemplateResponse.java | 4 ---- .../client/opensearch/core/MtermvectorsRequest.java | 4 ---- .../client/opensearch/core/MtermvectorsResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/PingRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/PingResponse.java | 4 ---- .../opensearch/client/opensearch/core/PutScriptRequest.java | 4 ---- .../opensearch/client/opensearch/core/PutScriptResponse.java | 4 ---- .../opensearch/client/opensearch/core/RankEvalRequest.java | 4 ---- .../opensearch/client/opensearch/core/RankEvalResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/ReindexRequest.java | 4 ---- .../opensearch/client/opensearch/core/ReindexResponse.java | 4 ---- .../client/opensearch/core/ReindexRethrottleRequest.java | 4 ---- .../client/opensearch/core/ReindexRethrottleResponse.java | 4 ---- .../client/opensearch/core/RenderSearchTemplateRequest.java | 4 ---- .../client/opensearch/core/RenderSearchTemplateResponse.java | 4 ---- .../client/opensearch/core/ScriptsPainlessExecuteRequest.java | 4 ---- .../opensearch/core/ScriptsPainlessExecuteResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/ScrollRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/ScrollResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/SearchRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/SearchResponse.java | 4 ---- .../client/opensearch/core/SearchShardsRequest.java | 4 ---- .../client/opensearch/core/SearchShardsResponse.java | 4 ---- .../client/opensearch/core/SearchTemplateRequest.java | 4 ---- .../client/opensearch/core/SearchTemplateResponse.java | 4 ---- .../opensearch/client/opensearch/core/TermsEnumRequest.java | 4 ---- .../opensearch/client/opensearch/core/TermsEnumResponse.java | 4 ---- .../opensearch/client/opensearch/core/TermvectorsRequest.java | 4 ---- .../client/opensearch/core/TermvectorsResponse.java | 4 ---- .../client/opensearch/core/UpdateByQueryRequest.java | 4 ---- .../client/opensearch/core/UpdateByQueryResponse.java | 4 ---- .../opensearch/core/UpdateByQueryRethrottleRequest.java | 4 ---- .../opensearch/core/UpdateByQueryRethrottleResponse.java | 4 ---- .../org/opensearch/client/opensearch/core/UpdateRequest.java | 4 ---- .../org/opensearch/client/opensearch/core/UpdateResponse.java | 4 ---- .../opensearch/client/opensearch/core/bulk/BulkOperation.java | 4 ---- .../client/opensearch/core/bulk/BulkOperationBase.java | 4 ---- .../client/opensearch/core/bulk/BulkOperationBuilders.java | 4 ---- .../client/opensearch/core/bulk/BulkOperationVariant.java | 4 ---- .../client/opensearch/core/bulk/BulkResponseItem.java | 4 ---- .../client/opensearch/core/bulk/CreateOperation.java | 4 ---- .../client/opensearch/core/bulk/DeleteOperation.java | 4 ---- .../client/opensearch/core/bulk/IndexOperation.java | 4 ---- .../opensearch/client/opensearch/core/bulk/OperationType.java | 4 ---- .../client/opensearch/core/bulk/UpdateOperation.java | 4 ---- .../client/opensearch/core/bulk/WriteOperation.java | 4 ---- .../client/opensearch/core/explain/Explanation.java | 4 ---- .../client/opensearch/core/explain/ExplanationDetail.java | 4 ---- .../client/opensearch/core/field_caps/FieldCapability.java | 4 ---- .../org/opensearch/client/opensearch/core/get/GetResult.java | 4 ---- .../client/opensearch/core/get_script_context/Context.java | 4 ---- .../opensearch/core/get_script_context/ContextMethod.java | 4 ---- .../core/get_script_context/ContextMethodParam.java | 4 ---- .../opensearch/core/get_script_languages/LanguageContext.java | 4 ---- .../opensearch/client/opensearch/core/mget/MultiGetError.java | 4 ---- .../client/opensearch/core/mget/MultiGetOperation.java | 4 ---- .../client/opensearch/core/mget/MultiGetResponseItem.java | 4 ---- .../opensearch/core/mget/MultiGetResponseItemBuilders.java | 4 ---- .../client/opensearch/core/msearch/MultiSearchItem.java | 4 ---- .../opensearch/core/msearch/MultiSearchResponseItem.java | 4 ---- .../core/msearch/MultiSearchResponseItemBuilders.java | 4 ---- .../client/opensearch/core/msearch/MultiSearchResult.java | 4 ---- .../client/opensearch/core/msearch/MultisearchBody.java | 4 ---- .../client/opensearch/core/msearch/MultisearchHeader.java | 4 ---- .../client/opensearch/core/msearch/RequestItem.java | 4 ---- .../client/opensearch/core/msearch_template/RequestItem.java | 4 ---- .../opensearch/core/msearch_template/TemplateConfig.java | 4 ---- .../core/mtermvectors/MultiTermVectorsOperation.java | 4 ---- .../opensearch/core/mtermvectors/MultiTermVectorsResult.java | 4 ---- .../client/opensearch/core/rank_eval/DocumentRating.java | 4 ---- .../client/opensearch/core/rank_eval/RankEvalHit.java | 4 ---- .../client/opensearch/core/rank_eval/RankEvalHitItem.java | 4 ---- .../client/opensearch/core/rank_eval/RankEvalMetric.java | 4 ---- .../client/opensearch/core/rank_eval/RankEvalMetricBase.java | 4 ---- .../opensearch/core/rank_eval/RankEvalMetricDetail.java | 4 ---- .../rank_eval/RankEvalMetricDiscountedCumulativeGain.java | 4 ---- .../core/rank_eval/RankEvalMetricExpectedReciprocalRank.java | 4 ---- .../core/rank_eval/RankEvalMetricMeanReciprocalRank.java | 4 ---- .../opensearch/core/rank_eval/RankEvalMetricPrecision.java | 4 ---- .../core/rank_eval/RankEvalMetricRatingTreshold.java | 4 ---- .../opensearch/core/rank_eval/RankEvalMetricRecall.java | 4 ---- .../client/opensearch/core/rank_eval/RankEvalQuery.java | 4 ---- .../client/opensearch/core/rank_eval/RankEvalRequestItem.java | 4 ---- .../client/opensearch/core/rank_eval/UnratedDocument.java | 4 ---- .../client/opensearch/core/reindex/Destination.java | 4 ---- .../client/opensearch/core/reindex/RemoteSource.java | 4 ---- .../org/opensearch/client/opensearch/core/reindex/Source.java | 4 ---- .../opensearch/core/reindex_rethrottle/ReindexNode.java | 4 ---- .../opensearch/core/reindex_rethrottle/ReindexStatus.java | 4 ---- .../opensearch/core/reindex_rethrottle/ReindexTask.java | 4 ---- .../core/scripts_painless_execute/PainlessContextSetup.java | 4 ---- .../client/opensearch/core/search/AggregationBreakdown.java | 4 ---- .../client/opensearch/core/search/AggregationProfile.java | 4 ---- .../opensearch/core/search/AggregationProfileDebug.java | 4 ---- .../core/search/AggregationProfileDelegateDebug.java | 4 ---- .../core/search/AggregationProfileDelegateDebugFilter.java | 4 ---- .../client/opensearch/core/search/BoundaryScanner.java | 4 ---- .../client/opensearch/core/search/BuiltinHighlighterType.java | 4 ---- .../opensearch/client/opensearch/core/search/Collector.java | 4 ---- .../client/opensearch/core/search/CompletionContext.java | 4 ---- .../opensearch/core/search/CompletionSuggestOption.java | 4 ---- .../client/opensearch/core/search/CompletionSuggester.java | 4 ---- .../org/opensearch/client/opensearch/core/search/Context.java | 4 ---- .../client/opensearch/core/search/ContextBuilders.java | 4 ---- .../client/opensearch/core/search/DirectGenerator.java | 4 ---- .../client/opensearch/core/search/FetchProfile.java | 4 ---- .../client/opensearch/core/search/FetchProfileBreakdown.java | 4 ---- .../client/opensearch/core/search/FetchProfileDebug.java | 4 ---- .../client/opensearch/core/search/FieldCollapse.java | 4 ---- .../client/opensearch/core/search/FieldSuggester.java | 4 ---- .../client/opensearch/core/search/FieldSuggesterBuilders.java | 4 ---- .../client/opensearch/core/search/FieldSuggesterVariant.java | 4 ---- .../opensearch/client/opensearch/core/search/Highlight.java | 4 ---- .../client/opensearch/core/search/HighlightField.java | 4 ---- .../client/opensearch/core/search/HighlighterEncoder.java | 4 ---- .../client/opensearch/core/search/HighlighterFragmenter.java | 4 ---- .../client/opensearch/core/search/HighlighterOrder.java | 4 ---- .../client/opensearch/core/search/HighlighterTagsSchema.java | 4 ---- .../client/opensearch/core/search/HighlighterType.java | 4 ---- .../opensearch/core/search/HighlighterTypeBuilders.java | 4 ---- .../org/opensearch/client/opensearch/core/search/Hit.java | 4 ---- .../client/opensearch/core/search/HitsMetadata.java | 4 ---- .../opensearch/client/opensearch/core/search/InnerHits.java | 4 ---- .../client/opensearch/core/search/InnerHitsResult.java | 4 ---- .../client/opensearch/core/search/LaplaceSmoothingModel.java | 4 ---- .../core/search/LinearInterpolationSmoothingModel.java | 4 ---- .../client/opensearch/core/search/NestedIdentity.java | 4 ---- .../client/opensearch/core/search/PhraseSuggestCollate.java | 4 ---- .../opensearch/core/search/PhraseSuggestCollateQuery.java | 4 ---- .../client/opensearch/core/search/PhraseSuggestHighlight.java | 4 ---- .../client/opensearch/core/search/PhraseSuggestOption.java | 4 ---- .../client/opensearch/core/search/PhraseSuggester.java | 4 ---- .../org/opensearch/client/opensearch/core/search/Profile.java | 4 ---- .../client/opensearch/core/search/QueryBreakdown.java | 4 ---- .../client/opensearch/core/search/QueryProfile.java | 4 ---- .../org/opensearch/client/opensearch/core/search/Rescore.java | 4 ---- .../client/opensearch/core/search/RescoreQuery.java | 4 ---- .../opensearch/client/opensearch/core/search/ScoreMode.java | 4 ---- .../client/opensearch/core/search/SearchProfile.java | 4 ---- .../client/opensearch/core/search/ShardProfile.java | 4 ---- .../client/opensearch/core/search/SmoothingModel.java | 4 ---- .../client/opensearch/core/search/SmoothingModelBuilders.java | 4 ---- .../client/opensearch/core/search/SmoothingModelVariant.java | 4 ---- .../client/opensearch/core/search/SourceConfig.java | 4 ---- .../client/opensearch/core/search/SourceConfigBuilders.java | 4 ---- .../client/opensearch/core/search/SourceConfigParam.java | 4 ---- .../opensearch/core/search/SourceConfigParamBuilders.java | 4 ---- .../client/opensearch/core/search/SourceFilter.java | 4 ---- .../client/opensearch/core/search/StringDistance.java | 4 ---- .../opensearch/core/search/StupidBackoffSmoothingModel.java | 4 ---- .../org/opensearch/client/opensearch/core/search/Suggest.java | 4 ---- .../opensearch/client/opensearch/core/search/SuggestBase.java | 4 ---- .../client/opensearch/core/search/SuggestFuzziness.java | 4 ---- .../client/opensearch/core/search/SuggestOptionBuilders.java | 4 ---- .../opensearch/client/opensearch/core/search/SuggestSort.java | 4 ---- .../opensearch/client/opensearch/core/search/Suggester.java | 4 ---- .../client/opensearch/core/search/SuggesterBase.java | 4 ---- .../client/opensearch/core/search/TermSuggestOption.java | 4 ---- .../client/opensearch/core/search/TermSuggester.java | 4 ---- .../opensearch/client/opensearch/core/search/TotalHits.java | 4 ---- .../client/opensearch/core/search/TotalHitsRelation.java | 4 ---- .../opensearch/client/opensearch/core/search/TrackHits.java | 4 ---- .../client/opensearch/core/search/TrackHitsBuilders.java | 4 ---- .../client/opensearch/core/search_shards/ShardStoreIndex.java | 4 ---- .../client/opensearch/core/termvectors/FieldStatistics.java | 4 ---- .../opensearch/client/opensearch/core/termvectors/Filter.java | 4 ---- .../opensearch/client/opensearch/core/termvectors/Term.java | 4 ---- .../client/opensearch/core/termvectors/TermVector.java | 4 ---- .../opensearch/client/opensearch/core/termvectors/Token.java | 4 ---- .../UpdateByQueryRethrottleNode.java | 4 ---- .../dangling_indices/DeleteDanglingIndexRequest.java | 4 ---- .../dangling_indices/DeleteDanglingIndexResponse.java | 4 ---- .../dangling_indices/ImportDanglingIndexRequest.java | 4 ---- .../dangling_indices/ImportDanglingIndexResponse.java | 4 ---- .../dangling_indices/ListDanglingIndicesRequest.java | 4 ---- .../dangling_indices/ListDanglingIndicesResponse.java | 4 ---- .../OpenSearchDanglingIndicesAsyncClient.java | 4 ---- .../dangling_indices/OpenSearchDanglingIndicesClient.java | 4 ---- .../dangling_indices/list_dangling_indices/DanglingIndex.java | 4 ---- .../org/opensearch/client/opensearch/features/Feature.java | 4 ---- .../client/opensearch/features/GetFeaturesRequest.java | 4 ---- .../client/opensearch/features/GetFeaturesResponse.java | 4 ---- .../opensearch/features/OpenSearchFeaturesAsyncClient.java | 4 ---- .../client/opensearch/features/OpenSearchFeaturesClient.java | 4 ---- .../client/opensearch/features/ResetFeaturesRequest.java | 4 ---- .../client/opensearch/features/ResetFeaturesResponse.java | 4 ---- .../opensearch/client/opensearch/indices/AddBlockRequest.java | 4 ---- .../client/opensearch/indices/AddBlockResponse.java | 4 ---- .../java/org/opensearch/client/opensearch/indices/Alias.java | 4 ---- .../opensearch/client/opensearch/indices/AliasDefinition.java | 4 ---- .../opensearch/client/opensearch/indices/AnalyzeRequest.java | 4 ---- .../opensearch/client/opensearch/indices/AnalyzeResponse.java | 4 ---- .../client/opensearch/indices/ClearCacheRequest.java | 4 ---- .../client/opensearch/indices/ClearCacheResponse.java | 4 ---- .../client/opensearch/indices/CloneIndexRequest.java | 4 ---- .../client/opensearch/indices/CloneIndexResponse.java | 4 ---- .../client/opensearch/indices/CloseIndexRequest.java | 4 ---- .../client/opensearch/indices/CloseIndexResponse.java | 4 ---- .../client/opensearch/indices/CreateIndexRequest.java | 4 ---- .../client/opensearch/indices/CreateIndexResponse.java | 4 ---- .../org/opensearch/client/opensearch/indices/DataStream.java | 4 ---- .../client/opensearch/indices/DeleteAliasRequest.java | 4 ---- .../client/opensearch/indices/DeleteAliasResponse.java | 4 ---- .../client/opensearch/indices/DeleteIndexRequest.java | 4 ---- .../client/opensearch/indices/DeleteIndexResponse.java | 4 ---- .../client/opensearch/indices/DeleteIndexTemplateRequest.java | 4 ---- .../opensearch/indices/DeleteIndexTemplateResponse.java | 4 ---- .../client/opensearch/indices/DeleteTemplateRequest.java | 4 ---- .../client/opensearch/indices/DeleteTemplateResponse.java | 4 ---- .../client/opensearch/indices/DiskUsageRequest.java | 4 ---- .../client/opensearch/indices/DiskUsageResponse.java | 4 ---- .../client/opensearch/indices/ExistsAliasRequest.java | 4 ---- .../client/opensearch/indices/ExistsAliasResponse.java | 4 ---- .../client/opensearch/indices/ExistsIndexTemplateRequest.java | 4 ---- .../opensearch/indices/ExistsIndexTemplateResponse.java | 4 ---- .../opensearch/client/opensearch/indices/ExistsRequest.java | 4 ---- .../opensearch/client/opensearch/indices/ExistsResponse.java | 4 ---- .../client/opensearch/indices/ExistsTemplateRequest.java | 4 ---- .../client/opensearch/indices/ExistsTemplateResponse.java | 4 ---- .../client/opensearch/indices/FielddataFrequencyFilter.java | 4 ---- .../opensearch/client/opensearch/indices/FlushRequest.java | 4 ---- .../opensearch/client/opensearch/indices/FlushResponse.java | 4 ---- .../client/opensearch/indices/ForcemergeRequest.java | 4 ---- .../client/opensearch/indices/ForcemergeResponse.java | 4 ---- .../opensearch/client/opensearch/indices/GetAliasRequest.java | 4 ---- .../client/opensearch/indices/GetAliasResponse.java | 4 ---- .../client/opensearch/indices/GetFieldMappingRequest.java | 4 ---- .../client/opensearch/indices/GetFieldMappingResponse.java | 4 ---- .../opensearch/client/opensearch/indices/GetIndexRequest.java | 4 ---- .../client/opensearch/indices/GetIndexResponse.java | 4 ---- .../client/opensearch/indices/GetIndexTemplateRequest.java | 4 ---- .../client/opensearch/indices/GetIndexTemplateResponse.java | 4 ---- .../client/opensearch/indices/GetIndicesSettingsRequest.java | 4 ---- .../client/opensearch/indices/GetIndicesSettingsResponse.java | 4 ---- .../client/opensearch/indices/GetMappingRequest.java | 4 ---- .../client/opensearch/indices/GetMappingResponse.java | 4 ---- .../client/opensearch/indices/GetTemplateRequest.java | 4 ---- .../client/opensearch/indices/GetTemplateResponse.java | 4 ---- .../client/opensearch/indices/GetUpgradeRequest.java | 4 ---- .../client/opensearch/indices/GetUpgradeResponse.java | 4 ---- .../client/opensearch/indices/IndexCheckOnStartup.java | 4 ---- .../opensearch/client/opensearch/indices/IndexRouting.java | 4 ---- .../client/opensearch/indices/IndexRoutingAllocation.java | 4 ---- .../client/opensearch/indices/IndexRoutingAllocationDisk.java | 4 ---- .../opensearch/indices/IndexRoutingAllocationInclude.java | 4 ---- .../indices/IndexRoutingAllocationInitialRecovery.java | 4 ---- .../opensearch/indices/IndexRoutingAllocationOptions.java | 4 ---- .../client/opensearch/indices/IndexRoutingRebalance.java | 4 ---- .../opensearch/indices/IndexRoutingRebalanceOptions.java | 4 ---- .../client/opensearch/indices/IndexSegmentSort.java | 4 ---- .../client/opensearch/indices/IndexSettingBlocks.java | 4 ---- .../opensearch/client/opensearch/indices/IndexSettings.java | 4 ---- .../client/opensearch/indices/IndexSettingsAnalysis.java | 4 ---- .../org/opensearch/client/opensearch/indices/IndexState.java | 4 ---- .../opensearch/client/opensearch/indices/IndexVersioning.java | 4 ---- .../client/opensearch/indices/IndicesStatsRequest.java | 4 ---- .../client/opensearch/indices/IndicesStatsResponse.java | 4 ---- .../client/opensearch/indices/NumericFielddata.java | 4 ---- .../client/opensearch/indices/NumericFielddataFormat.java | 4 ---- .../org/opensearch/client/opensearch/indices/OpenRequest.java | 4 ---- .../opensearch/client/opensearch/indices/OpenResponse.java | 4 ---- .../opensearch/indices/OpenSearchIndicesAsyncClient.java | 4 ---- .../client/opensearch/indices/OpenSearchIndicesClient.java | 4 ---- .../client/opensearch/indices/OverlappingIndexTemplate.java | 4 ---- .../opensearch/client/opensearch/indices/PutAliasRequest.java | 4 ---- .../client/opensearch/indices/PutAliasResponse.java | 4 ---- .../client/opensearch/indices/PutIndexTemplateRequest.java | 4 ---- .../client/opensearch/indices/PutIndexTemplateResponse.java | 4 ---- .../client/opensearch/indices/PutIndicesSettingsRequest.java | 4 ---- .../client/opensearch/indices/PutIndicesSettingsResponse.java | 4 ---- .../client/opensearch/indices/PutMappingRequest.java | 4 ---- .../client/opensearch/indices/PutMappingResponse.java | 4 ---- .../client/opensearch/indices/PutTemplateRequest.java | 4 ---- .../client/opensearch/indices/PutTemplateResponse.java | 4 ---- .../opensearch/client/opensearch/indices/RecoveryRequest.java | 4 ---- .../client/opensearch/indices/RecoveryResponse.java | 4 ---- .../opensearch/client/opensearch/indices/RefreshRequest.java | 4 ---- .../opensearch/client/opensearch/indices/RefreshResponse.java | 4 ---- .../client/opensearch/indices/ResolveIndexRequest.java | 4 ---- .../client/opensearch/indices/ResolveIndexResponse.java | 4 ---- .../opensearch/client/opensearch/indices/RolloverRequest.java | 4 ---- .../client/opensearch/indices/RolloverResponse.java | 4 ---- .../client/opensearch/indices/SegmentSortMissing.java | 4 ---- .../opensearch/client/opensearch/indices/SegmentSortMode.java | 4 ---- .../client/opensearch/indices/SegmentSortOrder.java | 4 ---- .../opensearch/client/opensearch/indices/SegmentsRequest.java | 4 ---- .../client/opensearch/indices/SegmentsResponse.java | 4 ---- .../client/opensearch/indices/ShardStoresRequest.java | 4 ---- .../client/opensearch/indices/ShardStoresResponse.java | 4 ---- .../opensearch/client/opensearch/indices/ShrinkRequest.java | 4 ---- .../opensearch/client/opensearch/indices/ShrinkResponse.java | 4 ---- .../opensearch/indices/SimulateIndexTemplateRequest.java | 4 ---- .../opensearch/indices/SimulateIndexTemplateResponse.java | 4 ---- .../client/opensearch/indices/SimulateTemplateRequest.java | 4 ---- .../client/opensearch/indices/SimulateTemplateResponse.java | 4 ---- .../org/opensearch/client/opensearch/indices/SoftDeletes.java | 4 ---- .../opensearch/client/opensearch/indices/SplitRequest.java | 4 ---- .../opensearch/client/opensearch/indices/SplitResponse.java | 4 ---- .../opensearch/client/opensearch/indices/TemplateMapping.java | 4 ---- .../client/opensearch/indices/UpdateAliasesRequest.java | 4 ---- .../client/opensearch/indices/UpdateAliasesResponse.java | 4 ---- .../opensearch/client/opensearch/indices/UpgradeRequest.java | 4 ---- .../opensearch/client/opensearch/indices/UpgradeResponse.java | 4 ---- .../client/opensearch/indices/ValidateQueryRequest.java | 4 ---- .../client/opensearch/indices/ValidateQueryResponse.java | 4 ---- .../opensearch/indices/add_block/IndicesBlockOptions.java | 4 ---- .../opensearch/indices/add_block/IndicesBlockStatus.java | 4 ---- .../client/opensearch/indices/analyze/AnalyzeDetail.java | 4 ---- .../client/opensearch/indices/analyze/AnalyzeToken.java | 4 ---- .../client/opensearch/indices/analyze/AnalyzerDetail.java | 4 ---- .../client/opensearch/indices/analyze/CharFilterDetail.java | 4 ---- .../opensearch/indices/analyze/ExplainAnalyzeToken.java | 4 ---- .../client/opensearch/indices/analyze/TokenDetail.java | 4 ---- .../client/opensearch/indices/close/CloseIndexResult.java | 4 ---- .../client/opensearch/indices/close/CloseShardResult.java | 4 ---- .../client/opensearch/indices/get_alias/IndexAliases.java | 4 ---- .../indices/get_field_mapping/TypeFieldMappings.java | 4 ---- .../opensearch/indices/get_index_template/IndexTemplate.java | 4 ---- .../indices/get_index_template/IndexTemplateItem.java | 4 ---- .../indices/get_index_template/IndexTemplateSummary.java | 4 ---- .../opensearch/indices/get_mapping/IndexMappingRecord.java | 4 ---- .../indices/put_index_template/IndexTemplateMapping.java | 4 ---- .../client/opensearch/indices/recovery/FileDetails.java | 4 ---- .../client/opensearch/indices/recovery/RecoveryBytes.java | 4 ---- .../client/opensearch/indices/recovery/RecoveryFiles.java | 4 ---- .../opensearch/indices/recovery/RecoveryIndexStatus.java | 4 ---- .../client/opensearch/indices/recovery/RecoveryOrigin.java | 4 ---- .../opensearch/indices/recovery/RecoveryStartStatus.java | 4 ---- .../client/opensearch/indices/recovery/RecoveryStatus.java | 4 ---- .../client/opensearch/indices/recovery/ShardRecovery.java | 4 ---- .../client/opensearch/indices/recovery/TranslogStatus.java | 4 ---- .../client/opensearch/indices/recovery/VerifyIndex.java | 4 ---- .../indices/resolve_index/ResolveIndexAliasItem.java | 4 ---- .../opensearch/indices/resolve_index/ResolveIndexItem.java | 4 ---- .../opensearch/indices/rollover/IndexRolloverMapping.java | 4 ---- .../indices/rollover/IndexRolloverMappingBuilders.java | 4 ---- .../opensearch/indices/rollover/RolloverConditions.java | 4 ---- .../client/opensearch/indices/segments/IndexSegment.java | 4 ---- .../client/opensearch/indices/segments/Segment.java | 4 ---- .../opensearch/indices/segments/ShardSegmentRouting.java | 4 ---- .../client/opensearch/indices/segments/ShardsSegment.java | 4 ---- .../opensearch/indices/shard_stores/IndicesShardStores.java | 4 ---- .../client/opensearch/indices/shard_stores/ShardStore.java | 4 ---- .../opensearch/indices/shard_stores/ShardStoreAllocation.java | 4 ---- .../opensearch/indices/shard_stores/ShardStoreException.java | 4 ---- .../opensearch/indices/shard_stores/ShardStoreStatus.java | 4 ---- .../opensearch/indices/shard_stores/ShardStoreWrapper.java | 4 ---- .../opensearch/indices/simulate_template/Overlapping.java | 4 ---- .../client/opensearch/indices/simulate_template/Template.java | 4 ---- .../client/opensearch/indices/stats/IndexStats.java | 4 ---- .../client/opensearch/indices/stats/IndicesStats.java | 4 ---- .../client/opensearch/indices/stats/ShardCommit.java | 4 ---- .../client/opensearch/indices/stats/ShardFileSizeInfo.java | 4 ---- .../client/opensearch/indices/stats/ShardLease.java | 4 ---- .../opensearch/client/opensearch/indices/stats/ShardPath.java | 4 ---- .../client/opensearch/indices/stats/ShardQueryCache.java | 4 ---- .../client/opensearch/indices/stats/ShardRetentionLeases.java | 4 ---- .../client/opensearch/indices/stats/ShardRouting.java | 4 ---- .../client/opensearch/indices/stats/ShardRoutingState.java | 4 ---- .../client/opensearch/indices/stats/ShardSequenceNumber.java | 4 ---- .../client/opensearch/indices/stats/ShardStats.java | 4 ---- .../client/opensearch/indices/stats/ShardsTotalStats.java | 4 ---- .../client/opensearch/indices/update_aliases/Action.java | 4 ---- .../opensearch/indices/update_aliases/ActionBuilders.java | 4 ---- .../opensearch/indices/update_aliases/ActionVariant.java | 4 ---- .../client/opensearch/indices/update_aliases/AddAction.java | 4 ---- .../opensearch/indices/update_aliases/RemoveAction.java | 4 ---- .../opensearch/indices/update_aliases/RemoveIndexAction.java | 4 ---- .../indices/validate_query/IndicesValidationExplanation.java | 4 ---- .../opensearch/client/opensearch/ingest/AppendProcessor.java | 4 ---- .../client/opensearch/ingest/AttachmentProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/BytesProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/CircleProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/ConvertProcessor.java | 4 ---- .../org/opensearch/client/opensearch/ingest/ConvertType.java | 4 ---- .../org/opensearch/client/opensearch/ingest/CsvProcessor.java | 4 ---- .../client/opensearch/ingest/DateIndexNameProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/DateProcessor.java | 4 ---- .../client/opensearch/ingest/DeletePipelineRequest.java | 4 ---- .../client/opensearch/ingest/DeletePipelineResponse.java | 4 ---- .../opensearch/client/opensearch/ingest/DissectProcessor.java | 4 ---- .../client/opensearch/ingest/DotExpanderProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/DropProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/FailProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/ForeachProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/GeoIpProcessor.java | 4 ---- .../client/opensearch/ingest/GeoIpStatsRequest.java | 4 ---- .../client/opensearch/ingest/GeoIpStatsResponse.java | 4 ---- .../client/opensearch/ingest/GetPipelineRequest.java | 4 ---- .../client/opensearch/ingest/GetPipelineResponse.java | 4 ---- .../opensearch/client/opensearch/ingest/GrokProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/GsubProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/InferenceConfig.java | 4 ---- .../client/opensearch/ingest/InferenceConfigRegression.java | 4 ---- .../client/opensearch/ingest/InferenceProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/JoinProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/JsonProcessor.java | 4 ---- .../client/opensearch/ingest/KeyValueProcessor.java | 4 ---- .../client/opensearch/ingest/LowercaseProcessor.java | 4 ---- .../client/opensearch/ingest/OpenSearchIngestAsyncClient.java | 4 ---- .../client/opensearch/ingest/OpenSearchIngestClient.java | 4 ---- .../org/opensearch/client/opensearch/ingest/Pipeline.java | 4 ---- .../client/opensearch/ingest/PipelineProcessor.java | 4 ---- .../org/opensearch/client/opensearch/ingest/Processor.java | 4 ---- .../opensearch/client/opensearch/ingest/ProcessorBase.java | 4 ---- .../client/opensearch/ingest/ProcessorBuilders.java | 4 ---- .../client/opensearch/ingest/ProcessorGrokRequest.java | 4 ---- .../client/opensearch/ingest/ProcessorGrokResponse.java | 4 ---- .../opensearch/client/opensearch/ingest/ProcessorVariant.java | 4 ---- .../client/opensearch/ingest/PutPipelineRequest.java | 4 ---- .../client/opensearch/ingest/PutPipelineResponse.java | 4 ---- .../opensearch/client/opensearch/ingest/RemoveProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/RenameProcessor.java | 4 ---- .../org/opensearch/client/opensearch/ingest/SetProcessor.java | 4 ---- .../client/opensearch/ingest/SetSecurityUserProcessor.java | 4 ---- .../org/opensearch/client/opensearch/ingest/ShapeType.java | 4 ---- .../opensearch/client/opensearch/ingest/SimulateRequest.java | 4 ---- .../opensearch/client/opensearch/ingest/SimulateResponse.java | 4 ---- .../opensearch/client/opensearch/ingest/SortProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/SplitProcessor.java | 4 ---- .../opensearch/client/opensearch/ingest/TrimProcessor.java | 4 ---- .../client/opensearch/ingest/UppercaseProcessor.java | 4 ---- .../client/opensearch/ingest/UrlDecodeProcessor.java | 4 ---- .../client/opensearch/ingest/UserAgentProcessor.java | 4 ---- .../client/opensearch/ingest/UserAgentProperty.java | 4 ---- .../ingest/geo_ip_stats/GeoIpDownloadStatistics.java | 4 ---- .../opensearch/ingest/geo_ip_stats/GeoIpNodeDatabaseName.java | 4 ---- .../opensearch/ingest/geo_ip_stats/GeoIpNodeDatabases.java | 4 ---- .../client/opensearch/ingest/simulate/Document.java | 4 ---- .../client/opensearch/ingest/simulate/DocumentSimulation.java | 4 ---- .../opensearch/client/opensearch/ingest/simulate/Ingest.java | 4 ---- .../client/opensearch/ingest/simulate/PipelineSimulation.java | 4 ---- .../opensearch/client/opensearch/nodes/AdaptiveSelection.java | 4 ---- .../java/org/opensearch/client/opensearch/nodes/Breaker.java | 4 ---- .../main/java/org/opensearch/client/opensearch/nodes/Cpu.java | 4 ---- .../org/opensearch/client/opensearch/nodes/DataPathStats.java | 4 ---- .../client/opensearch/nodes/ExtendedMemoryStats.java | 4 ---- .../org/opensearch/client/opensearch/nodes/FileSystem.java | 4 ---- .../opensearch/client/opensearch/nodes/FileSystemTotal.java | 4 ---- .../opensearch/client/opensearch/nodes/GarbageCollector.java | 4 ---- .../client/opensearch/nodes/GarbageCollectorTotal.java | 4 ---- .../opensearch/client/opensearch/nodes/HotThreadsRequest.java | 4 ---- .../client/opensearch/nodes/HotThreadsResponse.java | 4 ---- .../java/org/opensearch/client/opensearch/nodes/Http.java | 4 ---- .../java/org/opensearch/client/opensearch/nodes/Ingest.java | 4 ---- .../org/opensearch/client/opensearch/nodes/IngestTotal.java | 4 ---- .../main/java/org/opensearch/client/opensearch/nodes/Jvm.java | 4 ---- .../org/opensearch/client/opensearch/nodes/JvmClasses.java | 4 ---- .../org/opensearch/client/opensearch/nodes/JvmThreads.java | 4 ---- .../opensearch/client/opensearch/nodes/KeyedProcessor.java | 4 ---- .../org/opensearch/client/opensearch/nodes/MemoryStats.java | 4 ---- .../opensearch/client/opensearch/nodes/NodeBufferPool.java | 4 ---- .../opensearch/client/opensearch/nodes/NodesInfoRequest.java | 4 ---- .../opensearch/client/opensearch/nodes/NodesInfoResponse.java | 4 ---- .../opensearch/client/opensearch/nodes/NodesResponseBase.java | 4 ---- .../opensearch/client/opensearch/nodes/NodesStatsRequest.java | 4 ---- .../client/opensearch/nodes/NodesStatsResponse.java | 4 ---- .../opensearch/client/opensearch/nodes/NodesUsageRequest.java | 4 ---- .../client/opensearch/nodes/NodesUsageResponse.java | 4 ---- .../client/opensearch/nodes/OpenSearchNodesAsyncClient.java | 4 ---- .../client/opensearch/nodes/OpenSearchNodesClient.java | 4 ---- .../opensearch/client/opensearch/nodes/OperatingSystem.java | 4 ---- .../java/org/opensearch/client/opensearch/nodes/Process.java | 4 ---- .../client/opensearch/nodes/ReloadSecureSettingsRequest.java | 4 ---- .../client/opensearch/nodes/ReloadSecureSettingsResponse.java | 4 ---- .../org/opensearch/client/opensearch/nodes/Scripting.java | 4 ---- .../java/org/opensearch/client/opensearch/nodes/Stats.java | 4 ---- .../org/opensearch/client/opensearch/nodes/ThreadCount.java | 4 ---- .../org/opensearch/client/opensearch/nodes/Transport.java | 4 ---- .../client/opensearch/nodes/hot_threads/HotThread.java | 4 ---- .../org/opensearch/client/opensearch/nodes/info/NodeInfo.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoAction.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoAggregation.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoBootstrap.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoClient.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoDiscover.java | 4 ---- .../opensearch/client/opensearch/nodes/info/NodeInfoHttp.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoIngest.java | 4 ---- .../opensearch/nodes/info/NodeInfoIngestDownloader.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoIngestInfo.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoIngestProcessor.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoJvmMemory.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoMemory.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoNetwork.java | 4 ---- .../opensearch/nodes/info/NodeInfoNetworkInterface.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoOSCPU.java | 4 ---- .../opensearch/client/opensearch/nodes/info/NodeInfoPath.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoRepositories.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoRepositoriesUrl.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoScript.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSearch.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSearchRemote.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSettings.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSettingsCluster.java | 4 ---- .../nodes/info/NodeInfoSettingsClusterElection.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSettingsHttp.java | 4 ---- .../opensearch/nodes/info/NodeInfoSettingsHttpType.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSettingsIngest.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSettingsNetwork.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoSettingsNode.java | 4 ---- .../opensearch/nodes/info/NodeInfoSettingsTransport.java | 4 ---- .../opensearch/nodes/info/NodeInfoSettingsTransportType.java | 4 ---- .../client/opensearch/nodes/info/NodeInfoTransport.java | 4 ---- .../opensearch/client/opensearch/nodes/info/NodeJvmInfo.java | 4 ---- .../client/opensearch/nodes/info/NodeOperatingSystemInfo.java | 4 ---- .../client/opensearch/nodes/info/NodeProcessInfo.java | 4 ---- .../client/opensearch/nodes/info/NodeThreadPoolInfo.java | 4 ---- .../nodes/reload_secure_settings/NodeReloadError.java | 4 ---- .../nodes/reload_secure_settings/NodeReloadResult.java | 4 ---- .../reload_secure_settings/NodeReloadResultBuilders.java | 4 ---- .../opensearch/client/opensearch/nodes/usage/NodeUsage.java | 4 ---- .../java/org/opensearch/client/opensearch/package-info.java | 4 ---- .../client/opensearch/shutdown/DeleteNodeRequest.java | 4 ---- .../client/opensearch/shutdown/DeleteNodeResponse.java | 4 ---- .../opensearch/client/opensearch/shutdown/GetNodeRequest.java | 4 ---- .../client/opensearch/shutdown/GetNodeResponse.java | 4 ---- .../opensearch/shutdown/OpenSearchShutdownAsyncClient.java | 4 ---- .../client/opensearch/shutdown/OpenSearchShutdownClient.java | 4 ---- .../opensearch/client/opensearch/shutdown/PutNodeRequest.java | 4 ---- .../client/opensearch/shutdown/PutNodeResponse.java | 4 ---- .../opensearch/shutdown/get_node/NodeShutdownStatus.java | 4 ---- .../opensearch/shutdown/get_node/PersistentTaskStatus.java | 4 ---- .../client/opensearch/shutdown/get_node/PluginsStatus.java | 4 ---- .../opensearch/shutdown/get_node/ShardMigrationStatus.java | 4 ---- .../client/opensearch/shutdown/get_node/ShutdownStatus.java | 4 ---- .../client/opensearch/shutdown/get_node/ShutdownType.java | 4 ---- .../client/opensearch/snapshot/CleanupRepositoryRequest.java | 4 ---- .../client/opensearch/snapshot/CleanupRepositoryResponse.java | 4 ---- .../client/opensearch/snapshot/CloneSnapshotRequest.java | 4 ---- .../client/opensearch/snapshot/CloneSnapshotResponse.java | 4 ---- .../client/opensearch/snapshot/CreateRepositoryRequest.java | 4 ---- .../client/opensearch/snapshot/CreateRepositoryResponse.java | 4 ---- .../client/opensearch/snapshot/CreateSnapshotRequest.java | 4 ---- .../client/opensearch/snapshot/CreateSnapshotResponse.java | 4 ---- .../client/opensearch/snapshot/DeleteRepositoryRequest.java | 4 ---- .../client/opensearch/snapshot/DeleteRepositoryResponse.java | 4 ---- .../client/opensearch/snapshot/DeleteSnapshotRequest.java | 4 ---- .../client/opensearch/snapshot/DeleteSnapshotResponse.java | 4 ---- .../client/opensearch/snapshot/FileCountSnapshotStats.java | 4 ---- .../client/opensearch/snapshot/GetRepositoryRequest.java | 4 ---- .../client/opensearch/snapshot/GetRepositoryResponse.java | 4 ---- .../client/opensearch/snapshot/GetSnapshotRequest.java | 4 ---- .../client/opensearch/snapshot/GetSnapshotResponse.java | 4 ---- .../opensearch/client/opensearch/snapshot/IndexDetails.java | 4 ---- .../client/opensearch/snapshot/InfoFeatureState.java | 4 ---- .../opensearch/snapshot/OpenSearchSnapshotAsyncClient.java | 4 ---- .../client/opensearch/snapshot/OpenSearchSnapshotClient.java | 4 ---- .../org/opensearch/client/opensearch/snapshot/Repository.java | 4 ---- .../client/opensearch/snapshot/RepositorySettings.java | 4 ---- .../opensearch/client/opensearch/snapshot/RestoreRequest.java | 4 ---- .../client/opensearch/snapshot/RestoreResponse.java | 4 ---- .../opensearch/client/opensearch/snapshot/ShardsStats.java | 4 ---- .../client/opensearch/snapshot/ShardsStatsStage.java | 4 ---- .../client/opensearch/snapshot/ShardsStatsSummary.java | 4 ---- .../client/opensearch/snapshot/ShardsStatsSummaryItem.java | 4 ---- .../client/opensearch/snapshot/SnapshotIndexStats.java | 4 ---- .../opensearch/client/opensearch/snapshot/SnapshotInfo.java | 4 ---- .../client/opensearch/snapshot/SnapshotShardFailure.java | 4 ---- .../client/opensearch/snapshot/SnapshotShardsStatus.java | 4 ---- .../opensearch/client/opensearch/snapshot/SnapshotStats.java | 4 ---- .../client/opensearch/snapshot/SnapshotStatusRequest.java | 4 ---- .../client/opensearch/snapshot/SnapshotStatusResponse.java | 4 ---- .../org/opensearch/client/opensearch/snapshot/Status.java | 4 ---- .../client/opensearch/snapshot/VerifyRepositoryRequest.java | 4 ---- .../client/opensearch/snapshot/VerifyRepositoryResponse.java | 4 ---- .../snapshot/cleanup_repository/CleanupRepositoryResults.java | 4 ---- .../client/opensearch/snapshot/get/SnapshotResponseItem.java | 4 ---- .../client/opensearch/snapshot/restore/SnapshotRestore.java | 4 ---- .../snapshot/verify_repository/CompactNodeInfo.java | 4 ---- .../org/opensearch/client/opensearch/tasks/CancelRequest.java | 4 ---- .../opensearch/client/opensearch/tasks/CancelResponse.java | 4 ---- .../opensearch/client/opensearch/tasks/GetTasksRequest.java | 4 ---- .../opensearch/client/opensearch/tasks/GetTasksResponse.java | 4 ---- .../java/org/opensearch/client/opensearch/tasks/GroupBy.java | 4 ---- .../java/org/opensearch/client/opensearch/tasks/Info.java | 4 ---- .../org/opensearch/client/opensearch/tasks/ListRequest.java | 4 ---- .../org/opensearch/client/opensearch/tasks/ListResponse.java | 4 ---- .../client/opensearch/tasks/OpenSearchTasksAsyncClient.java | 4 ---- .../client/opensearch/tasks/OpenSearchTasksClient.java | 4 ---- .../java/org/opensearch/client/opensearch/tasks/State.java | 4 ---- .../java/org/opensearch/client/opensearch/tasks/Status.java | 4 ---- .../opensearch/client/opensearch/tasks/TaskExecutingNode.java | 4 ---- .../opensearch/client/opensearch/watcher/HourAndMinute.java | 4 ---- .../org/opensearch/client/opensearch/watcher/TimeOfDay.java | 4 ---- .../client/opensearch/watcher/TimeOfDayBuilders.java | 4 ---- .../java/org/opensearch/client/util/ActionStatusOptions.java | 4 ---- 1443 files changed, 1 insertion(+), 5768 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86bbc0f51f..d34a35cbd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Deprecated ### Removed +- Remove generated code comments from all files ([#598](https://github.com/opensearch-project/opensearch-java/pull/598)) ### Fixed diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java index e6d5e3a35c..0aa60b542c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java index 12d3704293..801ff279df 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java index bd96f62932..548be19f3d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java index 534dcab79c..3fee84a10f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java index 3b0844005f..183b486e8c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java index 5e3fb0d913..6cf3fb2dd0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java index bb8301df89..5f3cf670f8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java index f18e23e939..1c3bd5fa9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java index 736cc49822..d375f28eab 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java index 18e1308dc4..7bd42f6bc9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java index d67b4de5e5..dd7db05815 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java index 71f67a45e5..89bfa132da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java index d6a13fac28..9cd3381b5b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java index 4294d63db2..a4de144e2f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java index 50be20a5e3..8baccedfaa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java index 8b4513cf82..c2b4b1cd13 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java index a3e63ec7dc..19d97fec9e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java index 200b8f1e6b..352063ee54 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java index 6e4b11f0bc..0802fbdaa5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java index 1712daae34..edb66f531e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java index dde62124ef..c9ab537e29 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.opensearch._types.mapping.FieldType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java index 6bd4a708af..776101e80c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java index 5768be9576..c5efb8350e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java index 9a281d4463..ea10424dd4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java index 1121776140..2747d47c4d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java index d3b430c712..7be1836e37 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java index d88419df30..5c8c63f16c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java index 1921118748..c08ae130a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java index 2a209ae8e9..f9b0266251 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java index e611c2743e..47ba815a26 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java index 76bb272a68..9ab1939d53 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java index db1421b611..1a635a467c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java index 6caa9c0b94..872218cbf2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java index 76fc712adc..41a8a107a0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java index 917115daf4..602c5f1ff8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java index a504b7151a..1098174b2b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java index 2a81ae66e2..42f595cb30 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java index ce1154ddea..371497cf65 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java index 4855743fff..85dd47c932 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java index 4e276f8667..3c72c61935 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java index e41a209a81..57ae78d5b1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java index 49d81d106e..f6aafdd58f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java index 75e4ec749f..d100024525 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java index 5fddb6249f..0987308078 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java index b57a8e214b..85e8b718e2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java index 6b60da03f0..d98b62be8a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java index bc66595a7e..b1f16ea6bb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java index e5dc784da0..53f19e7382 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java index e16d91babe..f00cbc9146 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java index c785bb3516..1c77110356 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.opensearch.cluster.allocation_explain.UnassignedInformation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java index a2c8bacd92..ea17496835 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java index a462e9c707..e415250039 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java index 2f0f645a4f..3995461826 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java index 9f9cbdc20c..d421b224fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java index 1de429133d..6b3df16c7e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java index e9167920b6..475d640048 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java index bbd1ccec70..190d4c62c5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java index 74032db07b..f811195f56 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java index 2017f5d127..bb57c5de8c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.util.ObjectBuilderBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java index b324630d5c..ace6ed3e06 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java index 02597e9133..6d2a026a12 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java index ec40fd5de1..677fbd2707 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java index 486075482a..5e1a86fc87 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java index bdef9edc12..0f6250be36 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBase.java index 43bfa5937d..dcf5f852fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBuilders.java index 609cef4c55..5cb07983a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptField.java index d57c030e9b..d4ad28e586 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSort.java index fc9ada65f7..63fc9a0cd6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSortType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSortType.java index a3cac6fd94..da34ce5f7a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSortType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScriptSortType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchStats.java index bd42e22a42..012281c83a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchType.java index 7498451b14..44d0142e7e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SearchType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SegmentsStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SegmentsStats.java index 6aa6cdf984..487c2a74b8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SegmentsStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SegmentsStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.opensearch.indices.stats.ShardFileSizeInfo; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardFailure.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardFailure.java index ca988b459a..29a2542c68 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardFailure.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardFailure.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardStatistics.java index c397b6d10a..f0d6308cc3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardStatistics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardsOperationResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardsOperationResponseBase.java index 13f593ddb8..05730bce87 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardsOperationResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ShardsOperationResponseBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SlicedScroll.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SlicedScroll.java index 244c5b102d..6cbe44655e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SlicedScroll.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SlicedScroll.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortMode.java index a5e0ef942f..4dce64b64f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptions.java index ada2c2f2c1..b29df51fde 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsBuilders.java index f9d06e72b3..766e1f595d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsVariant.java index bc53467598..5d7b6ed4a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOrder.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOrder.java index 9764852d61..2f894cbbbe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOrder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOrder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java index f1e14e7d8b..8c1c76379f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoreStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScript.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScript.java index f3c0c296ba..12ef3610e2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScript.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScript.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScriptId.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScriptId.java index 694040793c..1e4af7c740 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScriptId.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/StoredScriptId.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SuggestMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SuggestMode.java index c3726ea004..33800b640a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/SuggestMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/SuggestMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ThreadType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ThreadType.java index d5b4804ea1..dab1c9ba27 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ThreadType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ThreadType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Time.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Time.java index b45928e09f..d03ec3aab6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Time.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Time.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeBuilders.java index 57b0d71f9a..8ed743de95 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeUnit.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeUnit.java index acfc6b95b2..34eba452cb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeUnit.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TimeUnit.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java index dd40482159..b753e70f13 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java index 45829122d5..7e0fd8773c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TranslogStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TranslogStats.java index 32051d776a..07fe5551ac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TranslogStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/TranslogStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/VersionType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/VersionType.java index 1f705832c8..359b3dc477 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/VersionType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/VersionType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardOptions.java index 94815543de..27870a140c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShards.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShards.java index 25d146d26f..5908743308 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShards.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShards.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardsBuilders.java index d3931adcfc..147df6274f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForActiveShardsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForEvents.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForEvents.java index 6b59234b74..718f05315c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForEvents.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WaitForEvents.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WarmerStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WarmerStats.java index dce650291c..d239dd9007 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WarmerStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WarmerStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java index 5e7c487a8c..4c317e3daa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java index 3722339629..9e22f6e3c9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregate.java index e30bcdaa4e..311a428d78 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregation.java index 3d1087f895..7f92e20fd9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixBucket.java index 855f093b20..d50dac4a00 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AdjacencyMatrixBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java index e939ba13f5..106f822526 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.ExternallyTaggedUnion; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBase.java index 2e3d9d05e9..78bb5bc7d3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBuilders.java index 12e3427a30..5d7929b809 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateVariant.java index c592c17971..9aba988fb5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregateVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregation.java index c945d91f28..bef8fbd76c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Aggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBase.java index 9f17449289..c99c2e6e59 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBuilders.java index e1fda4a204..eac30ab4ec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationRange.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationRange.java index 18ace31070..7524abb7a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationRange.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationRange.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationVariant.java index 12e66428d7..6e0f4b6c3c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AggregationVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ArrayPercentilesItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ArrayPercentilesItem.java index 8b44f8dc82..f0f8d7b2bc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ArrayPercentilesItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ArrayPercentilesItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregate.java index 9cfdb062b7..2e4034c8dd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregation.java index 8ade24a652..32f7d08491 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AutoDateHistogramAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageAggregation.java index 61c7c2fd17..8b1d4da20b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageBucketAggregation.java index 96f6e287cc..4b1ec7b0df 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AverageBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AvgAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AvgAggregate.java index 2da314108d..16f7b2b1a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AvgAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/AvgAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxPlotAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxPlotAggregate.java index 0c5a5b68ee..d3ba4b4fc8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxPlotAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxPlotAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxplotAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxplotAggregation.java index 559e7bfc10..da7f6efc18 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxplotAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BoxplotAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketAggregationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketAggregationBase.java index ed3aabb4ce..e34929676e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketAggregationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketAggregationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.ObjectDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketMetricValueAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketMetricValueAggregate.java index d0f69b2e3b..fb09a86120 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketMetricValueAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketMetricValueAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketScriptAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketScriptAggregation.java index 234e7c17a9..b86b59794d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketScriptAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketScriptAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSelectorAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSelectorAggregation.java index 8c77020398..021c6b868f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSelectorAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSelectorAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSortAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSortAggregation.java index 5c8563f3c9..a479ce8d4f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSortAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketSortAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.SortOptions; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Buckets.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Buckets.java index 4f2b8aa1f6..8527069619 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Buckets.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Buckets.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsBuilders.java index 4936f12b91..f2b501ccc9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPath.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPath.java index 4368fd20b1..2c95995b55 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPath.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPath.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPathBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPathBuilders.java index f4c248b971..10e3b0ef62 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPathBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/BucketsPathBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CalendarInterval.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CalendarInterval.java index 4ebda23980..18f275b070 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CalendarInterval.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CalendarInterval.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregate.java index f9874bd90c..dc8514c376 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregation.java index cf646b27bc..7969fc70dc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CardinalityAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChiSquareHeuristic.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChiSquareHeuristic.java index 1a29714897..150a347c41 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChiSquareHeuristic.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChiSquareHeuristic.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java index d38c40004c..43caae3d09 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregation.java index d32df31f35..14eb2c7569 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ChildrenAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ClassificationInferenceOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ClassificationInferenceOptions.java index 3a4ae16c04..2802e37e0c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ClassificationInferenceOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ClassificationInferenceOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregate.java index 783e4f4521..433063517e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregation.java index 8142a9c2f2..472e8c4d45 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregationSource.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregationSource.java index 59e6901568..83e7b88c58 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregationSource.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeAggregationSource.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeBucket.java index 5c0eaea2b3..938c6dff17 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CompositeBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregate.java index d9b14f1985..e76d7d46d1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregation.java index f538ab72e4..33a64459ae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeCardinalityAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeSumAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeSumAggregation.java index a8a68e425f..2dd864a016 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeSumAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/CumulativeSumAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregate.java index a4d641f0cc..0661b8fe69 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregation.java index b78341610d..00b468e31a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramBucket.java index 496a4b6eef..9666ff3c8f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateHistogramBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregate.java index 756e160f7d..ef49a878da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregation.java index 7b168de7d1..6f121233c8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeExpression.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeExpression.java index c27aa0bfb8..28395a066e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeExpression.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DateRangeExpression.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregate.java index 360b1e3a32..1cb424b4e3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregation.java index d262bd2e3c..61c74424d0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DerivativeAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DiversifiedSamplerAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DiversifiedSamplerAggregation.java index e2401d3e36..9bd8cf61e0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DiversifiedSamplerAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DiversifiedSamplerAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsAggregate.java index 0292fc8b1d..fee1f3f246 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsBucket.java index ee1797b5b7..b03f543968 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/DoubleTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaModelSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaModelSettings.java index a34572f091..d8d4f1628c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaModelSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaModelSettings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaMovingAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaMovingAverageAggregation.java index dcff796321..ce4130bcf8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaMovingAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/EwmaMovingAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedBounds.java index 6987f15248..66b6363c05 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregate.java index 049b63cd20..a771bd3ac4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregation.java index 1f16394691..7cfdfe7b87 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregate.java index 6f801fe955..590bab0946 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregation.java index 8da455a1d0..cd54081927 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ExtendedStatsBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMath.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMath.java index a6c05c2d82..ca2b4f3070 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMath.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMath.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMathBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMathBuilders.java index 97f4ac0919..3019e5b543 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMathBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FieldDateMathBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregate.java index f16eb3767d..536e2fdbbb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FilterAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregate.java index 8bf339361b..396dab6309 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregation.java index 8209d9c1cb..6c4a68c3e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersBucket.java index dbc779b045..7c7441e3bb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FiltersBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormatMetricAggregationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormatMetricAggregationBase.java index 51ed3b0910..d712a6ab10 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormatMetricAggregationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormatMetricAggregationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormattableMetricAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormattableMetricAggregation.java index ece19be622..8887ea48f6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormattableMetricAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/FormattableMetricAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GapPolicy.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GapPolicy.java index ec77ec40f9..c6bf7009bb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GapPolicy.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GapPolicy.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregate.java index 73176b85c2..7a364e829d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.GeoBounds; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregation.java index ac6db63064..ded5b9560f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoBoundsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregate.java index 69acf0c124..775e05970c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.GeoLocation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregation.java index 65090eee05..73a67e80d3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoCentroidAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.GeoLocation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregate.java index 915df412dd..b06b2506dd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregation.java index 04366435bb..c79430841e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoDistanceAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.DistanceUnit; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregate.java index 2c885c9c38..c0ed84a347 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregation.java index 9d7f5d54be..1d29c7da0d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.GeoBounds; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridBucket.java index 11eb894193..30c1e73abb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoHashGridBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregate.java index 34bdcb7822..b291e2adc2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.GeoLine; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregation.java index 6db3b42b5e..86cbd78c9c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.SortOrder; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLinePoint.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLinePoint.java index 36ed9e8ff2..6bfae2a3b7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLinePoint.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLinePoint.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineSort.java index b988573ed9..ac3a02fbe1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoLineSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregate.java index f2aeb4d24f..02327a8a95 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregation.java index 590f1499cc..b783989693 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.GeoBounds; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridBucket.java index 2e67f25270..3db0745d26 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GeoTileGridBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregate.java index 697a4b2784..c03141da7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregation.java index 7396000e8e..5b96a233b8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GlobalAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java index ddfbdb0f1e..58f0e252f8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrMethod.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrMethod.java index 31b6bddf37..1dd85b696a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrMethod.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrMethod.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentileRanksAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentileRanksAggregate.java index 75bdc576e3..f742b4e61c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentileRanksAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentileRanksAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentilesAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentilesAggregate.java index 1f7cd30975..216f13a826 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentilesAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HdrPercentilesAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregate.java index 5f1edcfff6..3afeb8bbde 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregation.java index bb18d8432a..3e78fb63b3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramBucket.java index 600e990c11..ec75464438 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramOrder.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramOrder.java index 8a08d08e47..fbeb3664e5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramOrder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HistogramOrder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.SortOrder; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltLinearModelSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltLinearModelSettings.java index bb9542b3e4..15d214d48a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltLinearModelSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltLinearModelSettings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltMovingAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltMovingAverageAggregation.java index d8c4b6fa37..b2e2caa17f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltMovingAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltMovingAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersModelSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersModelSettings.java index efaca8f5ae..c54c16f06b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersModelSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersModelSettings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersMovingAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersMovingAverageAggregation.java index df40e2d9dc..789cc525d2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersMovingAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersMovingAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersType.java index b6908960f0..4ea53ce435 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/HoltWintersType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregate.java index 645e5993d2..11f93db215 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregation.java index 758e1bbcb2..65ef63d6a7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceClassImportance.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceClassImportance.java index ce6ada1f74..19d8107526 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceClassImportance.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceClassImportance.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceConfig.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceConfig.java index 6becb87f59..7d123be36f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceConfig.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceConfig.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceFeatureImportance.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceFeatureImportance.java index 62b974c033..4794739066 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceFeatureImportance.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceFeatureImportance.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceTopClassEntry.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceTopClassEntry.java index 211a447fe3..b6f320f01e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceTopClassEntry.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/InferenceTopClassEntry.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregate.java index 1ce81c6f08..5e0b0aa915 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregation.java index e4fc4aa07a..5b75a44a7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregationRange.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregationRange.java index 4afa53e100..0556d37aaf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregationRange.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeAggregationRange.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeBucket.java index 36b0a1d555..0d869c0dcc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/IpRangeBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LinearMovingAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LinearMovingAverageAggregation.java index 733a987a9b..ef73da7011 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LinearMovingAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LinearMovingAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.EmptyObject; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsAggregate.java index 6dd3a0be4a..77ba96661b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsBucket.java index 51f673a7e9..f52336f7d9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongRareTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsAggregate.java index cac4638fc4..46048788d7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsBucket.java index 3a918fb484..1db4640602 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/LongTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixAggregation.java index 6e9b36a5f2..329982c9f4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregate.java index 62b7626b74..7488f2a0a0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregation.java index f321b4ca3c..6dfabf48de 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.SortMode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsFields.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsFields.java index 9667c1243e..b6bcd5e1d8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsFields.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MatrixStatsFields.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregate.java index 44e1520801..a7a71d83a5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregation.java index c71fe314cc..196d8c09b6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxBucketAggregation.java index 1231ed586d..27d5c18f81 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MaxBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregate.java index 92a4afaacd..090f0ed7ff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregation.java index d6966f83ae..d8854f03a2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MedianAbsoluteDeviationAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MetricAggregationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MetricAggregationBase.java index cfd7c81fb7..280de3cad1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MetricAggregationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MetricAggregationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregate.java index 7c70fb9d1b..a554c4486c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregation.java index 9cbd33a1f4..af57555363 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinBucketAggregation.java index cb2b059916..5d0b2a5d4e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinimumInterval.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinimumInterval.java index b4f7fea941..3eeed4f6b4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinimumInterval.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MinimumInterval.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregate.java index ca279eef86..34b6705960 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregation.java index 5ba3f4cf21..e8fef3b3b2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingOrder.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingOrder.java index c6a2931b58..7a1c8d8dd3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingOrder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MissingOrder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregation.java index 2dd5030a64..b3fa0e89cb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBase.java index 86f4f5f84e..3e3b5b705c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBuilders.java index 5bb4a3b3c8..f3acacad2a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationVariant.java index 318a871b17..3e2f600c29 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingAverageAggregationVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingFunctionAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingFunctionAggregation.java index 459d22e764..ba175bfcce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingFunctionAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingFunctionAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingPercentilesAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingPercentilesAggregation.java index 8e47444a53..205e2c7d6f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingPercentilesAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MovingPercentilesAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketAggregateBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketAggregateBase.java index 98930d72cc..92e46b337b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketAggregateBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketAggregateBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketBase.java index 7ac5a6aa99..47a4edfdaf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiBucketBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.ExternallyTaggedUnion; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermLookup.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermLookup.java index 081903f5af..68e5aeb41f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermLookup.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermLookup.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregate.java index c949d1ea0a..e3a5707b92 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java index c3c12fc952..7470809839 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsBucket.java index 63dbe9ffce..bcf57486fa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MutualInformationHeuristic.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MutualInformationHeuristic.java index bb984e4a73..0c76c76c89 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MutualInformationHeuristic.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MutualInformationHeuristic.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregate.java index 7840c012c0..4e5e6909cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregation.java index ef4c2692e1..4425003716 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NestedAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeAggregation.java index d737abdfaf..61069fd53a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeMethod.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeMethod.java index c50d683977..d6d58d8eff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeMethod.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/NormalizeMethod.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ParentAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ParentAggregation.java index dd2a0b6a4b..b45dc549b2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ParentAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ParentAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentageScoreHeuristic.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentageScoreHeuristic.java index 585ffed978..267ddb6658 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentageScoreHeuristic.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentageScoreHeuristic.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentileRanksAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentileRanksAggregation.java index c4952edda3..9b0694c95e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentileRanksAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentileRanksAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Percentiles.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Percentiles.java index 1ef5d3d328..f44b55972b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Percentiles.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/Percentiles.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregateBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregateBase.java index 009e3e30d0..fa55947bc9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregateBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregateBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregation.java index f22533f0f0..3856ff4cb3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregate.java index c0a49a05f1..908de2f1c2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregation.java index 534f438eca..ba899bdb41 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBuilders.java index 17394c854c..c812b490ec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PercentilesBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PipelineAggregationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PipelineAggregationBase.java index 7668209548..ded1ffb232 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PipelineAggregationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/PipelineAggregationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregate.java index fd70d402ed..6943a658ca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregation.java index a3914145ad..8defc797a9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java index b8dd31a18b..228e984757 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RangeBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RareTermsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RareTermsAggregation.java index 5e4f7b6f2a..05804ff9fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RareTermsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RareTermsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregate.java index de5d6aac1c..2d6a8f5342 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregation.java index 6fd58ede55..0bf685605f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateMode.java index b099f10780..93b4e0aa0b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RateMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RegressionInferenceOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RegressionInferenceOptions.java index 10a7bad92f..4354f3e19e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RegressionInferenceOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/RegressionInferenceOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregate.java index fe06f14fec..b65d7ecd63 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregation.java index 4bef8201ad..7fb6df084b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ReverseNestedAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregate.java index 1408fef932..872c19f57a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregation.java index 1c7b5796e6..5e9ab372bb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregationExecutionHint.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregationExecutionHint.java index 04d2830c51..56543e7bbc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregationExecutionHint.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SamplerAggregationExecutionHint.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedHeuristic.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedHeuristic.java index d8d4ec28b9..8b6d6a9400 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedHeuristic.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedHeuristic.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregate.java index c0187f7c13..9b765656e0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregation.java index 077a50fe7b..4256e4909a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ScriptedMetricAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SerialDifferencingAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SerialDifferencingAggregation.java index 74a21d8e58..8d773826ca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SerialDifferencingAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SerialDifferencingAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsAggregate.java index 6a6bb4afea..a3489480af 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsBucket.java index 33d2f7da63..38b485c699 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantLongTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsAggregate.java index e9d73f0a84..01227679c7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsBucket.java index ca88181c8a..738aff8a16 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantStringTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsAggregation.java index ac76d9b451..803175b794 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsBucketBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsBucketBase.java index ea4bc670b4..c02505bfd1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsBucketBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTermsBucketBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTextAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTextAggregation.java index 5eb546fdd0..de2b9e9dba 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTextAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SignificantTextAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleMovingAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleMovingAverageAggregation.java index 3a1438be90..915144b6f7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleMovingAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleMovingAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.EmptyObject; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleValueAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleValueAggregate.java index 0e7e176b7e..5c1b763a43 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleValueAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SimpleValueAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleBucketAggregateBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleBucketAggregateBase.java index a1853030df..1bd286d88f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleBucketAggregateBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleBucketAggregateBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleMetricAggregateBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleMetricAggregateBase.java index 2ebe0a2046..308f82579c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleMetricAggregateBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SingleMetricAggregateBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBounds.java index a78f2fc11b..344ad654db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBounds.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBoundsAsString.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBoundsAsString.java index a81ca8e9e3..1aefb7b7c9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBoundsAsString.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StandardDeviationBoundsAsString.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregate.java index c8efa5438c..73a6562098 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregation.java index 1a62db4d0b..0301225886 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregate.java index 4566c13792..5e50885da1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregation.java index fa3069ca04..11e8392a2d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StatsBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsAggregate.java index b81b0218a0..8901fe1732 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsBucket.java index 1095343c38..e70b86cfb2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringRareTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregate.java index f7b86d98f0..d948aeea06 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregation.java index cdc170311b..f4232fd90b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringStatsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsAggregate.java index a9d4f8d8dd..479114d513 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsBucket.java index 1ad6966dc4..d57383dc08 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/StringTermsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregate.java index 26a2db4f55..2bc701db80 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregation.java index 2d12487a64..27ed3ee0a2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumBucketAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumBucketAggregation.java index b889c46b56..417ea33de5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumBucketAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/SumBucketAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigest.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigest.java index 3b5616fd0d..2e22d15b5c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentileRanksAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentileRanksAggregate.java index 60c19a933c..734aeb42cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentileRanksAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentileRanksAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentilesAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentilesAggregate.java index 5193e7be62..d77f418f3f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentilesAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TDigestPercentilesAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregate.java index 62e7f72d00..6984ba686a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregation.java index ac1a284b15..c04e7ac8f0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestType.java index bfe56d1490..6ed9e7a111 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TTestType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregateBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregateBase.java index e15ef7b5f0..dd07c99abc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregateBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregateBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregation.java index 52584c4571..a6e6967fdf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationCollectMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationCollectMode.java index 525ce979d6..7dbeb74546 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationCollectMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationCollectMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationExecutionHint.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationExecutionHint.java index 039aa87bfc..767f06a2f5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationExecutionHint.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregationExecutionHint.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java index f6dfd64ef2..03424e5de3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExclude.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExclude.java index 77f0cdc18e..84b22377fc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExclude.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExclude.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExcludeBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExcludeBuilders.java index 4b0b7ebc2d..7aab77cb08 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExcludeBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsExcludeBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsInclude.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsInclude.java index e624298096..28c727b320 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsInclude.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsInclude.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsIncludeBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsIncludeBuilders.java index 3a343445da..d81e73a6a2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsIncludeBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsIncludeBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsPartition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsPartition.java index 9d0af3c1fe..457bd5dccf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsPartition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TermsPartition.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TestPopulation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TestPopulation.java index 45381bae5b..03d08f2f2d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TestPopulation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TestPopulation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregate.java index 68b661458f..7e36f0af4a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch.core.search.HitsMetadata; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregation.java index 30cb396146..ee3dd81154 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopHitsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.ScriptField; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetrics.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetrics.java index 806a49d9a2..f6b4e67e2b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetrics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetrics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregate.java index c3385cf25b..b1c300d469 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregation.java index 68cc6ed80d..2fd9c519ba 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.SortOptions; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsBucket.java index d9c9e7031c..7d79bbe808 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsValue.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsValue.java index ad7b8ae339..95b3c7b4ce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsValue.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/TopMetricsValue.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedRareTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedRareTermsAggregate.java index a01a5afabf..16f69a9a0e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedRareTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedRareTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedSignificantTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedSignificantTermsAggregate.java index 0743c7444a..b2949c7f5c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedSignificantTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedSignificantTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedTermsAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedTermsAggregate.java index 81c89a38d4..7b3538d718 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedTermsAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/UnmappedTermsAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregate.java index 487b0ec190..1d6571f754 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregation.java index d3c3d5e9a9..d939c8c590 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueCountAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueType.java index 646ad387b1..7232db4844 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/ValueType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregate.java index 8c76b770e7..1c42ab0100 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregation.java index f0c52826a1..dbf12935a5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramBucket.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramBucket.java index 290957a35d..bb51a645e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramBucket.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/VariableWidthHistogramBucket.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageAggregation.java index a813c17e17..6d17c00ca7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageValue.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageValue.java index b8798669c2..9bd1ca4d2d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageValue.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAverageValue.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAvgAggregate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAvgAggregate.java index 5bd462f48f..965346d41e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAvgAggregate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/WeightedAvgAggregate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.aggregations; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java index 596fc80c6d..66ba4d4de4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerBuilders.java index 6d7ff89737..8c4bcbd1b9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerVariant.java index e7767470d5..986ff487df 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AnalyzerVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AsciiFoldingTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AsciiFoldingTokenFilter.java index bad3b3be62..4a1da45fcf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AsciiFoldingTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/AsciiFoldingTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilter.java index 623998d188..6e989d15c7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBase.java index 4f0d328323..eec31bd227 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBuilders.java index 0a09b6820b..b22c744768 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinition.java index 3c3ae6f482..995a18d387 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinition.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionBuilders.java index 612744178c..0ea20278ce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionVariant.java index 804acbb69d..40e9d2ec80 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharFilterDefinitionVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharGroupTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharGroupTokenizer.java index d23d1fa91e..ca2731406d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharGroupTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CharGroupTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CommonGramsTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CommonGramsTokenFilter.java index 88ddc2cc0b..ea7e623b2a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CommonGramsTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CommonGramsTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CompoundWordTokenFilterBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CompoundWordTokenFilterBase.java index a6180d5736..9a0ceab48d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CompoundWordTokenFilterBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CompoundWordTokenFilterBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ConditionTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ConditionTokenFilter.java index 1e9053a0ae..61b8cb7e5a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ConditionTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ConditionTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomAnalyzer.java index 51f5599da5..d82712b019 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomNormalizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomNormalizer.java index 62781232fb..bb686d1625 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomNormalizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CustomNormalizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadEncoding.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadEncoding.java index 862779373c..5095c440d5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadEncoding.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadEncoding.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadTokenFilter.java index 99aeb503c6..81ff09b574 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DelimitedPayloadTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DictionaryDecompounderTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DictionaryDecompounderTokenFilter.java index d62a322232..63f08d3845 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DictionaryDecompounderTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DictionaryDecompounderTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DutchAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DutchAnalyzer.java index 37d78f9087..24be4138fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DutchAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/DutchAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramSide.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramSide.java index b8f135db79..3c952bbde9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramSide.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramSide.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenFilter.java index ff67f6134d..def5cd9960 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenizer.java index 7bbe5b3a53..7f44552de2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/EdgeNGramTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ElisionTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ElisionTokenFilter.java index 9f730d116e..e8e726fec6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ElisionTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ElisionTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintAnalyzer.java index 8304a2526d..c4710252e4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintTokenFilter.java index f9f33ef32f..1c677de1d1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/FingerprintTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HtmlStripCharFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HtmlStripCharFilter.java index 20424ea3f8..ff40f1aa17 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HtmlStripCharFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HtmlStripCharFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HunspellTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HunspellTokenFilter.java index 5621755b2c..df8c45344f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HunspellTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HunspellTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HyphenationDecompounderTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HyphenationDecompounderTokenFilter.java index d9ca5273a8..7e6cd5c41c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HyphenationDecompounderTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/HyphenationDecompounderTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuAnalyzer.java index 9cb479c33a..b81e88c5fa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationAlternate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationAlternate.java index 7cf11518ad..e7400b4bd3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationAlternate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationAlternate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationCaseFirst.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationCaseFirst.java index 228cbef6b2..aafbfaa7ed 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationCaseFirst.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationCaseFirst.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationDecomposition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationDecomposition.java index 9feb819ad9..e926dce81b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationDecomposition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationDecomposition.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationStrength.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationStrength.java index 76637fb619..1ef23d9506 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationStrength.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationStrength.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationTokenFilter.java index 626250828d..0396ad5122 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuCollationTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuFoldingTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuFoldingTokenFilter.java index b386496536..d802a2ac6d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuFoldingTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuFoldingTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationCharFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationCharFilter.java index d66c48c9dd..e79c103c6b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationCharFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationCharFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationMode.java index 8d43268387..f875c5ba96 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationTokenFilter.java index 0828180305..a13b360c9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationType.java index 0cd4e3505c..d452d8a5ef 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuNormalizationType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTokenizer.java index af433cb9cd..11e1d8c5cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformDirection.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformDirection.java index 567f3ea6b6..073e12c87d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformDirection.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformDirection.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformTokenFilter.java index 1c4f203566..970e14ae4c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/IcuTransformTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KStemTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KStemTokenFilter.java index 9fb2bc9696..9ae9f70d00 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KStemTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KStemTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesMode.java index 9b2424f621..3fe0368602 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesTokenFilter.java index dee4b17737..5ede68d803 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepTypesTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepWordsTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepWordsTokenFilter.java index d336fc5427..21c4af12d9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepWordsTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeepWordsTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordAnalyzer.java index 30579c8412..5cd44c0591 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordMarkerTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordMarkerTokenFilter.java index 19b3a0e27e..d17e56d90e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordMarkerTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordMarkerTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordTokenizer.java index 235157cfd5..3132a1a258 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KeywordTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiAnalyzer.java index 4ede0fa02e..e016db6001 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiIterationMarkCharFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiIterationMarkCharFilter.java index 0aa52ac12d..a897406a32 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiIterationMarkCharFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiIterationMarkCharFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiPartOfSpeechTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiPartOfSpeechTokenFilter.java index f51e5ec84a..d89086616f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiPartOfSpeechTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiPartOfSpeechTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiReadingFormTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiReadingFormTokenFilter.java index 76816140ac..c215c3cdeb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiReadingFormTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiReadingFormTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiStemmerTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiStemmerTokenFilter.java index 22cc1c29bb..7d8baa606c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiStemmerTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiStemmerTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizationMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizationMode.java index 07f47c709b..0dd6e824f1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizationMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizationMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizer.java index e9e9018f20..4eefb18d17 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/KuromojiTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Language.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Language.java index 056771a5d2..33798cb163 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Language.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Language.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LanguageAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LanguageAnalyzer.java index d7f5a0fe2c..e62f248321 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LanguageAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LanguageAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LengthTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LengthTokenFilter.java index e1284d82f9..c3361d4098 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LengthTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LengthTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LetterTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LetterTokenizer.java index 88af26c8fa..842e14bbff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LetterTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LetterTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LimitTokenCountTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LimitTokenCountTokenFilter.java index 6c928cce94..8a1d655bfa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LimitTokenCountTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LimitTokenCountTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseNormalizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseNormalizer.java index 1c6d885a2d..b56b618026 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseNormalizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseNormalizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenFilter.java index d348e9c02e..cb59eb0345 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenizer.java index 1ca9a6f6d8..66fab00359 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/LowercaseTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MappingCharFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MappingCharFilter.java index 231c5d0d12..bc48a6706e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MappingCharFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MappingCharFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MultiplexerTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MultiplexerTokenFilter.java index 148faee7a1..b250cc3ceb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MultiplexerTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/MultiplexerTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenFilter.java index 43ee7e6be5..50907149a7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenizer.java index 8cecf15cdf..91cfb7de5c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NGramTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriAnalyzer.java index d4526e93ed..24ea4b1ab3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriDecompoundMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriDecompoundMode.java index 38bef71a57..3e4bfcfef2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriDecompoundMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriDecompoundMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriPartOfSpeechTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriPartOfSpeechTokenFilter.java index 87de2333ef..6c4476f0ec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriPartOfSpeechTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriPartOfSpeechTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriTokenizer.java index d28a94cf59..6f9d0e6eda 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NoriTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Normalizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Normalizer.java index 8fdaaaa683..a38b737fac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Normalizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Normalizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerBuilders.java index 77a670e05f..a3c5e6d6a1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerVariant.java index 99f11bb7b1..742bfc28d3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/NormalizerVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PathHierarchyTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PathHierarchyTokenizer.java index 7ffe86c2ab..29f09e0d13 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PathHierarchyTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PathHierarchyTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternAnalyzer.java index 7a16c31a1f..3ec16156e7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternCaptureTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternCaptureTokenFilter.java index 9ed32f2674..753d9b3707 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternCaptureTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternCaptureTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceCharFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceCharFilter.java index 19259570d4..a0ac6f883f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceCharFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceCharFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceTokenFilter.java index aa18fbde58..70e3700ce7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternTokenizer.java index dc46c8535a..85489f1486 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticEncoder.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticEncoder.java index 28b8879a4e..83d6488c0e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticEncoder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticEncoder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticLanguage.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticLanguage.java index 8080c80622..2e326ffa0f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticLanguage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticLanguage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticNameType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticNameType.java index 3427961445..1a8c2c7234 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticNameType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticNameType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticRuleType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticRuleType.java index d84a9e6a66..b2da10b289 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticRuleType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticRuleType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticTokenFilter.java index 825aac18d2..df13bff4ce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PhoneticTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PorterStemTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PorterStemTokenFilter.java index 19c02b6d01..afccc9667b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PorterStemTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PorterStemTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PredicateTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PredicateTokenFilter.java index d7de366c2c..2bf9dfc5c3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PredicateTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PredicateTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/RemoveDuplicatesTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/RemoveDuplicatesTokenFilter.java index ea9892d345..d68715fd59 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/RemoveDuplicatesTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/RemoveDuplicatesTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ReverseTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ReverseTokenFilter.java index b9df7d0510..c6f12b2b30 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ReverseTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ReverseTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ShingleTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ShingleTokenFilter.java index 96606a72cc..8fed3e3a26 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ShingleTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/ShingleTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SimpleAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SimpleAnalyzer.java index 142c0418ea..10e56b96aa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SimpleAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SimpleAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballAnalyzer.java index 156fdb38f6..b613c95260 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballLanguage.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballLanguage.java index 58f72edf3b..da541a1cb1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballLanguage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballLanguage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballTokenFilter.java index 5cb3fbbe56..79e768aeab 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SnowballTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardAnalyzer.java index 437deee99d..2ad8aaf503 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardTokenizer.java index d8ce020e65..376da1d1a1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StandardTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerOverrideTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerOverrideTokenFilter.java index 73c0aa107f..f964e54f38 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerOverrideTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerOverrideTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerTokenFilter.java index 01fe6b074c..f011bfc452 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StemmerTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopAnalyzer.java index ebc51d8aa5..a4e085c86c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopTokenFilter.java index 2d3be89c92..6f61d1cc3e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/StopTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymFormat.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymFormat.java index 2d66dfc672..f02efd9267 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymFormat.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymFormat.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymGraphTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymGraphTokenFilter.java index 58287abf6c..6820562535 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymGraphTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymGraphTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymTokenFilter.java index ac522d24d2..d0e26d29be 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SynonymTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenChar.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenChar.java index 1373294600..c25bfe4384 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenChar.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenChar.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilter.java index 9ecd4d931d..34bb5f00e1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBase.java index b90507ce0d..a7fec52ea7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBuilders.java index c848b69046..db37c853bf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java index fe20dbdb5e..ee16cb10df 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionBuilders.java index 329032e5f5..0bf54cab65 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionVariant.java index f9df0897cc..bde136ddbf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinitionVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Tokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Tokenizer.java index 1835559d5c..0e1c5b5161 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Tokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Tokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBase.java index 41949714cb..efe1040431 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBuilders.java index 32db5ba576..ae70e9486c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java index d49f951165..79b541851b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionBuilders.java index 4b08b13957..a2d29379ae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionVariant.java index b69dd7433f..06203d5af0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinitionVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TrimTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TrimTokenFilter.java index 82ce3c8568..411443ab29 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TrimTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TrimTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TruncateTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TruncateTokenFilter.java index 323598bd47..cee441441e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TruncateTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TruncateTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UaxEmailUrlTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UaxEmailUrlTokenizer.java index 6243a34a6c..89c632ab5a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UaxEmailUrlTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UaxEmailUrlTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UniqueTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UniqueTokenFilter.java index 5c40ef6ce7..eeae463a75 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UniqueTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UniqueTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UppercaseTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UppercaseTokenFilter.java index 19aef142ef..066c9787ac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UppercaseTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/UppercaseTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceAnalyzer.java index ee7cb13913..56d7e9a98b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceAnalyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceAnalyzer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceTokenizer.java index 1a328fbec5..2c34489d9d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceTokenizer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WhitespaceTokenizer.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterGraphTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterGraphTokenFilter.java index f3a41d02ff..5a973cf768 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterGraphTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterGraphTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterTokenFilter.java index 1c0610a04a..3319540bf6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterTokenFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/WordDelimiterTokenFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.analysis; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AggregateMetricDoubleProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AggregateMetricDoubleProperty.java index 24c1f73ffe..2d864d3a3c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AggregateMetricDoubleProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AggregateMetricDoubleProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AllField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AllField.java index eb9f9a4ff3..ce169cda46 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AllField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/AllField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BinaryProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BinaryProperty.java index e8a6d60eaa..d218b84917 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BinaryProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BinaryProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BooleanProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BooleanProperty.java index 9efd93e314..c264e133ea 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BooleanProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/BooleanProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.opensearch.indices.NumericFielddata; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ByteNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ByteNumberProperty.java index dd7c695a46..715b5d7fe9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ByteNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ByteNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CompletionProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CompletionProperty.java index 6af2fb48e9..e8b7a2e05d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CompletionProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CompletionProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ConstantKeywordProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ConstantKeywordProperty.java index 4d38d4235e..dfa0bc3865 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ConstantKeywordProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ConstantKeywordProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CorePropertyBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CorePropertyBase.java index 703e7898e8..8c7e3a87e6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CorePropertyBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/CorePropertyBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateNanosProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateNanosProperty.java index 86be10edfa..1a50b9621f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateNanosProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateNanosProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateProperty.java index 632d197db2..54e4fbe831 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.opensearch.indices.NumericFielddata; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateRangeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateRangeProperty.java index bda0bc6b55..6c38ce8645 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateRangeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DateRangeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DocValuesPropertyBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DocValuesPropertyBase.java index 3b85d495f9..70777dbbaa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DocValuesPropertyBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DocValuesPropertyBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleNumberProperty.java index 6fba5f1816..eb42a77a40 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleRangeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleRangeProperty.java index 98e71b610b..008f844cfe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleRangeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DoubleRangeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicMapping.java index c1617e05b0..05a79d604d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicMapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicTemplate.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicTemplate.java index ceccaebddd..a9839d88a0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicTemplate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/DynamicTemplate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldAliasProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldAliasProperty.java index 2a061aa918..abab821b03 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldAliasProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldAliasProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java index 0c45cac33a..3ee5bbdf79 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldNamesField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldNamesField.java index 0eebb34795..aeb5bc9e15 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldNamesField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldNamesField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java index 07b2ac13b3..7538bae57e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FlattenedProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FlattenedProperty.java index 150fd20fa4..24cb6d2ba5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FlattenedProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FlattenedProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatNumberProperty.java index bf9bbf7f7d..633d958dcd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatRangeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatRangeProperty.java index 4ccaac914a..062fa53cc3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatRangeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FloatRangeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoOrientation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoOrientation.java index b18ae37b8e..da195a386b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoOrientation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoOrientation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoPointProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoPointProperty.java index 0155fc7dca..c57d677e40 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoPointProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoPointProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.opensearch._types.GeoLocation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoShapeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoShapeProperty.java index 0f28f75115..e12ecace69 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoShapeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoShapeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoStrategy.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoStrategy.java index 3851586d78..04c6e7d00b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoStrategy.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/GeoStrategy.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HalfFloatNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HalfFloatNumberProperty.java index f7fcb5603e..5e99b735b0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HalfFloatNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HalfFloatNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HistogramProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HistogramProperty.java index 565d956aff..bd0b2722fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HistogramProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/HistogramProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexField.java index e0d170de01..7d9015c04d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexOptions.java index 1a332bbc89..edcff2e48c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IndexOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerNumberProperty.java index 5279e3b325..f6f8817c7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerRangeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerRangeProperty.java index 9ca15f91f9..11adecff87 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerRangeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IntegerRangeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpProperty.java index 247e5dc419..24f6675831 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpRangeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpRangeProperty.java index 45c662f697..44dd5ee755 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpRangeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/IpRangeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/JoinProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/JoinProperty.java index ef6db9cd0d..37decd0fdf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/JoinProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/JoinProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KeywordProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KeywordProperty.java index fdd5512473..f561737d7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KeywordProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/KeywordProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongNumberProperty.java index a3c699f957..ec54875a19 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongRangeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongRangeProperty.java index ec25d2d748..677df17bf1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongRangeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/LongRangeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/MatchType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/MatchType.java index 360ea8dd04..e751cd52fb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/MatchType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/MatchType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Murmur3HashProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Murmur3HashProperty.java index a753ec46d5..c8616bef37 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Murmur3HashProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Murmur3HashProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NestedProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NestedProperty.java index 9c180892ef..8d02f71a23 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NestedProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NestedProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NumberPropertyBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NumberPropertyBase.java index 64706b7e99..053975b969 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NumberPropertyBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/NumberPropertyBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ObjectProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ObjectProperty.java index dde8bf9e5f..38e8e74d2f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ObjectProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ObjectProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/OnScriptError.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/OnScriptError.java index 0d28a119c8..aed26732f8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/OnScriptError.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/OnScriptError.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PercolatorProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PercolatorProperty.java index 76633b5324..17be05b966 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PercolatorProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PercolatorProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PointProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PointProperty.java index 6fc9dfe7c6..6fac0375a5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PointProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PointProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java index 9bff87715a..10c23d2cff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBase.java index 3a5aaf9d27..acab20535c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java index 4013fdf8b0..5ebec1f4dd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyVariant.java index 74b055517d..4ac268e305 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/PropertyVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RangePropertyBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RangePropertyBase.java index a09440a40c..65c92ff925 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RangePropertyBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RangePropertyBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeatureProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeatureProperty.java index 8ee4fa5524..52d03831ea 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeatureProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeatureProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeaturesProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeaturesProperty.java index 1afbc18b2b..00aa9ae3a5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeaturesProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RankFeaturesProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RoutingField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RoutingField.java index a5eb28f773..018fc7fcbd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RoutingField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RoutingField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeField.java index 0f8b8a2753..cecd490d1e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeFieldType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeFieldType.java index dde2fd9767..8e7d653bfb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeFieldType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/RuntimeFieldType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ScaledFloatNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ScaledFloatNumberProperty.java index ce613616df..b76d597ab1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ScaledFloatNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ScaledFloatNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SearchAsYouTypeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SearchAsYouTypeProperty.java index 55875c06fb..7a051ca15c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SearchAsYouTypeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SearchAsYouTypeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShapeProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShapeProperty.java index f4f0afb5d7..250ef87b6e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShapeProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShapeProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShortNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShortNumberProperty.java index 6b7e0b3759..62870479d5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShortNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/ShortNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SizeField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SizeField.java index 40f32d7246..38767bf7db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SizeField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SizeField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SourceField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SourceField.java index a5003b74e9..53b4057ce0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SourceField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SourceField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/StandardNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/StandardNumberProperty.java index 8de7e43297..9d053f201c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/StandardNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/StandardNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SuggestContext.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SuggestContext.java index 97e47e9d66..2a413854c2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SuggestContext.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/SuggestContext.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TermVectorOption.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TermVectorOption.java index 18764ac3a7..29bb13ec54 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TermVectorOption.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TermVectorOption.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextIndexPrefixes.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextIndexPrefixes.java index 227f255e1f..db582c1ac9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextIndexPrefixes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextIndexPrefixes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextProperty.java index 216c132dc3..d0b83ecf0e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TextProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.opensearch.indices.FielddataFrequencyFilter; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TokenCountProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TokenCountProperty.java index fb0e36d445..a89df1e83f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TokenCountProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TokenCountProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TypeMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TypeMapping.java index a5831a5e5f..aa0a8d9444 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TypeMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/TypeMapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/UnsignedLongNumberProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/UnsignedLongNumberProperty.java index 70bd66e3b3..2eff6519e0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/UnsignedLongNumberProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/UnsignedLongNumberProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/VersionProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/VersionProperty.java index 25e0b05463..8eb8d3ee74 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/VersionProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/VersionProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/WildcardProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/WildcardProperty.java index 58ce821647..febc56e766 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/WildcardProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/WildcardProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.mapping; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoolQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoolQuery.java index e34d42136d..ffce43d3c9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoolQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoolQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoostingQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoostingQuery.java index c97733f6e9..ea509d9a98 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoostingQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/BoostingQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ChildScoreMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ChildScoreMode.java index 365966e68c..a8ad49e6e0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ChildScoreMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ChildScoreMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsOperator.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsOperator.java index a55a69bad3..1c56d1cc92 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsOperator.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsOperator.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsQuery.java index 322b7180eb..42a077a152 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsZeroTerms.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsZeroTerms.java index 8c9c003970..a4c38d17d1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsZeroTerms.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CombinedFieldsZeroTerms.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CommonTermsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CommonTermsQuery.java index 4c3515ce51..995c3d85e1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CommonTermsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/CommonTermsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ConstantScoreQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ConstantScoreQuery.java index 938bfc0a06..5ada920bc3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ConstantScoreQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ConstantScoreQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunction.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunction.java index 658f24a386..e91eee71d6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunctionBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunctionBase.java index ce350a9b19..e038f2a960 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunctionBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayFunctionBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayPlacement.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayPlacement.java index d04025b01a..3299731444 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayPlacement.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DecayPlacement.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DisMaxQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DisMaxQuery.java index 7ec7ea217a..9d30a071f2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DisMaxQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DisMaxQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DistanceFeatureQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DistanceFeatureQuery.java index 4fa360fbc7..0ed91d34fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DistanceFeatureQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/DistanceFeatureQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ExistsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ExistsQuery.java index 0834ac67c7..3969444d16 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ExistsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ExistsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldAndFormat.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldAndFormat.java index ba5a699b67..08ce136914 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldAndFormat.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldAndFormat.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldLookup.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldLookup.java index 3c4f874a5e..6687cbc979 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldLookup.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldLookup.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorModifier.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorModifier.java index 24ce423345..e784147b4c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorModifier.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorModifier.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorScoreFunction.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorScoreFunction.java index 753e9803eb..083359f3d9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorScoreFunction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FieldValueFactorScoreFunction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionBoostMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionBoostMode.java index 388cbb9210..e4a2fa5f49 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionBoostMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionBoostMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScore.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScore.java index fec49d4903..e939e248a1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScore.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScore.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreBuilders.java index 72cfb4c22e..e582cd13f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreMode.java index 0711f8e141..02f93e8d20 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreQuery.java index 3077eccd8c..99d804d019 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreVariant.java index a1382a65d1..bec7cdaba9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FunctionScoreVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FuzzyQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FuzzyQuery.java index 68982e0880..4376c57422 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FuzzyQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/FuzzyQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoBoundingBoxQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoBoundingBoxQuery.java index 63e5ab7b5b..1089be45e9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoBoundingBoxQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoBoundingBoxQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.GeoBounds; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQuery.java index d59a412591..3354ca7efb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.GeoDistanceType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoExecution.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoExecution.java index 859627af97..b8b20f5095 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoExecution.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoExecution.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonPoints.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonPoints.java index 71b96ad0d6..b39362db58 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonPoints.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonPoints.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.GeoLocation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonQuery.java index 8e7e1d6e03..0fee640cfc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoPolygonQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeFieldQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeFieldQuery.java index 015809293a..6a23413d1a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeFieldQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeFieldQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.GeoShapeRelation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeQuery.java index 46cecae0b8..197abdf074 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoShapeQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoValidationMethod.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoValidationMethod.java index 8e6736bf71..669faaac0d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoValidationMethod.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/GeoValidationMethod.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasChildQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasChildQuery.java index 7311b41c5c..5afd58cb56 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasChildQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasChildQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch.core.search.InnerHits; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasParentQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasParentQuery.java index afc5d62ec3..a10613b34a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasParentQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/HasParentQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch.core.search.InnerHits; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IdsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IdsQuery.java index 05667ac280..7eb7de5a56 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IdsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IdsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Intervals.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Intervals.java index bf4fa9da03..55664fdcb5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Intervals.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Intervals.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAllOf.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAllOf.java index 890d31fc07..657408c68f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAllOf.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAllOf.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAnyOf.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAnyOf.java index 5a037c9bdb..ebb250ec9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAnyOf.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsAnyOf.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsBuilders.java index 38e43a40da..fddc8deedc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilter.java index 3f74b87a4c..b079764593 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterBuilders.java index 3752b47db2..51e763ef5e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterVariant.java index 51bf930ac1..b1e838eb23 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFilterVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFuzzy.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFuzzy.java index c3422eff5c..e6db2282e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFuzzy.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsFuzzy.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsMatch.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsMatch.java index 125b5e4322..99c8ed1fe2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsMatch.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsMatch.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsPrefix.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsPrefix.java index 50ba27440c..ea1079df0b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsPrefix.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsPrefix.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQuery.java index d59eb6a2df..1d377801cc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryBuilders.java index 049517dff9..b6a64aa8db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryVariant.java index 9f48c609ba..b2d3c4acfa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsQueryVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsVariant.java index 3dfb8583f2..b7776458d7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsWildcard.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsWildcard.java index 0630d15a8d..dad54c5063 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsWildcard.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/IntervalsWildcard.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Like.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Like.java index 87f4a6fcc9..eca33e2035 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Like.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Like.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeBuilders.java index 37d608810b..8bbc3afe8d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeDocument.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeDocument.java index b3fedd81e8..0917721c0a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeDocument.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/LikeDocument.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.VersionType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchAllQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchAllQuery.java index 8bb09053d9..5b032e13d0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchAllQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchAllQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchBoolPrefixQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchBoolPrefixQuery.java index 0f85b9077f..6ccde60dfc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchBoolPrefixQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchBoolPrefixQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchNoneQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchNoneQuery.java index eebeacfa70..babc93d065 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchNoneQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchNoneQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhrasePrefixQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhrasePrefixQuery.java index 6897d0e23b..0b3b710c8d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhrasePrefixQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhrasePrefixQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhraseQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhraseQuery.java index 84ff7d6324..82840fc4fb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhraseQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchPhraseQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchQuery.java index 96e684a167..ff89318fef 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MatchQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MoreLikeThisQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MoreLikeThisQuery.java index f9578c6063..e8c8d9bdf8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MoreLikeThisQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MoreLikeThisQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.VersionType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiMatchQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiMatchQuery.java index d1ccb583f0..9319e480d4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiMatchQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiMatchQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiValueMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiValueMode.java index 8370803508..7386cb877c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiValueMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/MultiValueMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NestedQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NestedQuery.java index 4a751b6d4f..c98c2861bd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NestedQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NestedQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch.core.search.InnerHits; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Operator.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Operator.java index 6b6585edcc..4b19e32d32 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Operator.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Operator.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ParentIdQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ParentIdQuery.java index dbc9e26220..1b70d9b6cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ParentIdQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ParentIdQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PercolateQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PercolateQuery.java index 3b95df81da..aa80de575e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PercolateQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PercolateQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedDoc.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedDoc.java index 83bc9ffb01..bd2d9be137 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedDoc.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedDoc.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQuery.java index 87481c9d1d..a7df859311 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryBuilders.java index 0171a6654b..58c8c1ef8c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryVariant.java index 953f6ff2a0..eb46fd7e94 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PrefixQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PrefixQuery.java index a5ba7c2735..6d63afe06d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PrefixQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/PrefixQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java index d62b8ede42..abd141d078 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.aggregations.Aggregation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBase.java index 6d9dcc98b0..970235215e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java index d591b343c4..0deebb5343 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryStringQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryStringQuery.java index d0c005ad98..0b48fc3c00 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryStringQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryStringQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryVariant.java index 1dfc274c0a..771fbc86af 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RandomScoreFunction.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RandomScoreFunction.java index 8e81d7d245..7c2d6efdad 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RandomScoreFunction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RandomScoreFunction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQuery.java index 77430869b4..3bd0a81ca6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQueryBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQueryBase.java index 535d7b4dec..ee8dcdb30f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQueryBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeQueryBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeRelation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeRelation.java index a9609c2640..9b3de19330 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeRelation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RangeRelation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunction.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunction.java index d3de5bd33c..33ddf26495 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.util.ObjectBuilderBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLinear.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLinear.java index f373e971ca..7e44fcf5a9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLinear.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLinear.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLogarithm.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLogarithm.java index 9dfc7711f0..fce4e44d19 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLogarithm.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionLogarithm.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSaturation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSaturation.java index 4dc52a767f..7b32e7474b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSaturation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSaturation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSigmoid.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSigmoid.java index 60c0f21b47..d26ed584e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSigmoid.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureFunctionSigmoid.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureQuery.java index 71844f77ba..bb6ef8cfc8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RankFeatureQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RegexpQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RegexpQuery.java index 46d5f1e87c..67b368992a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RegexpQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/RegexpQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScoreFunctionBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScoreFunctionBase.java index a60df2143f..3820ead406 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScoreFunctionBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScoreFunctionBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptQuery.java index a8ecfbcc1b..37dd24f925 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreFunction.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreFunction.java index e8cfc16b9a..244a9da8b7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreFunction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreFunction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreQuery.java index ef56e46909..7d50874fa6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ScriptScoreQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeFieldQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeFieldQuery.java index 12150b1f55..0dc9ef7276 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeFieldQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeFieldQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.GeoShapeRelation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeQuery.java index 9ae99f856c..2a3806f559 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ShapeQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlag.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlag.java index 8a74c9619c..6d4f3d7915 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlag.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlag.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlags.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlags.java index 07085c28c8..58169d1c24 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlags.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlags.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java index 55d7498655..095e45e543 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringQuery.java index cfec4f50a1..9b2ee600e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SimpleQueryStringQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQuery.java index 41da4afb09..6ad9b7dc7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQuery.java index fdb613c2fa..5ab1e3bcca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQuery.java index 890a3be7c8..8c44a2c378 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanMultiTermQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanMultiTermQuery.java index 4a7119acac..8bd7a95c67 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanMultiTermQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanMultiTermQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQuery.java index a5ac861812..8db0410797 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQuery.java index f3a8958f63..4040ca83cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQuery.java index 71d2ae9f21..e240c5c993 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQuery.java index ef72d157b1..8141f35dd9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryBuilders.java index 4e89550452..069421213b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryVariant.java index 33f093847c..f791a910fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanTermQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanTermQuery.java index a6e880c003..8be679f74f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanTermQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanTermQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQuery.java index a30947e94a..2a570f5911 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermQuery.java index 34b3a58971..cd69d224d7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsLookup.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsLookup.java index 04e218bcf3..2fd693ffc1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsLookup.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsLookup.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQuery.java index 07c5b6e527..46ac45162b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryField.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryField.java index 2f720193b7..9eeccc3bdc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.FieldValue; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldBuilders.java index 2997b3e34a..5a9dcd0592 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsSetQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsSetQuery.java index e4189190ee..5e4500f414 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsSetQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TermsSetQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TextQueryType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TextQueryType.java index d2320f6572..aea1e5ac05 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TextQueryType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TextQueryType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TypeQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TypeQuery.java index 1f6628c1ee..5c268ddec7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TypeQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/TypeQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WildcardQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WildcardQuery.java index a36d6bd2ec..e037bb4339 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WildcardQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WildcardQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ZeroTermsQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ZeroTermsQuery.java index c50719e077..872632a214 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ZeroTermsQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/ZeroTermsQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch._types.query_dsl; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java index 07bee1a2db..467b9d049b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesResponse.java index 613bf8ef4e..eaa8ef8921 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AliasesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.aliases.AliasesRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java index 31c94269e7..e6147f0cfd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationResponse.java index c22ed52e23..880a825e06 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/AllocationResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.allocation.AllocationRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java index 1cbb1d9fab..707d958eec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CatRequestBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.RequestBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java index 72e6803405..57534e4d26 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerResponse.java index 96ea1d1745..d62171d802 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ClusterManagerResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java index 68f48d2f41..c116027615 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountResponse.java index 75aa6786d5..0d9718d5fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/CountResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.count.CountRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java index 3d23f6d1e2..29ffe82728 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataResponse.java index 1bf2168684..fe8637ba78 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/FielddataResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.fielddata.FielddataRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java index a5cd535500..72dfa367b1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthResponse.java index fa32f22526..8f395d216c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HealthResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.health.HealthRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java index df62fd4d8a..d1d65d5af8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpResponse.java index d4d26fc2da..e4f2ff298b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/HelpResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.help.HelpRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java index a33e0940ca..0db5a5a4c6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesResponse.java index 7d4fa169df..c90f352439 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/IndicesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.indices.IndicesRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java index 1ec4511c6e..f173d4bcaf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsResponse.java index d0f9748fbd..20bcafbb2b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodeattrsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.nodeattrs.NodeAttributesRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java index a0bf3c5d10..29252ca0f0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesResponse.java index 0df1ce1b53..ed6df418a0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/NodesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.nodes.NodesRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java index 41c82e73e6..16590f2a3a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java index ea0d87bbdc..a3c32b1e64 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/OpenSearchCatClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java index a228b5ac74..9665e5b332 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksResponse.java index c0172da3b4..1264cdea45 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PendingTasksResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.pending_tasks.PendingTasksRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java index f256c1db4c..4f249f2f62 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsResponse.java index d40343af2c..ce052b8101 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/PluginsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.plugins.PluginsRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java index afb9469791..045a3d00d2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryResponse.java index 67cfabe4e8..ea60179060 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RecoveryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.recovery.RecoveryRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java index c903f8285e..7f070757f7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesResponse.java index 8cc72397c7..273bc48e6a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/RepositoriesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.repositories.RepositoriesRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java index 10af4ad191..971359d62c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsResponse.java index b413a17916..04d909fef5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SegmentsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.segments.SegmentsRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java index 96c09ee559..40a3e129a3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.Bytes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsResponse.java index ea7219a51f..38e1f60fde 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ShardsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.shards.ShardsRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java index 70bf7a5abc..baa057084e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsResponse.java index 311328b8c2..d1804b5f31 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/SnapshotsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.snapshots.SnapshotsRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java index 0c7d44eb89..f030ab8eff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksResponse.java index 936152b5ae..d0d583ce98 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TasksResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.tasks.TasksRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java index 28c0aec995..9d279f1294 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesResponse.java index 03b2db22cd..92a4a50097 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/TemplatesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.templates.TemplatesRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java index 856487d47d..5f45d3a1ca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolResponse.java index cbb6d343e1..bdeb060be9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/ThreadPoolResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat; import org.opensearch.client.opensearch.cat.thread_pool.ThreadPoolRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/aliases/AliasesRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/aliases/AliasesRecord.java index beb3b2c90b..ed6920d33d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/aliases/AliasesRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/aliases/AliasesRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.aliases; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/allocation/AllocationRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/allocation/AllocationRecord.java index a5430408c6..128b399785 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/allocation/AllocationRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/allocation/AllocationRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.allocation; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/cluster_manager/ClusterManagerRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/cluster_manager/ClusterManagerRecord.java index e3be9ef098..c8629cc995 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/cluster_manager/ClusterManagerRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/cluster_manager/ClusterManagerRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.cluster_manager; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/count/CountRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/count/CountRecord.java index 47abe44659..0da79c7f51 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/count/CountRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/count/CountRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.count; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/fielddata/FielddataRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/fielddata/FielddataRecord.java index f6e8081728..7fdbe0e9da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/fielddata/FielddataRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/fielddata/FielddataRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.fielddata; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/health/HealthRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/health/HealthRecord.java index f70e98b2b2..8242d2b1d1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/health/HealthRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/health/HealthRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.health; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/help/HelpRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/help/HelpRecord.java index 2151af8593..348e84f996 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/help/HelpRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/help/HelpRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.help; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/indices/IndicesRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/indices/IndicesRecord.java index d13eeef51f..7ed72412f6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/indices/IndicesRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/indices/IndicesRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodeattrs/NodeAttributesRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodeattrs/NodeAttributesRecord.java index 7d7d9b4578..72fdfa8dc2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodeattrs/NodeAttributesRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodeattrs/NodeAttributesRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.nodeattrs; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodes/NodesRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodes/NodesRecord.java index cad2dfecdb..5f58b4ed0a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodes/NodesRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/nodes/NodesRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/pending_tasks/PendingTasksRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/pending_tasks/PendingTasksRecord.java index b1ef454eaa..67d00a3661 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/pending_tasks/PendingTasksRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/pending_tasks/PendingTasksRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.pending_tasks; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/plugins/PluginsRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/plugins/PluginsRecord.java index 94f8ad7232..af13d4ac75 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/plugins/PluginsRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/plugins/PluginsRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.plugins; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/recovery/RecoveryRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/recovery/RecoveryRecord.java index 5c4b9e2847..7cf4fe0c0b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/recovery/RecoveryRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/recovery/RecoveryRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/repositories/RepositoriesRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/repositories/RepositoriesRecord.java index a2766a58b5..bb15122358 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/repositories/RepositoriesRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/repositories/RepositoriesRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.repositories; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/segments/SegmentsRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/segments/SegmentsRecord.java index e184abe69f..ea829d92c1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/segments/SegmentsRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/segments/SegmentsRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.segments; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/shards/ShardsRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/shards/ShardsRecord.java index 5f93bc66a2..8c71d60cad 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/shards/ShardsRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/shards/ShardsRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.shards; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/snapshots/SnapshotsRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/snapshots/SnapshotsRecord.java index b70aabde4e..5c6016913a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/snapshots/SnapshotsRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/snapshots/SnapshotsRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.snapshots; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/tasks/TasksRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/tasks/TasksRecord.java index e6ce411ec6..f8d2c73de6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/tasks/TasksRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/tasks/TasksRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.tasks; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/templates/TemplatesRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/templates/TemplatesRecord.java index b1a0ae0d5d..8460406a7b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/templates/TemplatesRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/templates/TemplatesRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.templates; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolRecord.java index 46943565f6..e13aaa3225 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.thread_pool; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolSize.java b/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolSize.java index e93b8bf343..1c75eef5e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolSize.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cat/thread_pool/ThreadPoolSize.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cat.thread_pool; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainRequest.java index 5083a6495b..a5a6730d95 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainResponse.java index 53cbfe707b..06baea126f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/AllocationExplainResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch.cluster.allocation_explain.AllocationDecision; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsRequest.java index b375d96217..9103695d3f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java index b8f65abb00..d00048564f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.HealthStatus; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplate.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplate.java index 9861864b87..ec5ac496fc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateNode.java index 91ba883e36..e3164b2471 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateSummary.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateSummary.java index a4ab31bb8d..a3e898f119 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateSummary.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ComponentTemplateSummary.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateRequest.java index 8996916a57..5a985bb95f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateResponse.java index 309d7028df..29ea544e29 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteComponentTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsRequest.java index cb33af97f9..5145aa7ff2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsResponse.java index b688481ef7..6b63f4d14d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/DeleteVotingConfigExclusionsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateRequest.java index 2202f78d8a..178312a7e1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateResponse.java index ad82dd8c12..d52c988ecc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/ExistsComponentTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsRequest.java index 0b83afbd74..08496402ff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsResponse.java index f743264c2b..b45f234c3e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetClusterSettingsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateRequest.java index 0e3518c07f..eb37dd4ded 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateResponse.java index 544b6fd808..7ec55bcc9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/GetComponentTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthRequest.java index 732438b462..4fbaf8b897 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthResponse.java index cec08353de..98e15c5acd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/HealthResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.HealthStatus; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterAsyncClient.java index 3f94fe7d82..8ca8ad1952 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterClient.java index 58cfe95842..4ff203e947 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/OpenSearchClusterClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksRequest.java index cdb4ae7d7c..33474b3c9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksResponse.java index 90b730dc0d..d1a1a23aae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PendingTasksResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch.cluster.pending_tasks.PendingTask; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsRequest.java index 4b41d99db8..ba54777114 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsResponse.java index b5e6af65d2..52d2e68bca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PostVotingConfigExclusionsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsRequest.java index 2dc2543c18..0af5d69451 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsResponse.java index 2533afe064..62c7e979b5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutClusterSettingsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateRequest.java index 5c308101db..ffe4d6ad0b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateResponse.java index f4440ce466..345cd9ba23 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/PutComponentTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoRequest.java index b3501083e0..4229f7e522 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoResponse.java index d97a30a05c..001e6e118a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RemoteInfoResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch.cluster.remote_info.ClusterRemoteInfo; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteRequest.java index a18f1a8387..36fe8e2888 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteResponse.java index df615eab93..635ead6916 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/RerouteResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch.cluster.reroute.RerouteExplanation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateRequest.java index 7268d3950d..0fb496344c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateResponse.java index 900b56ef2b..12f447c448 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/StateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationDecision.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationDecision.java index 38d7d495f5..75348d9a44 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationDecision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationDecision.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationExplainDecision.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationExplainDecision.java index 10e71cce8c..9c7efc2d74 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationExplainDecision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationExplainDecision.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationStore.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationStore.java index 64c9d7d793..f1e97a6afd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationStore.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/AllocationStore.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ClusterInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ClusterInfo.java index aa48adfb90..e434d7bc52 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ClusterInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ClusterInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/CurrentNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/CurrentNode.java index 19530b63a1..838ad9e1c9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/CurrentNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/CurrentNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/Decision.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/Decision.java index b54c87ef3d..d8b48a60ef 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/Decision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/Decision.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/DiskUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/DiskUsage.java index 63c1daa08f..7a8508c8b1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/DiskUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/DiskUsage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeAllocationExplanation.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeAllocationExplanation.java index 228dda90b0..e31e952afa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeAllocationExplanation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeAllocationExplanation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeDiskUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeDiskUsage.java index 31aa85c9d3..0e05930ef3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeDiskUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/NodeDiskUsage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ReservedSize.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ReservedSize.java index 246c88ac07..820cab950c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ReservedSize.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/ReservedSize.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformation.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformation.java index 56c3a02703..03a640e3ae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformationReason.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformationReason.java index 50ddd53ce9..1e7a2a2ec7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformationReason.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/allocation_explain/UnassignedInformationReason.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.allocation_explain; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/IndexHealthStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/IndexHealthStats.java index 992c274849..5837bddadb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/IndexHealthStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/IndexHealthStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.health; import org.opensearch.client.opensearch._types.HealthStatus; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/ShardHealthStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/ShardHealthStats.java index d324ab234e..5eb2f74b67 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/ShardHealthStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/health/ShardHealthStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.health; import org.opensearch.client.opensearch._types.HealthStatus; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/pending_tasks/PendingTask.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/pending_tasks/PendingTask.java index 835ba6abf6..aa59ba0375 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/pending_tasks/PendingTask.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/pending_tasks/PendingTask.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.pending_tasks; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfo.java index 6a53bb8914..a6b9ea2e3d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.remote_info; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoBuilders.java index 4747f81fe5..5d0c8ec2d9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.remote_info; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoVariant.java index 7de628e8de..8af7a06973 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteInfoVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.remote_info; import org.opensearch.client.json.JsonpSerializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteProxyInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteProxyInfo.java index f82eb14d8a..3288758e6d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteProxyInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteProxyInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.remote_info; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteSniffInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteSniffInfo.java index 309bb7b395..fb916f5ee4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteSniffInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/remote_info/ClusterRemoteSniffInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.remote_info; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/Command.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/Command.java index 4a5bb6065e..8ca32e01d5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/Command.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/Command.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocatePrimaryAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocatePrimaryAction.java index fe89082fc4..c2d46bf067 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocatePrimaryAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocatePrimaryAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocateReplicaAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocateReplicaAction.java index bda37d4350..4aa92bcab6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocateReplicaAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandAllocateReplicaAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandCancelAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandCancelAction.java index 277077a7d2..3cf48816ae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandCancelAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandCancelAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandMoveAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandMoveAction.java index ac33371f02..459db41501 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandMoveAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/CommandMoveAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteDecision.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteDecision.java index ec9a6d7627..e1b07b10d8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteDecision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteDecision.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteExplanation.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteExplanation.java index 5339203623..704882e9d0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteExplanation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteExplanation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteParameters.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteParameters.java index 6a35551fad..fe0bbe3916 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteParameters.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/reroute/RerouteParameters.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.reroute; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/CharFilterTypes.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/CharFilterTypes.java index 112da697b1..ea516fe726 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/CharFilterTypes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/CharFilterTypes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterFileSystem.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterFileSystem.java index 24485e2d52..dd52b3e3f7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterFileSystem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterFileSystem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndices.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndices.java index 35aeb7ee25..8ebae307b0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndices.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndices.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.opensearch._types.CompletionStats; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShards.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShards.java index a852a03780..8cb9b3202f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShards.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShards.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShardsIndex.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShardsIndex.java index 4e1ddbcee9..59a66aae35 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShardsIndex.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIndicesShardsIndex.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIngest.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIngest.java index 2c5ccb81df..d44ac89be6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIngest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterIngest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvm.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvm.java index dbf6db215b..e4734de17c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvm.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvm.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmMemory.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmMemory.java index c139e22614..d1480f6bdd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmMemory.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmMemory.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmVersion.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmVersion.java index 8ed7fdbfea..01f01bd0c8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmVersion.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterJvmVersion.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNetworkTypes.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNetworkTypes.java index 5fb3f939c5..21580bd6b4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNetworkTypes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNetworkTypes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodeCount.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodeCount.java index 974d9f1c42..2240ec3269 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodeCount.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodeCount.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodes.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodes.java index cdd58b1ff8..59693f638e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterNodes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.opensearch._types.PluginStats; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystem.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystem.java index a3ea6b5ad3..5e17433aa7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemArchitecture.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemArchitecture.java index a50cb356f7..72f334d290 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemArchitecture.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemArchitecture.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemName.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemName.java index 51bf8c0802..60443c349b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemName.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemName.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemPrettyName.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemPrettyName.java index 3a8a8b6c91..99eb568637 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemPrettyName.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterOperatingSystemPrettyName.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcess.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcess.java index 364f33784b..6b76bbe045 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcess.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcess.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessCpu.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessCpu.java index ea621578ad..6bc4e16932 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessCpu.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessCpu.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessOpenFileDescriptors.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessOpenFileDescriptors.java index 2800ea391c..1ca9e15d8b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessOpenFileDescriptors.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessOpenFileDescriptors.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessor.java index 0486960550..4a16d962c7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterShardMetrics.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterShardMetrics.java index d5eb355730..a0f1192b65 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterShardMetrics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/ClusterShardMetrics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypes.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypes.java index 863c5b212c..c833ec03ca 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypesMappings.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypesMappings.java index 9fbf179854..d9f59828cb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypesMappings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/FieldTypesMappings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/IndicesVersions.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/IndicesVersions.java index 3940321760..9b820eacbb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/IndicesVersions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/IndicesVersions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/NodePackagingType.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/NodePackagingType.java index e6a729b7f7..7c35b321fb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/NodePackagingType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/NodePackagingType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/OperatingSystemMemoryInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/OperatingSystemMemoryInfo.java index c48ccae1c9..12e59c96d3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/OperatingSystemMemoryInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/OperatingSystemMemoryInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/RuntimeFieldTypes.java b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/RuntimeFieldTypes.java index aeb4eb28d9..374169f753 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/RuntimeFieldTypes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/cluster/stats/RuntimeFieldTypes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.cluster.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkRequest.java index 216fda5e86..98a599faa3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkResponse.java index 3050ff782b..aed5b709df 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/BulkResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.bulk.BulkResponseItem; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollRequest.java index b0e8dac5a8..01c81f67e0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollResponse.java index e27f7f2abc..5e8a01a8aa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ClearScrollResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/CountRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/CountRequest.java index 8da350aa8b..6b44fe2991 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/CountRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/CountRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/CountResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/CountResponse.java index 5a67934442..c9556a17b5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/CountResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/CountResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateRequest.java index cbb96b4093..0de43c0dbf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateResponse.java index a694193e06..1a701d19ac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/CreateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.WriteResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java index 516f62060c..3d4d58a13d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.Conflicts; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryResponse.java index f352f2a921..474e8b3326 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.BulkIndexByScrollFailure; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleRequest.java index aea3e8c998..a0f81f73f7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleResponse.java index 39361d001d..dc72e29d38 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteByQueryRethrottleResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.tasks.ListResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteRequest.java index 4b779d7575..cc77151e12 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteResponse.java index 60f2c9264c..71981cae30 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.WriteResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptRequest.java index b91c06d857..08462a457a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptResponse.java index fbe245002e..fcc6fd4c57 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/DeleteScriptResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsRequest.java index 978367e9c1..f1a00dc712 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsResponse.java index 771d341e82..81d46e15ee 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceRequest.java index b238bc4fb1..9144e7c078 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceResponse.java index c8b954fb83..a9f507c2ea 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExistsSourceResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainRequest.java index 572b500ece..404b2f8aa1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainResponse.java index b7dd8279b2..8aebce88ee 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ExplainResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.InlineGet; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsRequest.java index f75279b860..f6793460c7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsResponse.java index 13d3324411..86f9df9232 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/FieldCapsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.field_caps.FieldCapability; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetRequest.java index 2ee008cfaf..8c67517146 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetResponse.java index 1d08a32c95..a83af7e65f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.get.GetResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextRequest.java index fde68054c9..a17b858385 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextResponse.java index becee43ddf..5df0f16ec1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptContextResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.get_script_context.Context; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesRequest.java index 93b5570906..e3b566a709 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesResponse.java index bccefa3b72..dbf4a2a16b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptLanguagesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.get_script_languages.LanguageContext; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptRequest.java index df49a513a9..16d3d0377a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptResponse.java index 7cf1578597..fd8744b101 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetScriptResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.StoredScript; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceRequest.java index 943bf21e96..c2912018a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceResponse.java index b10752319a..98e6230228 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/GetSourceResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexRequest.java index e3178df13c..f0622b847e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexResponse.java index 59388b9819..46976fdfff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/IndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.WriteResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoRequest.java index aeec589bd7..8b98380ba8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoResponse.java index 343f5c9f76..90efc8d5ed 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/InfoResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.OpenSearchVersionInfo; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetRequest.java index 64d7be1cf6..822754fd02 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetResponse.java index 9b89e4ee6a..7d98ce69ee 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MgetResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.mget.MultiGetResponseItem; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchRequest.java index 47ea7c7236..a6660a5145 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchResponse.java index 2dd37ec63f..2e410a8d89 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.msearch.MultiSearchResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateRequest.java index cdd85aeaec..8b9caa89da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateResponse.java index 9962216d60..ae3468a50b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.msearch.MultiSearchResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsRequest.java index c66d86503a..37118d5a0f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsResponse.java index fb8f2ebaba..0cd589ee5c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/MtermvectorsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.mtermvectors.MultiTermVectorsResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/PingRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/PingRequest.java index bb54397ca4..dd2b674367 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/PingRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/PingRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/PingResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/PingResponse.java index 9ee9e35fd9..959d1ed339 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/PingResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/PingResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptRequest.java index 77cf9ac348..5deebfc799 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptResponse.java index 7a203aaa1f..e7016ed53e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/PutScriptResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalRequest.java index 6c1a84024f..79531eb17f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalResponse.java index d120f1350b..0ac249bbda 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/RankEvalResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.rank_eval.RankEvalMetricDetail; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java index fd105054e7..821d14024e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.Conflicts; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexResponse.java index 8920bacd8f..28f670ddae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.BulkIndexByScrollFailure; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleRequest.java index 39fab95ea6..c2459968e7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleResponse.java index 14c71cf70a..c67ee277e4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ReindexRethrottleResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.reindex_rethrottle.ReindexNode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateRequest.java index ceece041fa..c7078087be 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateResponse.java index 8143e8b3a2..5b545efc8d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/RenderSearchTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteRequest.java index 2a609460a4..31dc338f41 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteResponse.java index 96a2f2a256..977b6b01d6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScriptsPainlessExecuteResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollRequest.java index 886bc856b6..6e9c7c0b4d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollResponse.java index 5032b6d55c..72f68e7819 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/ScrollResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java index fe3627e74e..138fe7c104 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java index 06f99dcf7b..e7157c92c9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsRequest.java index d56b15b377..b4648b87ac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsResponse.java index bf5050a027..1c15d06368 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchShardsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.NodeAttributes; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateRequest.java index b6a5f57a7f..86a6b9060d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java index 674dff5dee..3c9e23c2aa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/SearchTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumRequest.java index af1c3b7c35..f4f78ec07d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumResponse.java index 358e0095b1..d1a4c4cffc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermsEnumResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsRequest.java index c57e72144c..973a39a15a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsResponse.java index 5ec91fcef8..8eb6f99b7d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/TermvectorsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.termvectors.TermVector; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java index f651b23696..02be7da80b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.Conflicts; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryResponse.java index 0bd05da60c..a5abe88b7c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.BulkIndexByScrollFailure; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleRequest.java index 0338ccba99..94d0def42b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleResponse.java index d16dccb225..a93ee0bbfd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateByQueryRethrottleResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch.core.update_by_query_rethrottle.UpdateByQueryRethrottleNode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateRequest.java index 847e84a295..45eae4b9a2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateResponse.java index 98130fff0e..4ef62727da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/UpdateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core; import org.opensearch.client.opensearch._types.InlineGet; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperation.java index 80a12fa650..755ad6ad2a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBase.java index ee08dc08ae..c5371baa35 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.opensearch._types.VersionType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBuilders.java index f539d99a02..20aec02142 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationVariant.java index b1e9cf80d0..e450a5125e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkOperationVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkResponseItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkResponseItem.java index 59faeeaf08..22c0648f3f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkResponseItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/BulkResponseItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/CreateOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/CreateOperation.java index 6d3aebadbf..ecf6464a9c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/CreateOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/CreateOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonpSerializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/DeleteOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/DeleteOperation.java index 9939b2722f..e8b4d96d17 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/DeleteOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/DeleteOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/IndexOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/IndexOperation.java index 2c00d9f2a0..1529e4c151 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/IndexOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/IndexOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonpSerializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/OperationType.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/OperationType.java index a6fa4351e3..bf99067ac9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/OperationType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/OperationType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java index 3e1c9dd890..ccbe942172 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/UpdateOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java index 8e102a10d8..cc9b818aaf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/bulk/WriteOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.bulk; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/Explanation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/Explanation.java index da4a121d00..d1c83b97c7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/Explanation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/Explanation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/ExplanationDetail.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/ExplanationDetail.java index 1942b93c87..12358064f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/ExplanationDetail.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/explain/ExplanationDetail.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.explain; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/field_caps/FieldCapability.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/field_caps/FieldCapability.java index 69c9f6a456..2e91085dc2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/field_caps/FieldCapability.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/field_caps/FieldCapability.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.field_caps; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/get/GetResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/get/GetResult.java index 8d56c8129c..c12baa34f3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/get/GetResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/get/GetResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.get; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/Context.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/Context.java index 69fdc69e7a..cda3309f26 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/Context.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/Context.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.get_script_context; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethod.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethod.java index 6b5659a6c6..c2643f7bce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethod.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethod.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.get_script_context; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethodParam.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethodParam.java index 94cf86d9a9..c4e80d5e99 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethodParam.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_context/ContextMethodParam.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.get_script_context; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_languages/LanguageContext.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_languages/LanguageContext.java index b80b58d69c..9dc8b0a543 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_languages/LanguageContext.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/get_script_languages/LanguageContext.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.get_script_languages; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetError.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetError.java index 79c181e20c..533684401b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetError.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetError.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.mget; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetOperation.java index e9dbd1cce0..fd3c294544 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.mget; import org.opensearch.client.opensearch._types.VersionType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItem.java index 3e9884d13d..33c8e463d8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.mget; import org.opensearch.client.opensearch.core.get.GetResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItemBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItemBuilders.java index 35fa36e30b..b552bc4731 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItemBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/mget/MultiGetResponseItemBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.mget; import org.opensearch.client.opensearch.core.get.GetResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchItem.java index 289b6973c1..54ddc5f1ce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.opensearch.core.SearchResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItem.java index 98a77739fb..5714678966 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItemBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItemBuilders.java index ba0c429f07..ae4a5bcf90 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItemBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResponseItemBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResult.java index 11701f378d..f6dcdee03d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultiSearchResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java index aaee0642ea..f58b987ad2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.opensearch._types.SortOptions; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchHeader.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchHeader.java index 39e5c2d1ae..d170e3d833 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchHeader.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchHeader.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.opensearch._types.ExpandWildcard; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/RequestItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/RequestItem.java index c73d446dad..890fc208be 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/RequestItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/RequestItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch; import org.opensearch.client.json.JsonpMapper; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/RequestItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/RequestItem.java index eb730dcea4..87a8921686 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/RequestItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/RequestItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch_template; import org.opensearch.client.opensearch.core.msearch.MultisearchHeader; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/TemplateConfig.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/TemplateConfig.java index 99f17279b2..6825fa7b4b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/TemplateConfig.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch_template/TemplateConfig.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.msearch_template; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsOperation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsOperation.java index 05477b2b3d..ff70f4ff6c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsOperation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsOperation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.mtermvectors; import org.opensearch.client.opensearch._types.VersionType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsResult.java index b134da33dc..95e90147fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/mtermvectors/MultiTermVectorsResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.mtermvectors; import org.opensearch.client.opensearch.core.termvectors.TermVector; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/DocumentRating.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/DocumentRating.java index e1d12ecfa7..efcace6633 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/DocumentRating.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/DocumentRating.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHit.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHit.java index dcb723e6d7..c3f3bddb82 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHit.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHit.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHitItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHitItem.java index c700270835..65fb91a508 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHitItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalHitItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetric.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetric.java index 0451ee31ae..566a95f122 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetric.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetric.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricBase.java index b0fd6ebfd5..175f4cc232 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDetail.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDetail.java index c1278cda3b..1d0927790e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDetail.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDetail.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java index 7c45b7e026..7abc3a87f5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java index 2e7fbd7fe8..65fbf0a033 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java index 33f102e486..c89bd1b253 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricPrecision.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricPrecision.java index 6df23e458e..9f21a7a225 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricPrecision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricPrecision.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRatingTreshold.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRatingTreshold.java index 331f02c725..bc21fb082f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRatingTreshold.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRatingTreshold.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRecall.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRecall.java index 13ebefa66a..a5b92142a3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRecall.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalMetricRecall.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalQuery.java index c418df8e28..9025114832 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalRequestItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalRequestItem.java index b0c80660ef..80d7045779 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalRequestItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/RankEvalRequestItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/UnratedDocument.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/UnratedDocument.java index 51e94c8ff0..73176b02c9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/UnratedDocument.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/rank_eval/UnratedDocument.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.rank_eval; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Destination.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Destination.java index 15dd25bd1e..10715f02f4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Destination.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Destination.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.reindex; import org.opensearch.client.opensearch._types.OpType; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/RemoteSource.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/RemoteSource.java index 8889777e6d..01fe6d6d66 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/RemoteSource.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/RemoteSource.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.reindex; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Source.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Source.java index 32c582e848..488403239f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Source.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex/Source.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.reindex; import org.opensearch.client.opensearch._types.SlicedScroll; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexNode.java index 65d1066381..5d4f99aaf1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.reindex_rethrottle; import org.opensearch.client.opensearch._types.BaseNode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexStatus.java index aac9292370..acef8caa24 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.reindex_rethrottle; import org.opensearch.client.opensearch._types.Retries; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexTask.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexTask.java index 88deec9876..a360ec90aa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexTask.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/reindex_rethrottle/ReindexTask.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.reindex_rethrottle; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/scripts_painless_execute/PainlessContextSetup.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/scripts_painless_execute/PainlessContextSetup.java index 0fad6bbfad..2a2a20f4fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/scripts_painless_execute/PainlessContextSetup.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/scripts_painless_execute/PainlessContextSetup.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.scripts_painless_execute; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationBreakdown.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationBreakdown.java index d533aed24d..4d28fbec19 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationBreakdown.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationBreakdown.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfile.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfile.java index 78348a9743..190ec1c57a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfile.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfile.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDebug.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDebug.java index 7ddd36098d..1c5f0a34a2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDebug.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDebug.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebug.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebug.java index f0e3748012..c73daed9c0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebug.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebug.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebugFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebugFilter.java index 42d0f51d35..ef4f86bd7a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebugFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/AggregationProfileDelegateDebugFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BoundaryScanner.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BoundaryScanner.java index 00ecc730d6..47a180ee48 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BoundaryScanner.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BoundaryScanner.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BuiltinHighlighterType.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BuiltinHighlighterType.java index 935beeb63a..65da13e8a1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BuiltinHighlighterType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/BuiltinHighlighterType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Collector.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Collector.java index 0849890d3f..6a738de0a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Collector.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Collector.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionContext.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionContext.java index feaf2fd4a7..6050189e51 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionContext.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionContext.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.GeoHashPrecision; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggestOption.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggestOption.java index 32eb7d363e..d46452d091 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggestOption.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggestOption.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java index ee7a0a543a..c42d512e78 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Context.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Context.java index e23f63a31c..700852ec63 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Context.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Context.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.GeoLocation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ContextBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ContextBuilders.java index 6c898a7a51..6dd1068191 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ContextBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ContextBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.GeoLocation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/DirectGenerator.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/DirectGenerator.java index 6067bada24..d29fb63c8e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/DirectGenerator.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/DirectGenerator.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.SuggestMode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfile.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfile.java index 17ee21166c..3794de7a1f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfile.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfile.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileBreakdown.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileBreakdown.java index 4c96693c1f..79b286f2b6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileBreakdown.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileBreakdown.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileDebug.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileDebug.java index 42056dbe35..ec0c1e70c1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileDebug.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FetchProfileDebug.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldCollapse.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldCollapse.java index 57e304cf6a..7b73fb5591 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldCollapse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldCollapse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java index 50e0836df8..4112a0dfa9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggester.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterBuilders.java index b98cf4097e..0331a3c9e9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterVariant.java index 1738073f40..871364689a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/FieldSuggesterVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java index 20cabf1393..632b545bf3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Highlight.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlightField.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlightField.java index b4ca946b65..89994c2f37 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlightField.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlightField.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterEncoder.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterEncoder.java index 276a27971c..6504b5f6e2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterEncoder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterEncoder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterFragmenter.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterFragmenter.java index e077a5ddf3..92e0f4c7ec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterFragmenter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterFragmenter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterOrder.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterOrder.java index 78abc384f7..9ce7e9b5d8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterOrder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterOrder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTagsSchema.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTagsSchema.java index 59e5a49e37..8287d0624c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTagsSchema.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTagsSchema.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterType.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterType.java index 442787d283..def80bd1c5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTypeBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTypeBuilders.java index 3407c3031f..f1d441f886 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTypeBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HighlighterTypeBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Hit.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Hit.java index 5bd4893b47..5791f98d70 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Hit.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Hit.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch.core.explain.Explanation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java index 86bd9dce6f..21e43775c2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/HitsMetadata.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHits.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHits.java index c54fac3da8..27d5bcfa93 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHits.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHits.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.ScriptField; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHitsResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHitsResult.java index 49543e170c..e866b7b990 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHitsResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/InnerHitsResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LaplaceSmoothingModel.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LaplaceSmoothingModel.java index 5b8453ad88..002609e0e6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LaplaceSmoothingModel.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LaplaceSmoothingModel.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LinearInterpolationSmoothingModel.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LinearInterpolationSmoothingModel.java index 14af3e2bd1..5be358cd3e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LinearInterpolationSmoothingModel.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/LinearInterpolationSmoothingModel.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/NestedIdentity.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/NestedIdentity.java index e147dc1e1c..d19f8c7f21 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/NestedIdentity.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/NestedIdentity.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollate.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollate.java index 592affd104..81c541e4a0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollateQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollateQuery.java index 7358c55f36..dd728bd48f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollateQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestCollateQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestHighlight.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestHighlight.java index 8e94674370..05593b9d5a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestHighlight.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestHighlight.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java index 3d0a15d8c0..0cc39945c8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggestOption.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggester.java index 0728c85888..e97b843fad 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/PhraseSuggester.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Profile.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Profile.java index b3e1671966..f532d1a3ec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Profile.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Profile.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryBreakdown.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryBreakdown.java index 82063578a0..6586bc8152 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryBreakdown.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryBreakdown.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryProfile.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryProfile.java index 9ee0ef987e..57c34a5da4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryProfile.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/QueryProfile.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Rescore.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Rescore.java index 47a54da9e5..9a3e3a0c19 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Rescore.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Rescore.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/RescoreQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/RescoreQuery.java index 534063b30a..ee51838bf7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/RescoreQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/RescoreQuery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ScoreMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ScoreMode.java index 385b45659b..6017c76af9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ScoreMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ScoreMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchProfile.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchProfile.java index c7cacc7dd5..f91cb73228 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchProfile.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchProfile.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ShardProfile.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ShardProfile.java index 2a78610896..c3f864b91e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ShardProfile.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/ShardProfile.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModel.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModel.java index 9e0f8e6d8c..d2d3967998 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModel.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModel.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelBuilders.java index 1e6d474f63..db4c422712 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelVariant.java index cef9f887f8..61e5546d44 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SmoothingModelVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfig.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfig.java index 3f9e24c8e1..dbd9c86e19 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfig.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfig.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigBuilders.java index 90225b2079..4ce81619cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParam.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParam.java index a8d524d050..d727d53cff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParam.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParam.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParamBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParamBuilders.java index 67681f7346..792fc3ba78 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParamBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceConfigParamBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceFilter.java index 7e33066f89..a23a650e0c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SourceFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StringDistance.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StringDistance.java index aa81399704..f36cc382db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StringDistance.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StringDistance.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StupidBackoffSmoothingModel.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StupidBackoffSmoothingModel.java index beb6dced35..cd9897567f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StupidBackoffSmoothingModel.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/StupidBackoffSmoothingModel.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java index 33cd35e581..33a7f2b08d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import java.util.HashMap; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java index 85cba9dad5..b6898ea6af 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestFuzziness.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestFuzziness.java index d56b7a8416..b870217f10 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestFuzziness.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestFuzziness.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java index 26bf13823c..06e270c67b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestOptionBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestSort.java index 8a37a9297b..dc417d531c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggestSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggester.java index cf9867a363..64b2ba2d87 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/Suggester.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggesterBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggesterBase.java index b1ad9814d7..36fa611c4a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggesterBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/SuggesterBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggestOption.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggestOption.java index 6472a355ad..d43cc55c4f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggestOption.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggestOption.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggester.java index e9bef132a9..43638b695d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TermSuggester.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.opensearch._types.SuggestMode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHits.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHits.java index c86e83263b..712f5a3a0f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHits.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHits.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHitsRelation.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHitsRelation.java index 9cd86e6419..b7e7bf6fac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHitsRelation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TotalHitsRelation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHits.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHits.java index 3ef1211ed2..912b2fa1c4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHits.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHits.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHitsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHitsBuilders.java index 61b33d9d41..27093f8db2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHitsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/TrackHitsBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search_shards/ShardStoreIndex.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search_shards/ShardStoreIndex.java index 693e5d600a..eaf821f191 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search_shards/ShardStoreIndex.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search_shards/ShardStoreIndex.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.search_shards; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/FieldStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/FieldStatistics.java index 6e3c79b2c4..1f51d0de9d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/FieldStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/FieldStatistics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.termvectors; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Filter.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Filter.java index 9c4867cb98..c11333e209 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Filter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Filter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.termvectors; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java index 29345a194c..cb654cbeb3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.termvectors; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java index 1ab16b2d26..3ce0d1e1a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.termvectors; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Token.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Token.java index 04ebb9b739..492a1b9942 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Token.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Token.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.termvectors; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/update_by_query_rethrottle/UpdateByQueryRethrottleNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/update_by_query_rethrottle/UpdateByQueryRethrottleNode.java index ac6370e1a6..affd7801a4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/update_by_query_rethrottle/UpdateByQueryRethrottleNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/update_by_query_rethrottle/UpdateByQueryRethrottleNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.core.update_by_query_rethrottle; import org.opensearch.client.opensearch._types.BaseNode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexRequest.java index 07384df4a2..2416f3d5f2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java index 636b17e726..7de44993aa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java index 3f8584ae6f..818566242c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java index ca922c94e6..a22ca6078e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java index 80a235b26a..974de601f6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java index 4dcafb4200..f5aab99f1c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.opensearch.dangling_indices.list_dangling_indices.DanglingIndex; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesAsyncClient.java index 866377eb53..c3d6da1752 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesClient.java index 13677b7a99..6b58708f47 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/OpenSearchDanglingIndicesClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java index a56b9cf96c..0ae12275be 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.dangling_indices.list_dangling_indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/Feature.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/Feature.java index 22b2c1596c..75d1a71624 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/Feature.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/Feature.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesRequest.java index 6d1a096cde..a809cc6a5d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesResponse.java index 47dde9e780..3ece8c6245 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/GetFeaturesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesAsyncClient.java index 379af0d8a3..91a029d8c8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesClient.java index d023d53353..53e485f45c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/OpenSearchFeaturesClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesRequest.java index 359dba461b..da428439d5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesResponse.java index abb96f19b6..8096756c27 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/features/ResetFeaturesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.features; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockRequest.java index 6cc44eaf3d..fd060da430 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockResponse.java index 51da2286a2..0688a6cd25 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AddBlockResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/Alias.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/Alias.java index ba20e73caf..9b85a3426c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/Alias.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/Alias.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AliasDefinition.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AliasDefinition.java index 63faebe0d9..4fb23cc7a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AliasDefinition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AliasDefinition.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeRequest.java index 2d631cc21f..c8c3e1f24a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeResponse.java index 8bf7c2d02d..314ea9c94b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/AnalyzeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.analyze.AnalyzeDetail; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheRequest.java index c96a7330ad..8d036efcc9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheResponse.java index ea63a6c0dd..d7fff6d8b4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ClearCacheResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardsOperationResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexRequest.java index 1c8849e54b..5347788c45 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexResponse.java index ad5ad4873f..d6c525adeb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloneIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexRequest.java index d949979f7e..0d0891ecf3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexResponse.java index 63de43ab24..61c6dc9c09 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CloseIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexRequest.java index cb79c278cc..7fc33c47fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexResponse.java index ce584ca8df..2732799abe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/CreateIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java index 9c942bfa15..80552952ea 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DataStream.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasRequest.java index ac96f65045..ae2ecdc28e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasResponse.java index f7a4889e84..8d484c9b07 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteAliasResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexRequest.java index 8e70be835e..379a09a8d1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexResponse.java index 28c03e6028..30d08cd3c6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.IndicesResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateRequest.java index 79e29165fd..6a4cd1073e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateResponse.java index 84bdf5d9f7..dcc03fad05 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteIndexTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateRequest.java index 6c821ebe1e..2c2bb8671e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateResponse.java index 2b8ed2ae85..38f45241cc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DeleteTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageRequest.java index a91434a8fe..df968ef678 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageResponse.java index a1fa2b39f5..2ca716205c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/DiskUsageResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasRequest.java index 602fef6fbd..3ebb9a5507 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasResponse.java index 5a20e45f9a..c791d97c9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsAliasResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateRequest.java index 39e13c9694..fe8fba2838 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateResponse.java index 30a6811681..4a957b75bb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsIndexTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsRequest.java index ab9f13b0e2..239965a2b0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsResponse.java index abbbfd07c6..1db47b2a33 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateRequest.java index 64e094c8ab..6b9ce69776 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateResponse.java index c59efffb56..d5c30f2f64 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ExistsTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/FielddataFrequencyFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/FielddataFrequencyFilter.java index 60e7330c4a..4e41bb0d6c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/FielddataFrequencyFilter.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/FielddataFrequencyFilter.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushRequest.java index c36f41400a..603cdafd0c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushResponse.java index d097956050..8f0d29362a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/FlushResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardsOperationResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeRequest.java index d54de87b24..c23fd9f2f6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeResponse.java index a388bef4ce..b7dd81d17e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ForcemergeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardsOperationResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasRequest.java index d7ac8959e6..086190adab 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasResponse.java index 1be75934d1..e225b27ee1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetAliasResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.get_alias.IndexAliases; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingRequest.java index d451dbff52..584f66969f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingResponse.java index 465a3225bb..c2031513db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetFieldMappingResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.get_field_mapping.TypeFieldMappings; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexRequest.java index e2e25f6461..49d5208b06 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexResponse.java index 9f17af3604..10e0882619 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateRequest.java index 1f518ebdff..a48abbbd2e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateResponse.java index 244570116b..3a6769d188 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndexTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.get_index_template.IndexTemplateItem; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsRequest.java index 866b6b390d..df4c0b2feb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsResponse.java index 54586dbdc5..1c45ecea1b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetIndicesSettingsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingRequest.java index 6094e98a4f..a2133d1463 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingResponse.java index 836c7e2510..3a4aa18869 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetMappingResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.get_mapping.IndexMappingRecord; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateRequest.java index 1312f76e1f..d83b27c74b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateResponse.java index 7f7c4496e1..6d6b35e485 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeRequest.java index 5e1ebfd003..62ee10e441 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeResponse.java index a207c86d37..8298e6d565 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/GetUpgradeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexCheckOnStartup.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexCheckOnStartup.java index a6d8d61d9d..bb8467c71e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexCheckOnStartup.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexCheckOnStartup.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRouting.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRouting.java index 7c6f863ee4..d91078db83 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRouting.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRouting.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocation.java index d36aa71156..d4c0589a7c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationDisk.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationDisk.java index dea1125e38..c06e5f2fd3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationDisk.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationDisk.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInclude.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInclude.java index 36c334d146..9a2d2fbc8b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInclude.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInclude.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInitialRecovery.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInitialRecovery.java index 05e14cc522..8052ef6cec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInitialRecovery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationInitialRecovery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationOptions.java index 91cdbac6c8..b0a23c10d0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingAllocationOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalance.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalance.java index 98661a0fc8..6d10a68b17 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalance.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalance.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalanceOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalanceOptions.java index e00305918d..b4f63ad609 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalanceOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexRoutingRebalanceOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSegmentSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSegmentSort.java index 2564599c6a..487c0ef3b7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSegmentSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSegmentSort.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingBlocks.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingBlocks.java index b773603699..bf36e6ec14 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingBlocks.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingBlocks.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java index 14f6697f55..acffec9688 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import jakarta.json.stream.JsonGenerator; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsAnalysis.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsAnalysis.java index 1d17d5396c..0df6c234ff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsAnalysis.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexSettingsAnalysis.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.analysis.Analyzer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexState.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexState.java index 0a06b76621..438493ddd4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexState.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexState.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexVersioning.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexVersioning.java index f91dfd7fbe..630949df23 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexVersioning.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndexVersioning.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsRequest.java index af9561945b..e11b76c218 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsResponse.java index 8e4ac20e14..08e45497e1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/IndicesStatsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddata.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddata.java index 59e2ed928e..1821e27ef9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddata.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddata.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddataFormat.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddataFormat.java index 8d0ff9491a..0b6ee76cb4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddataFormat.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/NumericFielddataFormat.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenRequest.java index bae12c1dc8..6594887f53 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenResponse.java index bf7138d2fb..e1f6feab31 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java index b1b9db407e..986f6e8f8e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java index 3d1122a3aa..3d7d6ec9ac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OpenSearchIndicesClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OverlappingIndexTemplate.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OverlappingIndexTemplate.java index ac021704c0..a1fec4227d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/OverlappingIndexTemplate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/OverlappingIndexTemplate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasRequest.java index 49808d6ad0..ade44beb3f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasResponse.java index cfd77b433c..fc94771ce2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutAliasResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateRequest.java index cefedd9134..4fd03a126f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateResponse.java index e0640bbd8a..90fd7f4da4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndexTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsRequest.java index 7bc41cfa03..e2f5d78000 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsResponse.java index b756271783..68a62809b1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutIndicesSettingsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java index afd9a749c2..53d45e8193 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingResponse.java index 5571fd2ab0..7fc8256c6e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.IndicesResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateRequest.java index 516487ce09..4cef1b74d4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateResponse.java index c7af8e1b53..8fefbbe9e6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryRequest.java index fb572dd2a8..375d7fd7e6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryResponse.java index 05f511d864..67bedb8468 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RecoveryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.recovery.RecoveryStatus; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshRequest.java index 719635818f..d79ad608a4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshResponse.java index 8776a9c88f..8f879ff59b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RefreshResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardsOperationResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexRequest.java index c2571f90f6..4ba46e52ed 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexResponse.java index 1f9e8b8e40..d89df41d9c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ResolveIndexResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.resolve_index.ResolveIndexAliasItem; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverRequest.java index 15d8fede25..061e75da0d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverResponse.java index c13aa2ecf4..1879481dc8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/RolloverResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMissing.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMissing.java index b2d5407bf4..cfe9047ec7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMissing.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMissing.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMode.java index d7284eb7c9..7cb1ef31d2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortMode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortOrder.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortOrder.java index 4dc2c460b3..3a99e37bf8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortOrder.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentSortOrder.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsRequest.java index 5ff40cdc66..083e75085c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsResponse.java index e20fe11f5d..7c575aaff7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SegmentsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresRequest.java index 1570e42452..bfe6d132ed 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresResponse.java index 1e4204c695..8d39cbe910 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShardStoresResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.shard_stores.IndicesShardStores; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkRequest.java index d67c349c99..547beb6085 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkResponse.java index 51de2671dc..153dd0ab8c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ShrinkResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateRequest.java index 3bab1a996f..703369a2a9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateResponse.java index 3a12d8b962..221ee60f38 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateIndexTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateRequest.java index fa20cfc9ea..4c009743c6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateResponse.java index 56ee496bb5..5ffc079d72 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SimulateTemplateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch.indices.simulate_template.Template; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SoftDeletes.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SoftDeletes.java index dfb44ab6cc..3edc5add2b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SoftDeletes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SoftDeletes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitRequest.java index 95ad5c16d3..f6009b5e84 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitResponse.java index dc6f6b9f84..9f177168c1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/SplitResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/TemplateMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/TemplateMapping.java index a8d917e5d8..fd36f3aac7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/TemplateMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/TemplateMapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesRequest.java index 00a8f591fa..ca604c8b2e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesResponse.java index e522c34066..f9746fc372 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpdateAliasesResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeRequest.java index 39f5f06741..ffa508afb6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeResponse.java index c48141f3c8..9d768a7b6e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/UpgradeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryRequest.java index 9e8bb3b25d..d259a2b587 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryResponse.java index be678dbcf9..070ef2d88f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/ValidateQueryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockOptions.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockOptions.java index 346d2a4b61..6846d2a253 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockOptions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.add_block; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockStatus.java index 4a21c7a100..57a3034a6a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/add_block/IndicesBlockStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.add_block; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeDetail.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeDetail.java index e8eca00efe..4cabd3343a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeDetail.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeDetail.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.analyze; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeToken.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeToken.java index 83446de4a1..0c0a1f6787 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeToken.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzeToken.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.analyze; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzerDetail.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzerDetail.java index 04b10a8d01..99a2a84bd6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzerDetail.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/AnalyzerDetail.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.analyze; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/CharFilterDetail.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/CharFilterDetail.java index 7dad556ae3..7fc5689269 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/CharFilterDetail.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/CharFilterDetail.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.analyze; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/ExplainAnalyzeToken.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/ExplainAnalyzeToken.java index e161b9b614..fb58ae2e17 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/ExplainAnalyzeToken.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/ExplainAnalyzeToken.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.analyze; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/TokenDetail.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/TokenDetail.java index b20be9a8c2..c18211d512 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/TokenDetail.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/analyze/TokenDetail.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.analyze; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseIndexResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseIndexResult.java index 29f95849e6..cb5fd7484b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseIndexResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseIndexResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.close; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseShardResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseShardResult.java index f5fd6f67a2..4c60e9fe79 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseShardResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/close/CloseShardResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.close; import org.opensearch.client.opensearch._types.ShardFailure; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_alias/IndexAliases.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_alias/IndexAliases.java index ec2c94c633..d702065821 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_alias/IndexAliases.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_alias/IndexAliases.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.get_alias; import org.opensearch.client.opensearch.indices.AliasDefinition; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_field_mapping/TypeFieldMappings.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_field_mapping/TypeFieldMappings.java index 6443dcd370..5c6ff2ddb0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_field_mapping/TypeFieldMappings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_field_mapping/TypeFieldMappings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.get_field_mapping; import org.opensearch.client.opensearch._types.mapping.FieldMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplate.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplate.java index d2f280b3b0..913e57e995 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplate.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplate.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.get_index_template; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateItem.java index 841efbc99d..c66587d045 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.get_index_template; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateSummary.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateSummary.java index cf8bc69941..393b1445b2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateSummary.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_index_template/IndexTemplateSummary.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.get_index_template; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_mapping/IndexMappingRecord.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_mapping/IndexMappingRecord.java index a5b1612000..9042c2953e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_mapping/IndexMappingRecord.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/get_mapping/IndexMappingRecord.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.get_mapping; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/put_index_template/IndexTemplateMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/put_index_template/IndexTemplateMapping.java index 2b18652360..80d6042764 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/put_index_template/IndexTemplateMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/put_index_template/IndexTemplateMapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.put_index_template; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/FileDetails.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/FileDetails.java index 2342dcbe09..5750955286 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/FileDetails.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/FileDetails.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryBytes.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryBytes.java index 7f2b5031c3..fd1b912083 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryBytes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryBytes.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryFiles.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryFiles.java index 0e0de54c40..af4f8bcf04 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryFiles.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryFiles.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryIndexStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryIndexStatus.java index fd2ff638da..fa31925a21 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryIndexStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryIndexStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryOrigin.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryOrigin.java index a977bd650c..d2f09e7427 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryOrigin.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryOrigin.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStartStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStartStatus.java index 477cdcd131..d9b0d36740 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStartStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStartStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStatus.java index 0341a7d80e..5195bf68ce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/RecoveryStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/ShardRecovery.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/ShardRecovery.java index 3d5b3aefd6..f47d3d9be2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/ShardRecovery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/ShardRecovery.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/TranslogStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/TranslogStatus.java index 28c3bdd184..92c29ff6c1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/TranslogStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/TranslogStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/VerifyIndex.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/VerifyIndex.java index 5121321205..52040418b6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/VerifyIndex.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/recovery/VerifyIndex.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.recovery; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexAliasItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexAliasItem.java index 134240ba11..149469e065 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexAliasItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexAliasItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.resolve_index; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexItem.java index 31c9194218..0063b0979e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/resolve_index/ResolveIndexItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.resolve_index; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMapping.java index fbc82de49d..65fe1b7e92 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.rollover; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMappingBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMappingBuilders.java index 6388148ada..85ee1fa0dc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMappingBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/IndexRolloverMappingBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.rollover; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/RolloverConditions.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/RolloverConditions.java index f0724d968f..42608fcee1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/RolloverConditions.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/rollover/RolloverConditions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.rollover; import org.opensearch.client.opensearch._types.Time; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/IndexSegment.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/IndexSegment.java index 1477899099..4c5de193bd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/IndexSegment.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/IndexSegment.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.segments; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/Segment.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/Segment.java index 6b36018dd5..69dbb007da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/Segment.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/Segment.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.segments; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardSegmentRouting.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardSegmentRouting.java index 7d54c08006..1124ef9a45 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardSegmentRouting.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardSegmentRouting.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.segments; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardsSegment.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardsSegment.java index 824be8db6b..0b5cdd6da5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardsSegment.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/segments/ShardsSegment.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.segments; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/IndicesShardStores.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/IndicesShardStores.java index a2d1c632ae..a6db7179fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/IndicesShardStores.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/IndicesShardStores.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.shard_stores; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStore.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStore.java index c51c7b0fe8..7e19fe2e81 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStore.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStore.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.shard_stores; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreAllocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreAllocation.java index 2c97539660..e744f625cc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreAllocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreAllocation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.shard_stores; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreException.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreException.java index 1e556a460f..7a140e1dbf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreException.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreException.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.shard_stores; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreStatus.java index e43a9ef21d..7b49c5eabd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.shard_stores; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreWrapper.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreWrapper.java index dd85027051..cd863c8377 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreWrapper.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/shard_stores/ShardStoreWrapper.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.shard_stores; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Overlapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Overlapping.java index a17b1d020f..6488997a4d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Overlapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Overlapping.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.simulate_template; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Template.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Template.java index 0a3e28bd94..b5d6129f70 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Template.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/simulate_template/Template.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.simulate_template; import org.opensearch.client.opensearch._types.mapping.TypeMapping; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndexStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndexStats.java index d4dfd0132a..23333a9712 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndexStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndexStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.opensearch._types.BulkStats; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndicesStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndicesStats.java index e85b310285..02c0c3b983 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndicesStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/IndicesStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardCommit.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardCommit.java index c5214c4c60..d4b076cc77 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardCommit.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardCommit.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardFileSizeInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardFileSizeInfo.java index 59a3721115..e4abcdba2c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardFileSizeInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardFileSizeInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardLease.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardLease.java index 5726b2219a..baa64f353d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardLease.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardLease.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardPath.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardPath.java index 6307820dec..4b83ccae80 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardPath.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardPath.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardQueryCache.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardQueryCache.java index 7733ac6966..5df7edad57 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardQueryCache.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardQueryCache.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRetentionLeases.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRetentionLeases.java index 2b38b0b4b3..807514447f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRetentionLeases.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRetentionLeases.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRouting.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRouting.java index 8e3398c4e3..44c5235915 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRouting.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRouting.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRoutingState.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRoutingState.java index 09d83980e7..32a6aa2ab0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRoutingState.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardRoutingState.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardSequenceNumber.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardSequenceNumber.java index fdf2347bcc..c0c17abd9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardSequenceNumber.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardSequenceNumber.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardStats.java index 17d462ad6f..7ea8ac374b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.opensearch._types.BulkStats; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardsTotalStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardsTotalStats.java index da2f55b754..555d4d148e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardsTotalStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/stats/ShardsTotalStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/Action.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/Action.java index 56a68d5759..dab9cf6edc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/Action.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/Action.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.update_aliases; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionBuilders.java index 743ef5b17e..fdcd8ff65a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.update_aliases; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionVariant.java index ebf705afcb..4211ce7981 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/ActionVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.update_aliases; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/AddAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/AddAction.java index 5f43c42141..9196690fcb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/AddAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/AddAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.update_aliases; import org.opensearch.client.opensearch._types.query_dsl.Query; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveAction.java index caae0ff3d7..90dea4df94 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.update_aliases; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveIndexAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveIndexAction.java index f5ef5fa900..fd8bb4a759 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveIndexAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/update_aliases/RemoveIndexAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.update_aliases; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/validate_query/IndicesValidationExplanation.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/validate_query/IndicesValidationExplanation.java index a558ea8774..d4efaf3029 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/validate_query/IndicesValidationExplanation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/validate_query/IndicesValidationExplanation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.indices.validate_query; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AppendProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AppendProcessor.java index d36dacfdbc..099dc58392 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AppendProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AppendProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AttachmentProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AttachmentProcessor.java index 99a057fb25..8a50e6dc0c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AttachmentProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/AttachmentProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/BytesProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/BytesProcessor.java index 7fa44065b6..28013c9ca6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/BytesProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/BytesProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CircleProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CircleProcessor.java index 2aba4beed2..a051994b46 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CircleProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CircleProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertProcessor.java index 63482cf0dc..8e5c01fc35 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertType.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertType.java index 14a5bb43cd..100319e5a1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ConvertType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CsvProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CsvProcessor.java index 2ab2aa3331..82e2c798a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CsvProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/CsvProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateIndexNameProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateIndexNameProcessor.java index b940a9dcdc..2050e7aeeb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateIndexNameProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateIndexNameProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateProcessor.java index e7396283a3..9c7eb8cab0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DateProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineRequest.java index 64d8ac8c72..1b52b30ec7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineResponse.java index b986f5d0d4..92d70368c1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DeletePipelineResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DissectProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DissectProcessor.java index 95ee267602..d5114dd763 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DissectProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DissectProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DotExpanderProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DotExpanderProcessor.java index e831a5da3b..fa7c55dd67 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DotExpanderProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DotExpanderProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DropProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DropProcessor.java index db70096bb1..6de56baeec 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DropProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/DropProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/FailProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/FailProcessor.java index 96ca6586e9..f6a39c9662 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/FailProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/FailProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ForeachProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ForeachProcessor.java index a93accfec9..ef06c8f302 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ForeachProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ForeachProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpProcessor.java index 8b93e38f9b..647f4be21c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsRequest.java index 6ac09cfa44..522802d72e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsResponse.java index e13ba44072..fe164a93c8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GeoIpStatsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch.ingest.geo_ip_stats.GeoIpDownloadStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineRequest.java index 13c6af178c..3098568448 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineResponse.java index ab8e825f01..07a780bc92 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GetPipelineResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GrokProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GrokProcessor.java index d3337c3d52..8469d8f0d2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GrokProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GrokProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GsubProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GsubProcessor.java index c70fe48aca..cb0108d03b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GsubProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/GsubProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfig.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfig.java index 13b4dce6f4..11c4e88010 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfig.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfig.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfigRegression.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfigRegression.java index 2e87b6430c..824256ee73 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfigRegression.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceConfigRegression.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceProcessor.java index 8eb385c855..ca45d29944 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/InferenceProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JoinProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JoinProcessor.java index 328969451a..86d275f9a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JoinProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JoinProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JsonProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JsonProcessor.java index 310a37b649..7e3cce9eaa 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JsonProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/JsonProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/KeyValueProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/KeyValueProcessor.java index 7dd51ad8d0..dea51bc376 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/KeyValueProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/KeyValueProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/LowercaseProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/LowercaseProcessor.java index 0526e47fc3..c4231c14a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/LowercaseProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/LowercaseProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestAsyncClient.java index febd825ba0..c7be84e8ef 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestClient.java index 8012223771..2171b2467f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/OpenSearchIngestClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Pipeline.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Pipeline.java index 518d1f537b..2f19139486 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Pipeline.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Pipeline.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PipelineProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PipelineProcessor.java index 6ab2f92158..369d7b4f53 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PipelineProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PipelineProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Processor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Processor.java index eefea6f589..8cb703f876 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Processor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/Processor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBase.java index 68b99f98a2..7c4613a213 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBuilders.java index cbe771462f..a2e255bced 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.Script; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokRequest.java index d4ef3c12f4..4b7c2f0456 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokResponse.java index 4f62238ce7..3faa9d0eac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorGrokResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorVariant.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorVariant.java index 8291854ef9..c33c819646 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorVariant.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ProcessorVariant.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; /** diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineRequest.java index a741750d99..a4229b4855 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineResponse.java index 03031b0ce0..bf2d39ad82 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/PutPipelineResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RemoveProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RemoveProcessor.java index a3f7f2a1b1..a85a8368b3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RemoveProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RemoveProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RenameProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RenameProcessor.java index cea19a61f9..8e6a0aaac2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RenameProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/RenameProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetProcessor.java index 335d47aff9..2287c0577e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetSecurityUserProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetSecurityUserProcessor.java index 53a7db59f8..a016cd05f0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetSecurityUserProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SetSecurityUserProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ShapeType.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ShapeType.java index 1680d0c4dd..881fcfc679 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ShapeType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/ShapeType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateRequest.java index eb1a17ef57..e2bf0af795 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateResponse.java index 07bb2472cc..2bea634dd1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SimulateResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch.ingest.simulate.PipelineSimulation; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SortProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SortProcessor.java index ef84287e3b..d318f9e35f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SortProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SortProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.opensearch._types.SortOrder; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SplitProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SplitProcessor.java index 64b5b63de6..67a97ac5c5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SplitProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/SplitProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/TrimProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/TrimProcessor.java index 4784370c78..a07bf5dcaf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/TrimProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/TrimProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UppercaseProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UppercaseProcessor.java index 65cfcab875..6b709bc41f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UppercaseProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UppercaseProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UrlDecodeProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UrlDecodeProcessor.java index 1b77949624..45021eeecf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UrlDecodeProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UrlDecodeProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProcessor.java index 4048122d6f..2a79143307 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProperty.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProperty.java index 9675a4cd69..f91778538b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProperty.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/UserAgentProperty.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpDownloadStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpDownloadStatistics.java index fc30481ede..6a82c7d342 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpDownloadStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpDownloadStatistics.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.geo_ip_stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabaseName.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabaseName.java index 7b5429961b..ac66f1f7da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabaseName.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabaseName.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.geo_ip_stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabases.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabases.java index 1c776e1815..07a2366920 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabases.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/geo_ip_stats/GeoIpNodeDatabases.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.geo_ip_stats; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Document.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Document.java index 3a6d27479e..3223c5b0c6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Document.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Document.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.simulate; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/DocumentSimulation.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/DocumentSimulation.java index 8986de39a7..142fb76828 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/DocumentSimulation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/DocumentSimulation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.simulate; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Ingest.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Ingest.java index e2d2c39e75..c0444e169a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Ingest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/Ingest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.simulate; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/PipelineSimulation.java b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/PipelineSimulation.java index c3922b8315..80f9815819 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/PipelineSimulation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/ingest/simulate/PipelineSimulation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.ingest.simulate; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/AdaptiveSelection.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/AdaptiveSelection.java index ed0927986e..8883092725 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/AdaptiveSelection.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/AdaptiveSelection.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Breaker.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Breaker.java index 0381823b98..30316aa4d4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Breaker.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Breaker.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Cpu.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Cpu.java index df9a01e598..ea10c630a9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Cpu.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Cpu.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java index 6e24932d03..7f55dbc4cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/DataPathStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ExtendedMemoryStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ExtendedMemoryStats.java index 0f05fa4849..b8945849a7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ExtendedMemoryStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ExtendedMemoryStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystem.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystem.java index 0f5fde4915..c75f88d5cb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java index 0916e4604b..9921140c6f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/FileSystemTotal.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollector.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollector.java index c5ab872b9b..1b75213508 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollector.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollector.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java index 248ef171ca..ab76e94074 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/GarbageCollectorTotal.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsRequest.java index 0575f8e742..526e9ad307 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsResponse.java index 97de86c86a..53cbd66d3f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/HotThreadsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch.nodes.hot_threads.HotThread; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Http.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Http.java index 60be037cca..a6eaaf75b3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Http.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Http.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Ingest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Ingest.java index f9fd580b55..5fb092c5c2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Ingest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Ingest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java index 88ba7f108c..e4ca4e0b87 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/IngestTotal.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Jvm.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Jvm.java index 2c131530a9..1ae50d65fb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Jvm.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Jvm.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmClasses.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmClasses.java index b21401a5b1..9dada9dc30 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmClasses.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmClasses.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmThreads.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmThreads.java index b0a0d3523f..9247d9ca89 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmThreads.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/JvmThreads.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/KeyedProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/KeyedProcessor.java index d43ba65112..6c2c95c32a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/KeyedProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/KeyedProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java index 4153706bc6..f02e0a2d95 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/MemoryStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java index c9998ad65e..479819abf0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodeBufferPool.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoRequest.java index 56ed68c8c9..f90f852868 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoResponse.java index 0920780f7d..8cf27ac036 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesInfoResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch.nodes.info.NodeInfo; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesResponseBase.java index aab094a2bd..5cd7de9589 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesResponseBase.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.NodeStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsRequest.java index c72686f040..0c5d7591bd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsResponse.java index dc178af960..22a907509c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesStatsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageRequest.java index b513254b92..9024561a48 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageResponse.java index 251a68fe82..38213a40da 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/NodesUsageResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch.nodes.usage.NodeUsage; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesAsyncClient.java index f2cbc434ed..1f42fcdd0c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesClient.java index bf06bba6a1..dfa9cec517 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OpenSearchNodesClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OperatingSystem.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OperatingSystem.java index 286765a6ec..c7cfa486bc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OperatingSystem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/OperatingSystem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Process.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Process.java index f6f022fe85..0d82ff06e5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Process.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Process.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsRequest.java index 2a45f4ace2..c453dc527a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsResponse.java index 1677abd190..8d1dcebc9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ReloadSecureSettingsResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch.nodes.reload_secure_settings.NodeReloadResult; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Scripting.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Scripting.java index e0d20f8b06..b0a1d6ec1c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Scripting.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Scripting.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java index f981d15b5f..70abe80619 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Stats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.opensearch._types.NodeRole; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ThreadCount.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ThreadCount.java index f28a41be2a..624c93e304 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ThreadCount.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/ThreadCount.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java index 7488a71ea5..74b82a3628 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/Transport.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/hot_threads/HotThread.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/hot_threads/HotThread.java index 32aa2df223..68716b1b3e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/hot_threads/HotThread.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/hot_threads/HotThread.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.hot_threads; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java index 471dd96aaa..b0977484b7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.opensearch._types.NodeRole; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAction.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAction.java index 5c6de605c4..ea0cc2a5cf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAction.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAction.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAggregation.java index 9ea69a7555..759e8a0ed4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoAggregation.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoBootstrap.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoBootstrap.java index 1572822816..5b4067c96d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoBootstrap.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoBootstrap.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoClient.java index d093267fd4..8d1c3ff09e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoDiscover.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoDiscover.java index f3058adbfe..3690f1cd10 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoDiscover.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoDiscover.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoHttp.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoHttp.java index ab8a535227..e39d45053e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoHttp.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoHttp.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngest.java index 211aeff2ab..3fc3af4a27 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestDownloader.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestDownloader.java index 5fa7a9cb45..bc3f81ebcd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestDownloader.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestDownloader.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestInfo.java index d0541087f3..b93bc1eb7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestProcessor.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestProcessor.java index 9cf38152d2..d88c5720ed 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestProcessor.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoIngestProcessor.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoJvmMemory.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoJvmMemory.java index 88c0d8f845..4b72d9e202 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoJvmMemory.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoJvmMemory.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoMemory.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoMemory.java index e2f54e5b45..aafaf116c8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoMemory.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoMemory.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetwork.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetwork.java index ac907af9bd..d8873052e1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetwork.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetwork.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetworkInterface.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetworkInterface.java index 6b0f7933c1..053d33f267 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetworkInterface.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoNetworkInterface.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoOSCPU.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoOSCPU.java index 465b809780..d81afce90c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoOSCPU.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoOSCPU.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java index 124e47d13b..603599a80f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoPath.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositories.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositories.java index 8a00ceda27..5c92308812 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositories.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositories.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositoriesUrl.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositoriesUrl.java index fbb31685a1..e1461181ae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositoriesUrl.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoRepositoriesUrl.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java index 4cc74372cd..cfe68d7c15 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoScript.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearch.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearch.java index 173f80aa97..5d33e5a7fd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearch.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearch.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearchRemote.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearchRemote.java index 443dfad67a..1dacb9960a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearchRemote.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSearchRemote.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettings.java index 756b3ab7ea..c450a08506 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java index 9b1d17baa2..e72bb97455 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsCluster.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.opensearch.indices.IndexRouting; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsClusterElection.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsClusterElection.java index 3885f9cc47..f23e134b86 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsClusterElection.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsClusterElection.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttp.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttp.java index ef448314ab..48360e8488 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttp.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttp.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttpType.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttpType.java index e4a10bfea3..6bf1ba6fbf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttpType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsHttpType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsIngest.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsIngest.java index d4fbc10edb..43a84c6f57 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsIngest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsIngest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNetwork.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNetwork.java index 12ed6a50aa..38f5c662b9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNetwork.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNetwork.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java index bd73a74e9e..e537b83c99 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransport.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransport.java index 932946ac50..3de8e6ea55 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransport.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransport.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransportType.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransportType.java index 0a9d19b621..d34084950b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransportType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoSettingsTransportType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoTransport.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoTransport.java index be2f100900..06ac34d6a5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoTransport.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeInfoTransport.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeJvmInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeJvmInfo.java index f336eec99c..61ad2b10ba 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeJvmInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeJvmInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeOperatingSystemInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeOperatingSystemInfo.java index 397dcd1201..73f8dd3c5e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeOperatingSystemInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeOperatingSystemInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeProcessInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeProcessInfo.java index 1aacaeac90..1f76a49feb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeProcessInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeProcessInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeThreadPoolInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeThreadPoolInfo.java index 49006fcdda..d851e09af4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeThreadPoolInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/info/NodeThreadPoolInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.info; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadError.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadError.java index 959b01c7f1..0be9bbeaea 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadError.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadError.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.reload_secure_settings; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResult.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResult.java index 3128970b0f..02581b4f34 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResult.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResult.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.reload_secure_settings; import org.opensearch.client.opensearch.nodes.Stats; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResultBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResultBuilders.java index 8fc07364d5..51006daac2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResultBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/reload_secure_settings/NodeReloadResultBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.reload_secure_settings; import org.opensearch.client.opensearch.nodes.Stats; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/usage/NodeUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/usage/NodeUsage.java index a8c2ada815..bd5511bfba 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/nodes/usage/NodeUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/nodes/usage/NodeUsage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.nodes.usage; import org.opensearch.client.json.JsonData; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/package-info.java b/java-client/src/main/java/org/opensearch/client/opensearch/package-info.java index dbf55fe99c..eea2677c94 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/package-info.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/package-info.java @@ -30,8 +30,4 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeRequest.java index 12b1416f4a..43be11e857 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeResponse.java index d21138d98e..1020a6b304 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/DeleteNodeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeRequest.java index 68b6c20606..cae4bf2fb7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeResponse.java index ad1bc2e437..67e2534b45 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/GetNodeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.opensearch.shutdown.get_node.NodeShutdownStatus; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownAsyncClient.java index ea35f0ef46..f577919a94 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownClient.java index 731dd0be06..ce0337cdbc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/OpenSearchShutdownClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeRequest.java index 21c9493c57..61db8b8a7f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeResponse.java index 36190a34ca..e0a37ecbf3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/PutNodeResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/NodeShutdownStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/NodeShutdownStatus.java index e116feab7b..8e8f8fc4f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/NodeShutdownStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/NodeShutdownStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown.get_node; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PersistentTaskStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PersistentTaskStatus.java index 3acf238fcc..ae2f44266b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PersistentTaskStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PersistentTaskStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown.get_node; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PluginsStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PluginsStatus.java index 944a086d2f..a055688104 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PluginsStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/PluginsStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown.get_node; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShardMigrationStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShardMigrationStatus.java index 8dc181a483..a655c2faa1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShardMigrationStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShardMigrationStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown.get_node; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownStatus.java index 05f03a4242..45886a9178 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown.get_node; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownType.java b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownType.java index 5f64587bdf..7bc2e538f0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/shutdown/get_node/ShutdownType.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.shutdown.get_node; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java index d245a74fd2..b47e4b629a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java index 8dbb0e9c2f..bc772ff5e8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch.snapshot.cleanup_repository.CleanupRepositoryResults; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java index 0b60409993..6cac3d16a4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotResponse.java index e64ea39680..ebd5899b8e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryRequest.java index fb67836819..fdea0fc57f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryResponse.java index dd489ea570..7d96b6d9db 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateRepositoryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotRequest.java index 6a8d8a940f..aced99af8d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotResponse.java index b535eaf5f8..49c0344bb8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/CreateSnapshotResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryRequest.java index 37670c45b7..841d583adb 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryResponse.java index 1d1382cc92..9ec745de61 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteRepositoryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotRequest.java index 41cace348d..fdb50696c5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotResponse.java index 92ddf69667..f3eff25cef 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/DeleteSnapshotResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.AcknowledgedResponseBase; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/FileCountSnapshotStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/FileCountSnapshotStats.java index 247fddbfd5..ca7a6e7556 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/FileCountSnapshotStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/FileCountSnapshotStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryRequest.java index f56a6526fc..00959c3115 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryResponse.java index 6772089efc..0cad51418a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetRepositoryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotRequest.java index a78a81573a..38f8c75a61 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotResponse.java index 024daaf071..8cdea472ac 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/GetSnapshotResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch.snapshot.get.SnapshotResponseItem; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/IndexDetails.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/IndexDetails.java index 2f79165beb..13b6924ae5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/IndexDetails.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/IndexDetails.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/InfoFeatureState.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/InfoFeatureState.java index 0a171fbe8d..60aa34229f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/InfoFeatureState.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/InfoFeatureState.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotAsyncClient.java index 67e0daa942..b1e9f00a05 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotClient.java index 9ee1573c8d..b20ef23b48 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/OpenSearchSnapshotClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Repository.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Repository.java index 1e1ae1142a..173d8c63ef 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Repository.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Repository.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RepositorySettings.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RepositorySettings.java index ab06c6c7ff..6134b8f614 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RepositorySettings.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RepositorySettings.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreRequest.java index 8b8623e406..03ebcd2f27 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreResponse.java index 58962f0946..1c5a79fcda 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/RestoreResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch.snapshot.restore.SnapshotRestore; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStats.java index 9b6f489fd0..01bc31bb26 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsStage.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsStage.java index 8bb903da4a..4806d5adae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsStage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsStage.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummary.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummary.java index 68afe02549..7f6a388d30 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummary.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummary.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummaryItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummaryItem.java index a9128d029c..01333645f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummaryItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/ShardsStatsSummaryItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotIndexStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotIndexStats.java index 4b94299725..895edb404b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotIndexStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotIndexStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotInfo.java index 2a4f23f932..cdb913fe0d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardFailure.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardFailure.java index ce7dec3fe3..082f9f47e2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardFailure.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardFailure.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardsStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardsStatus.java index ab2a50af98..985f693887 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardsStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotShardsStatus.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStats.java index eb290d99fc..fd7b3229fe 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStats.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusRequest.java index 4f3ce1013f..5fd339db3a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusResponse.java index ced58d5899..79dfe95907 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/SnapshotStatusResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Status.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Status.java index 3053204106..5e12039309 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Status.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/Status.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java index f0ef5e9f49..eb9e7491ae 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java index 77decb072e..41fd59cf85 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot; import org.opensearch.client.opensearch.snapshot.verify_repository.CompactNodeInfo; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java index 37b9c55f48..37332362b5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot.cleanup_repository; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/get/SnapshotResponseItem.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/get/SnapshotResponseItem.java index f77e0fc042..fc23e8528e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/get/SnapshotResponseItem.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/get/SnapshotResponseItem.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot.get; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/restore/SnapshotRestore.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/restore/SnapshotRestore.java index 77f2865a4f..307354422c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/restore/SnapshotRestore.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/restore/SnapshotRestore.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot.restore; import org.opensearch.client.opensearch._types.ShardStatistics; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java index 336c561f63..ed253fcf9a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.snapshot.verify_repository; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelRequest.java index 88e288348b..e65b5d73a8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelResponse.java index 95c5fba660..28af9bac43 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/CancelResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java index a3d944f13b..118f8766cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java index 94fb580616..fb9eed1520 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GroupBy.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GroupBy.java index b37783ffce..a3e62a2b4f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GroupBy.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/GroupBy.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.json.JsonEnum; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Info.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Info.java index 03bc7e2064..936ba6e29c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Info.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Info.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListRequest.java index 66a587ddee..2485d273b3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListRequest.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.ErrorResponse; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListResponse.java index 3eabe0beae..52c745cc08 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/ListResponse.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.ErrorCause; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksAsyncClient.java index 0c79ba105b..764e62a93f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksAsyncClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksClient.java index 4d8cc70710..8e8024ef52 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/OpenSearchTasksClient.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.ApiClient; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/State.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/State.java index c01dd5d8e8..879da36f33 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/State.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/State.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Status.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Status.java index 5554da6823..230eb2492a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Status.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/Status.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.Retries; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java index c460a1ccc3..b3104b6850 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.tasks; import org.opensearch.client.opensearch._types.BaseNode; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/watcher/HourAndMinute.java b/java-client/src/main/java/org/opensearch/client/opensearch/watcher/HourAndMinute.java index 2b948aa689..f306519849 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/watcher/HourAndMinute.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/watcher/HourAndMinute.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.watcher; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDay.java b/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDay.java index 2f7592536b..f88a09a7a9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDay.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDay.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.watcher; import org.opensearch.client.json.JsonpDeserializable; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDayBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDayBuilders.java index b45b1526b5..ffb505a167 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDayBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/watcher/TimeOfDayBuilders.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.opensearch.watcher; /** diff --git a/java-client/src/main/java/org/opensearch/client/util/ActionStatusOptions.java b/java-client/src/main/java/org/opensearch/client/util/ActionStatusOptions.java index 78906c3515..e4e5cdf3c2 100644 --- a/java-client/src/main/java/org/opensearch/client/util/ActionStatusOptions.java +++ b/java-client/src/main/java/org/opensearch/client/util/ActionStatusOptions.java @@ -30,10 +30,6 @@ * GitHub history for details. */ -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - package org.opensearch.client.util; import org.opensearch.client.json.JsonEnum; From b4e30f2b9af1cb1a0db11ecba702b455455c020b Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Tue, 22 Aug 2023 11:59:47 -0700 Subject: [PATCH 074/123] Removing unsupported field runtime for PutMappingRequest (#597) (#606) Signed-off-by: Vacha Shah --- CHANGELOG.md | 3 +- .../opensearch/indices/PutMappingRequest.java | 64 ------------------- 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d34a35cbd7..009ca7ae7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [Unreleased] +## [Unreleased 2.x](https://github.com/opensearch-project/opensearch-java/compare/v2.6.0...2.x) ### Added ### Dependencies @@ -16,6 +16,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Remove generated code comments from all files ([#598](https://github.com/opensearch-project/opensearch-java/pull/598)) ### Fixed +- Fix PutMappingRequest by removing unsupported fields ([#597](https://github.com/opensearch-project/opensearch-java/pull/597)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java index 53d45e8193..99b2951846 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java @@ -115,8 +115,6 @@ public class PutMappingRequest extends RequestBase implements JsonpSerializable private final Map properties; - private final Map runtime; - @Nullable private final Time timeout; @@ -143,7 +141,6 @@ private PutMappingRequest(Builder builder) { this.clusterManagerTimeout = builder.clusterManagerTimeout; this.numericDetection = builder.numericDetection; this.properties = ApiTypeHelper.unmodifiable(builder.properties); - this.runtime = ApiTypeHelper.unmodifiable(builder.runtime); this.timeout = builder.timeout; this.writeIndexOnly = builder.writeIndexOnly; @@ -323,15 +320,6 @@ public final Map properties() { return this.properties; } - /** - * Mapping of runtime fields for the index. - *

- * API name: {@code runtime} - */ - public final Map runtime() { - return this.runtime; - } - /** * Explicit operation timeout *

@@ -443,18 +431,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - if (ApiTypeHelper.isDefined(this.runtime)) { - generator.writeKey("runtime"); - generator.writeStartObject(); - for (Map.Entry item0 : this.runtime.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - } // --------------------------------------------------------------------------------------------- @@ -512,9 +488,6 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder

properties; - @Nullable - private Map runtime; - @Nullable private Time timeout; @@ -856,41 +829,6 @@ public final Builder properties(String key, Function - * API name: {@code runtime} - *

- * Adds all entries of map to runtime. - */ - public final Builder runtime(Map map) { - this.runtime = _mapPutAll(this.runtime, map); - return this; - } - - /** - * Mapping of runtime fields for the index. - *

- * API name: {@code runtime} - *

- * Adds an entry to runtime. - */ - public final Builder runtime(String key, RuntimeField value) { - this.runtime = _mapPut(this.runtime, key, value); - return this; - } - - /** - * Mapping of runtime fields for the index. - *

- * API name: {@code runtime} - *

- * Adds an entry to runtime using a builder lambda. - */ - public final Builder runtime(String key, Function> fn) { - return runtime(key, fn.apply(new RuntimeField.Builder()).build()); - } - /** * Explicit operation timeout *

@@ -956,8 +894,6 @@ protected static void setupPutMappingRequestDeserializer(ObjectDeserializer Date: Tue, 22 Aug 2023 13:32:21 -0700 Subject: [PATCH 075/123] [Backport 2.x] Added "smartcn" and "cjk" analyzers (#607) * Added "smartcn" analyzer. (#605) * Added "smartcn" analyzer. Signed-off-by: pieper * Adapted changelog. Signed-off-by: pieper * Fixed license headers. Signed-off-by: pieper * Fixed release number. Signed-off-by: pieper --------- Signed-off-by: pieper Signed-off-by: Vacha Shah * Added "cjk" analyzer. (#604) * Added "cjk" analyzer. Signed-off-by: pieper * Adapted changelog. Signed-off-by: pieper * Fixed license headers. Signed-off-by: pieper * Tab vs. Spaces fix. Signed-off-by: pieper --------- Signed-off-by: pieper Signed-off-by: Vacha Shah --------- Signed-off-by: pieper Signed-off-by: Vacha Shah Co-authored-by: MikePieperSer <41434171+MikePieperSer@users.noreply.github.com> --- CHANGELOG.md | 4 +- .../opensearch/_types/analysis/Analyzer.java | 65 ++++++- .../_types/analysis/CjkAnalyzer.java | 182 ++++++++++++++++++ .../_types/analysis/SmartcnAnalyzer.java | 101 ++++++++++ .../analysis/SmartcnStopTokenFilter.java | 98 ++++++++++ .../_types/analysis/SmartcnTokenizer.java | 97 ++++++++++ .../analysis/TokenFilterDefinition.java | 16 +- .../_types/analysis/TokenizerDefinition.java | 16 +- .../opensearch/experiments/ParsingTests.java | 61 ++++++ 9 files changed, 636 insertions(+), 4 deletions(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CjkAnalyzer.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnAnalyzer.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnStopTokenFilter.java create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnTokenizer.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 009ca7ae7d..45aee9f155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # CHANGELOG Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [Unreleased 2.x](https://github.com/opensearch-project/opensearch-java/compare/v2.6.0...2.x) +## [Unreleased 2.x] ### Added +- Added support for "smartcn" analyzer ([#605](https://github.com/opensearch-project/opensearch-java/pull/605)) +- Added support for "cjk" analyzer ([#604](https://github.com/opensearch-project/opensearch-java/pull/604)) ### Dependencies - Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java index 66ba4d4de4..7ae36f4dcc 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/Analyzer.java @@ -90,6 +90,10 @@ public enum Kind implements JsonEnum { Whitespace("whitespace"), + Smartcn("smartcn"), + + Cjk("cjk"), + ; private final String jsonValue; @@ -373,7 +377,43 @@ public WhitespaceAnalyzer whitespace() { return TaggedUnionUtils.get(this, Kind.Whitespace); } - @Override + /** + * Is this variant instance of kind {@code cjk}? + */ + public boolean isSmartcn() { + return _kind == Kind.Smartcn; + } + + /** + * Get the {@code cjk} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code cjk} kind. + */ + public SmartcnAnalyzer smartcn() { + return TaggedUnionUtils.get(this, Kind.Smartcn); + } + + + /** + * Is this variant instance of kind {@code cjk}? + */ + public boolean isCjk() { + return _kind == Kind.Cjk; + } + + /** + * Get the {@code cjk} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code cjk} kind. + */ + public CjkAnalyzer cjk() { + return TaggedUnionUtils.get(this, Kind.Cjk); + } + + + @Override public void serialize(JsonGenerator generator, JsonpMapper mapper) { mapper.serialize(_value, generator); @@ -530,6 +570,27 @@ public ObjectBuilder whitespace( return this.whitespace(fn.apply(new WhitespaceAnalyzer.Builder()).build()); } + public ObjectBuilder smartcn(SmartcnAnalyzer v) { + this._kind = Kind.Smartcn; + this._value = v; + return this; + } + + public ObjectBuilder smartcn() { + return this.smartcn(new SmartcnAnalyzer.Builder().build()); + } + + public ObjectBuilder cjk(CjkAnalyzer v) { + this._kind = Kind.Cjk; + this._value = v; + return this; + } + + public ObjectBuilder cjk( + Function> fn) { + return this.cjk(fn.apply(new CjkAnalyzer.Builder()).build()); + } + public Analyzer build() { _checkSingleUse(); return new Analyzer(this); @@ -553,6 +614,8 @@ protected static void setupAnalyzerDeserializer(ObjectDeserializer op) op.add(Builder::standard, StandardAnalyzer._DESERIALIZER, "standard"); op.add(Builder::stop, StopAnalyzer._DESERIALIZER, "stop"); op.add(Builder::whitespace, WhitespaceAnalyzer._DESERIALIZER, "whitespace"); + op.add(Builder::smartcn, SmartcnAnalyzer._DESERIALIZER, Kind.Smartcn.jsonValue()); + op.add(Builder::cjk, CjkAnalyzer._DESERIALIZER, Kind.Cjk.jsonValue()); op.setTypeProperty("type", null); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CjkAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CjkAnalyzer.java new file mode 100644 index 0000000000..421f6c4dd3 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/CjkAnalyzer.java @@ -0,0 +1,182 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch._types.analysis; + +import java.util.List; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _types.analysis.LanguageAnalyzer + +@JsonpDeserializable +public class CjkAnalyzer implements AnalyzerVariant, JsonpSerializable { + @Nullable + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private CjkAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static CjkAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Cjk; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", Analyzer.Kind.Cjk.jsonValue()); + + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CjkAnalyzer}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * Builds a {@link CjkAnalyzer}. + * + * @throws NullPointerException + * if some required fields are null. + */ + public CjkAnalyzer build() { + _checkSingleUse(); + + return new CjkAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CjkAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CjkAnalyzer::setupLanguageAnalyzerDeserializer); + + protected static void setupLanguageAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnAnalyzer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnAnalyzer.java new file mode 100644 index 0000000000..11cee498cf --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnAnalyzer.java @@ -0,0 +1,101 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch._types.analysis; + +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _types.analysis.LanguageAnalyzer + +@JsonpDeserializable +public class SmartcnAnalyzer implements AnalyzerVariant, JsonpSerializable { + + // --------------------------------------------------------------------------------------------- + + private SmartcnAnalyzer(Builder builder) { + + } + + public static SmartcnAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Smartcn; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", Analyzer.Kind.Smartcn.jsonValue()); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SmartcnAnalyzer}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + + /** + * Builds a {@link SmartcnAnalyzer}. + * + * @throws NullPointerException + * if some required fields are null. + */ + public SmartcnAnalyzer build() { + _checkSingleUse(); + + return new SmartcnAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SmartcnAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SmartcnAnalyzer::setupLanguageAnalyzerDeserializer); + + protected static void setupLanguageAnalyzerDeserializer(ObjectDeserializer op) { + + op.ignore("type"); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnStopTokenFilter.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnStopTokenFilter.java new file mode 100644 index 0000000000..7e47454ec0 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnStopTokenFilter.java @@ -0,0 +1,98 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch._types.analysis; + +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _types.analysis.ReverseTokenFilter + +@JsonpDeserializable +public class SmartcnStopTokenFilter extends TokenFilterBase implements TokenFilterDefinitionVariant { + // --------------------------------------------------------------------------------------------- + + private SmartcnStopTokenFilter(Builder builder) { + super(builder); + + } + + public static SmartcnStopTokenFilter of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * TokenFilterDefinition variant kind. + */ + @Override + public TokenFilterDefinition.Kind _tokenFilterDefinitionKind() { + return TokenFilterDefinition.Kind.SmartcnStop; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", TokenFilterDefinition.Kind.SmartcnStop.jsonValue()); + super.serializeInternal(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SmartcnStopTokenFilter}. + */ + + public static class Builder extends AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SmartcnStopTokenFilter}. + * + * @throws NullPointerException + * if some required fields are null. + */ + public SmartcnStopTokenFilter build() { + _checkSingleUse(); + + return new SmartcnStopTokenFilter(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SmartcnStopTokenFilter} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SmartcnStopTokenFilter::setupSmartcnStopTokenFilterDeserializer); + + protected static void setupSmartcnStopTokenFilterDeserializer(ObjectDeserializer op) { + setupTokenFilterBaseDeserializer(op); + + op.ignore("type"); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnTokenizer.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnTokenizer.java new file mode 100644 index 0000000000..f8d37e1bc7 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/SmartcnTokenizer.java @@ -0,0 +1,97 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch._types.analysis; + +import java.util.function.Function; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; + +import jakarta.json.stream.JsonGenerator; + +// typedef: _types.analysis.IcuTokenizer + +@JsonpDeserializable +public class SmartcnTokenizer extends TokenizerBase implements TokenizerDefinitionVariant { + // --------------------------------------------------------------------------------------------- + + private SmartcnTokenizer(Builder builder) { + super(builder); + + } + + public static SmartcnTokenizer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * TokenizerDefinition variant kind. + */ + @Override + public TokenizerDefinition.Kind _tokenizerDefinitionKind() { + return TokenizerDefinition.Kind.SmartcnTokenizer; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", TokenizerDefinition.Kind.SmartcnTokenizer.jsonValue()); + super.serializeInternal(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SmartcnTokenizer}. + */ + + public static class Builder extends AbstractBuilder implements ObjectBuilder { + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SmartcnTokenizer}. + * + * @throws NullPointerException + * if some required fields are null. + */ + public SmartcnTokenizer build() { + _checkSingleUse(); + + return new SmartcnTokenizer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SmartcnTokenizer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SmartcnTokenizer::setupSmartcnTokenizerDeserializer); + + protected static void setupSmartcnTokenizerDeserializer(ObjectDeserializer op) { + TokenizerBase.setupTokenizerBaseDeserializer(op); + + op.ignore("type"); + } + +} diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java index ee16cb10df..fd2b08558f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenFilterDefinition.java @@ -161,6 +161,8 @@ public enum Kind implements JsonEnum { WordDelimiter("word_delimiter"), + SmartcnStop("smartcn_stop"), + ; private final String jsonValue; @@ -1575,7 +1577,18 @@ public ObjectBuilder wordDelimiter( return this.wordDelimiter(fn.apply(new WordDelimiterTokenFilter.Builder()).build()); } - public TokenFilterDefinition build() { + public ObjectBuilder smartcn_stop(SmartcnStopTokenFilter v) { + this._kind = Kind.IcuTokenizer; + this._value = v; + return this; + } + + public ObjectBuilder smartcn_stop( + Function> fn) { + return this.smartcn_stop(fn.apply(new SmartcnStopTokenFilter.Builder()).build()); + } + + public TokenFilterDefinition build() { _checkSingleUse(); return new TokenFilterDefinition(this); } @@ -1634,6 +1647,7 @@ protected static void setupTokenFilterDefinitionDeserializer(ObjectDeserializer< op.add(Builder::uppercase, UppercaseTokenFilter._DESERIALIZER, "uppercase"); op.add(Builder::wordDelimiterGraph, WordDelimiterGraphTokenFilter._DESERIALIZER, "word_delimiter_graph"); op.add(Builder::wordDelimiter, WordDelimiterTokenFilter._DESERIALIZER, "word_delimiter"); + op.add(Builder::smartcn_stop, SmartcnStopTokenFilter._DESERIALIZER, Kind.SmartcnStop.jsonValue()); op.setTypeProperty("type", null); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java index 79b541851b..2a8b2f0dde 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/TokenizerDefinition.java @@ -93,6 +93,8 @@ public enum Kind implements JsonEnum { Whitespace("whitespace"), + SmartcnTokenizer("smartcn_tokenizer"), + ; private final String jsonValue; @@ -542,7 +544,18 @@ public ObjectBuilder whitespace( return this.whitespace(fn.apply(new WhitespaceTokenizer.Builder()).build()); } - public TokenizerDefinition build() { + public ObjectBuilder smartcn(SmartcnTokenizer v) { + this._kind = Kind.SmartcnTokenizer; + this._value = v; + return this; + } + + public ObjectBuilder smartcn( + Function> fn) { + return this.smartcn(fn.apply(new SmartcnTokenizer.Builder()).build()); + } + + public TokenizerDefinition build() { _checkSingleUse(); return new TokenizerDefinition(this); } @@ -565,6 +578,7 @@ protected static void setupTokenizerDefinitionDeserializer(ObjectDeserializer b).build(); + + String str = toJson(tokenizerDefinition); + assertEquals("{\"type\":\"smartcn_tokenizer\"}", str); + + TokenizerDefinition tokenizerDefinition2 = fromJson(str, TokenizerDefinition._DESERIALIZER); + } + + @Test + public void testSmartcn_StopFilter() { + final TokenFilterDefinition analyzer = new TokenFilterDefinition.Builder() + .smartcn_stop(b -> b) + .build(); + + String str = toJson(analyzer); + assertEquals("{\"type\":\"smartcn_stop\"}", str); + + TokenFilterDefinition analyzer2 = fromJson(str, TokenFilterDefinition._DESERIALIZER); + } + @Test + public void testCjk_Analyzer() { + final Analyzer analyzer = new Analyzer.Builder() + .cjk(b -> b + .stopwords(List.of("a", "b", "c")) + .stopwordsPath("path") + ) + .build(); + + assertTrue(analyzer.isCjk()); + + String str = toJson(analyzer); + assertEquals("{\"type\":\"cjk\",\"stopwords\":[\"a\",\"b\",\"c\"],\"stopwords_path\":\"path\"}", str); + + Analyzer analyzer2 = fromJson(str, Analyzer._DESERIALIZER); + assertTrue(analyzer2.isCjk()); + assertEquals(analyzer.cjk().stopwords(), analyzer2.cjk().stopwords()); + assertEquals(analyzer.cjk().stopwordsPath(), analyzer2.cjk().stopwordsPath()); + } } From 239b5d9fb14fc429480e2cdf1239fd01c90338b6 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 15:44:52 -0700 Subject: [PATCH 076/123] Update to Gradle 8.3 (#608) (#609) (cherry picked from commit 045202ababb8e94867ff8bb302db2313e5856c74) Signed-off-by: Andriy Redko Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- gradle/wrapper/gradle-wrapper.jar | Bin 63375 -> 63721 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c4cdf41af1ab109bc7f253b2b887023340..7f93135c49b765f8051ef9d0a6055ff8e46073d8 100644 GIT binary patch delta 28216 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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2f16c9e12c..599893cb19 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -28,7 +28,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1 +distributionSha256Sum=591855b517fc635b9e04de1d05d5e76ada3f89f5fc76f87978d1b245b4f69225 diff --git a/gradlew b/gradlew index 1883d9e7dc..35264e12b6 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' From 03de4046b7139f6e97407f9100ffa55cdba6e77e Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Thu, 14 Sep 2023 08:58:33 -0400 Subject: [PATCH 077/123] JarHell caused by latest software.amazon.awssdk 2.20.141 (#616) (#622) Signed-off-by: Andriy Redko (cherry picked from commit 7be86f3d828a7372cd908b7a3c1930b428fbed76) --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 6 ++++++ .../client/opensearch/integTest/AbstractCatClientIT.java | 8 +++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45aee9f155..ad97a7c094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fix PutMappingRequest by removing unsupported fields ([#597](https://github.com/opensearch-project/opensearch-java/pull/597)) +- [BUG] JarHell caused by latest software.amazon.awssdk 2.20.141 ([#616](https://github.com/opensearch-project/opensearch-java/pull/616)) ### Security diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 5096f81d83..97b9058993 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -51,6 +51,12 @@ plugins { id("com.github.jk1.dependency-license-report") version "2.5" } +configurations { + all { + exclude(group = "software.amazon.awssdk", module = "third-party-jackson-core") + } +} + checkstyle { toolVersion = "10.0" } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java index 7c6b1cdee5..1a1afc77bc 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java @@ -241,9 +241,15 @@ public void testCatPitSegments() throws Exception { .pitSegments(r -> r.headers("index,shard,id,segment,size")); assertNotNull("PitSegmentsResponse.segments() is null", PitSegmentsResponse.valueBody()); - assertTrue("PitSegmentsResponse.segments().size() == 0", + + if (Version.fromString(version).onOrAfter(Version.fromString("2.10.0"))) { + assertTrue("PitSegmentsResponse.segments().size() == 0", + PitSegmentsResponse.valueBody().isEmpty()); + } else { + assertTrue("PitSegmentsResponse.segments().size() == 0", PitSegmentsResponse.valueBody().size() > 0); } + } private void createIndex(String indexName) throws Exception { CreateIndexResponse createResponse = javaClient().indices().create(b -> b.index(indexName)); From ed66cf68b4a8ffc79d26b75aa0f641b7e67ea2c3 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Fri, 15 Sep 2023 12:46:12 -0400 Subject: [PATCH 078/123] Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response (#620) (#623) Signed-off-by: Andriy Redko (cherry picked from commit 86b69885e3c1789eccba6e01c2c9fd2dd25be19d) --- CHANGELOG.md | 1 + .../HeapBufferedAsyncEntityConsumer.java | 24 ++++-- .../HeapBufferedAsyncEntityConsumerTest.java | 80 +++++++++++++++++++ 3 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 java-client/src/test/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumerTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index ad97a7c094..5185d1f4b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fix PutMappingRequest by removing unsupported fields ([#597](https://github.com/opensearch-project/opensearch-java/pull/597)) - [BUG] JarHell caused by latest software.amazon.awssdk 2.20.141 ([#616](https://github.com/opensearch-project/opensearch-java/pull/616)) +- Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#620](https://github.com/opensearch-project/opensearch-java/pull/620)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java index aa4d73a237..e500cd9466 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java +++ b/java-client/src/main/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumer.java @@ -86,25 +86,29 @@ protected void data(final ByteBuffer src, final boolean endOfStream) throws IOEx return; } + int len = src.limit(); + if (len < 0) { + len = 4096; + } else if (len > bufferLimitBytes) { + throw new ContentTooLongException( + "entity content is too long [" + len + "] for the configured buffer limit [" + bufferLimitBytes + "]" + ); + } + ByteArrayBuffer buffer = bufferRef.get(); if (buffer == null) { - buffer = new ByteArrayBuffer(bufferLimitBytes); + buffer = new ByteArrayBuffer(len); if (bufferRef.compareAndSet(null, buffer) == false) { buffer = bufferRef.get(); } } - int len = src.limit(); if (buffer.length() + len > bufferLimitBytes) { throw new ContentTooLongException( "entity content is too long [" + len + "] for the configured buffer limit [" + bufferLimitBytes + "]" ); } - if (len < 0) { - len = 4096; - } - if (src.hasArray()) { buffer.append(src.array(), src.arrayOffset() + src.position(), src.remaining()); } else { @@ -136,4 +140,12 @@ public void releaseResources() { buffer = null; } } + + /** + * Gets current byte buffer instance + * @return byte buffer instance + */ + ByteArrayBuffer getBuffer() { + return bufferRef.get(); + } } diff --git a/java-client/src/test/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumerTest.java b/java-client/src/test/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumerTest.java new file mode 100644 index 0000000000..9da747659a --- /dev/null +++ b/java-client/src/test/java/org/opensearch/client/transport/httpclient5/internal/HeapBufferedAsyncEntityConsumerTest.java @@ -0,0 +1,80 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.transport.httpclient5.internal; + +import org.apache.hc.core5.http.ContentTooLongException; + +import com.carrotsearch.randomizedtesting.RandomizedTest; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.nio.ByteBuffer; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertThrows; + +public class HeapBufferedAsyncEntityConsumerTest extends RandomizedTest { + private static final int BUFFER_LIMIT = 100 * 1024 * 1024 /* 100Mb */; + private HeapBufferedAsyncEntityConsumer consumer; + + @Before + public void setUp() { + consumer = new HeapBufferedAsyncEntityConsumer(BUFFER_LIMIT); + } + + @After + public void tearDown() { + consumer.releaseResources(); + } + + @Test + public void testConsumerAllocatesBufferLimit() throws IOException { + consumer.consume(randomByteBufferOfLength(1000).flip()); + assertThat(consumer.getBuffer().capacity(), equalTo(1000)); + } + + @Test + public void testConsumerAllocatesEmptyBuffer() throws IOException { + consumer.consume(ByteBuffer.allocate(0).flip()); + assertThat(consumer.getBuffer().capacity(), equalTo(0)); + } + + @Test + public void testConsumerExpandsBufferLimits() throws IOException { + consumer.consume(randomByteBufferOfLength(1000).flip()); + consumer.consume(randomByteBufferOfLength(2000).flip()); + consumer.consume(randomByteBufferOfLength(3000).flip()); + assertThat(consumer.getBuffer().capacity(), equalTo(6000)); + } + + @Test + public void testConsumerAllocatesLimit() throws IOException { + consumer.consume(randomByteBufferOfLength(BUFFER_LIMIT).flip()); + assertThat(consumer.getBuffer().capacity(), equalTo(BUFFER_LIMIT)); + } + + @Test + public void testConsumerFailsToAllocateOverLimit() throws IOException { + assertThrows(ContentTooLongException.class, () -> consumer.consume(randomByteBufferOfLength(BUFFER_LIMIT + 1).flip())); + } + + @Test + public void testConsumerFailsToExpandOverLimit() throws IOException { + consumer.consume(randomByteBufferOfLength(BUFFER_LIMIT).flip()); + assertThrows(ContentTooLongException.class, () -> consumer.consume(randomByteBufferOfLength(1).flip())); + } + + private static ByteBuffer randomByteBufferOfLength(int length) { + return ByteBuffer.allocate(length).put(randomBytesOfLength(length)); + } +} From d5340a4197cc6ddfef22e888f3a14b5e2d06851b Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Fri, 15 Sep 2023 15:27:08 -0400 Subject: [PATCH 079/123] Fix for CVE-2976 + add CVE checker (#624) (#625) * Fix for CVE-2976 + add CVE checker Signed-off-by: Omar Khasawneh * Updated Changelog Signed-off-by: Omar Khasawneh --------- Signed-off-by: Omar Khasawneh (cherry picked from commit d09bb4eea03b4dd71232c84df8e7ffaa448b8faf) Co-authored-by: Omar Khasawneh --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5185d1f4b2..77981d5a68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix PutMappingRequest by removing unsupported fields ([#597](https://github.com/opensearch-project/opensearch-java/pull/597)) - [BUG] JarHell caused by latest software.amazon.awssdk 2.20.141 ([#616](https://github.com/opensearch-project/opensearch-java/pull/616)) - Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#620](https://github.com/opensearch-project/opensearch-java/pull/620)) +- Fixed CVE-2976 + added CVE checker ([#624](https://github.com/opensearch-project/opensearch-java/pull/624)) ### Security diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 97b9058993..68b8ace30d 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -49,8 +49,11 @@ plugins { checkstyle `maven-publish` id("com.github.jk1.dependency-license-report") version "2.5" + id("org.owasp.dependencycheck") version "8.4.0" } +apply(plugin = "org.owasp.dependencycheck") + configurations { all { exclude(group = "software.amazon.awssdk", module = "third-party-jackson-core") @@ -58,7 +61,7 @@ configurations { } checkstyle { - toolVersion = "10.0" + toolVersion = "10.12.3" } java { From e9946b78079d5dbdd797df7fd81b5b762b1c1097 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 15 Sep 2023 15:51:30 -0700 Subject: [PATCH 080/123] [Backport 2.x] Backporting samples and user guide to 2.x (#626) * Add k-NN guide and samples (#586) Signed-off-by: Thomas Farr Signed-off-by: Vacha Shah * Reorganizing user guide and adding working samples (#610) * Reorganizing user guide and moving code snippets to guides Signed-off-by: Vacha Shah * Adding working samples for the client Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah * Fixing compile errors for ApacheHttpClient5Transport Signed-off-by: Vacha Shah --------- Signed-off-by: Thomas Farr Signed-off-by: Vacha Shah Co-authored-by: Thomas Farr --- .gitignore | 1 + USER_GUIDE.md | 741 ++---------------- guides/auth.md | 27 + guides/bulk.md | 41 + guides/cat.md | 42 + guides/data_stream.md | 54 ++ guides/plugins/knn.md | 288 +++++++ guides/point_in_time.md | 53 ++ guides/search.md | 283 +++++++ samples/build.gradle.kts | 41 + .../org/opensearch/client/samples/Bulk.java | 104 +++ .../client/samples/DataStreamBasics.java | 75 ++ .../client/samples/IndexingBasics.java | 118 +++ .../org/opensearch/client/samples/Main.java | 39 + .../client/samples/PointInTime.java | 81 ++ .../client/samples/SampleClient.java | 71 ++ .../org/opensearch/client/samples/Search.java | 315 ++++++++ .../client/samples/knn/KnnBasics.java | 113 +++ .../client/samples/knn/KnnBooleanFilter.java | 159 ++++ .../samples/knn/KnnEfficientFilter.java | 174 ++++ .../client/samples/knn/KnnPainlessScript.java | 117 +++ .../client/samples/knn/KnnScriptScore.java | 119 +++ .../client/samples/util/AppData.java | 30 + .../client/samples/util/IndexData.java | 43 + .../client/samples/util/RandUtil.java | 23 + samples/src/main/resources/log4j2.xml | 12 + settings.gradle.kts | 1 + 27 files changed, 2493 insertions(+), 672 deletions(-) create mode 100644 guides/auth.md create mode 100644 guides/bulk.md create mode 100644 guides/cat.md create mode 100644 guides/data_stream.md create mode 100644 guides/plugins/knn.md create mode 100644 guides/point_in_time.md create mode 100644 guides/search.md create mode 100644 samples/build.gradle.kts create mode 100644 samples/src/main/java/org/opensearch/client/samples/Bulk.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/DataStreamBasics.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/IndexingBasics.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/Main.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/PointInTime.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/SampleClient.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/Search.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/knn/KnnBasics.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/knn/KnnBooleanFilter.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/knn/KnnEfficientFilter.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/knn/KnnPainlessScript.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/knn/KnnScriptScore.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/util/AppData.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/util/IndexData.java create mode 100644 samples/src/main/java/org/opensearch/client/samples/util/RandUtil.java create mode 100644 samples/src/main/resources/log4j2.xml diff --git a/.gitignore b/.gitignore index 96cbff8d90..b8638f2e72 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ gradle-app.setting .ci/output java-client/bin +samples/bin \ No newline at end of file diff --git a/USER_GUIDE.md b/USER_GUIDE.md index aba3e6f193..c0d55b07ff 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -1,89 +1,52 @@ -# User Guide - -- [User Guide](#user-guide) - - [Sample data](#sample-data) - - [IndexData class](#indexdata-class) - - [Create a client](#create-a-client) - - [Create a client using `RestClientTransport`](#create-a-client-using-restclienttransport) - - [Create a client using `ApacheHttpClient5Transport`](#create-a-client-using-apachehttpclient5transport) - - [Create an index](#create-an-index) - - [Create an index with default settings](#create-an-index-with-default-settings) - - [Create an index with custom settings and mappings](#create-an-index-with-custom-settings-and-mappings) - - [Index data](#index-data) - - [Search for the documents](#search-for-the-documents) - - [Get raw JSON results](#get-raw-json-results) - - [Search documents using a match query](#search-documents-using-a-match-query) - - [Search documents using k-NN](#search-documents-using-k-nn) - - [Exact k-NN with scoring script](#exact-k-nn-with-scoring-script) - - [Exact k-NN with painless scripting extension](#exact-k-nn-with-painless-scripting-extension) - - [Search documents using suggesters](#search-documents-using-suggesters) - - [App Data class](#app-data-class) - - [Using completion suggester](#using-completion-suggester) - - [Using term suggester](#using-term-suggester) - - [Using phrase suggester](#using-phrase-suggester) - - [Bulk requests](#bulk-requests) - - [Aggregations](#aggregations) - - [Delete the document](#delete-the-document) - - [Delete the index](#delete-the-index) - - [Data Stream API](#data-stream-api) - - [Create a data stream](#create-a-data-stream) - - [Get data stream](#get-data-stream) - - [Data stream stats](#data-stream-stats) - - [Delete data stream and backing indices](#delete-data-stream-and-backing-indices) - - [Point-In-Time API](#point-in-time-api) - - [Creating a point in time](#creating-a-point-in-time) - - [List all point in time](#list-all-point-in-time) - - [Delete point in time](#delete-point-in-time) - - [Cat API](#cat-api) - - [Cat Indices](#cat-indices) - - [Cat aliases](#cat-aliases) - - [Cat nodes](#cat-nodes) - - [Cat point in time segments](#cat-point-in-time-segments) -- [Using different transport options](#using-different-transport-options) - - [Amazon Managed OpenSearch](#amazon-managed-opensearch) - -## Sample data - -### IndexData class +- [OpenSearch Java Client User Guide](#opensearch-java-client-user-guide) + - [Setup](#setup) + - [Basic Features](#basic-features) + - [Creating a client](#creating-a-client) + - [Using `RestClientTransport`](#using-restclienttransport) + - [Using `ApacheHttpClient5Transport`](#using-apachehttpclient5transport) + - [Creating an index](#creating-an-index) + - [With default settings](#with-default-settings) + - [With custom settings and mappings](#with-custom-settings-and-mappings) + - [Indexing data](#indexing-data) + - [Searching for a document](#searching-for-a-document) + - [Deleting a document](#deleting-a-document) + - [Deleting an index](#deleting-an-index) + - [Advanced Features](#advanced-features) + - [Plugins](#plugins) -```java -static class IndexData { - private String firstName; - private String lastName; - - public IndexData(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("IndexData{first name='%s', last name='%s'}", firstName, lastName); - } +# OpenSearch Java Client User Guide + +## Setup + +To start using the OpenSearch Java client, you need to provide a transport. The default `ApacheHttpClient5TransportBuilder` transport comes with the Java client. To use the OpenSearch Java client with the default transport, add it to your `pom.xml` file as a dependency: + +``` + + org.opensearch.client + opensearch-java + 2.6.0 + +``` + +If you’re using Gradle, add the following dependencies to your project: + +``` +dependencies { + implementation 'org.opensearch.client:opensearch-java:2.6.0' } ``` -## Create a client +## Basic Features + +In the example below, we create a client, create an index with default and non-default settings, insert a document into the index, search for the document, delete the document, and finally delete the index. + +You can find working versions of the code below that can be run with a local instance of OpenSearch in [samples](./samples/). + +### Creating a client There are multiple low level transports which `OpenSearchClient` could be configured with. -### Create a client using `RestClientTransport` +#### Using `RestClientTransport` ```java import org.apache.http.HttpHost; @@ -109,7 +72,7 @@ Transport transport = new RestClientTransport(restClient, OpenSearchClient client = new OpenSearchClient(transport); ``` -### Create a client using `ApacheHttpClient5Transport` +#### Using `ApacheHttpClient5Transport` ```java import org.apache.hc.core5.http.HttpHost; @@ -132,9 +95,13 @@ The Apache HttpClient 5 based transport has dependences on Apache HttpClient 5 a implementation("org.apache.httpcomponents.core5", "httpcore5", "5.2.2") ``` -## Create an index +Upcoming OpenSearch `3.0.0` release brings HTTP/2 support and as such, the `RestClientTransport` would switch to HTTP/2 if available (for both HTTPS and/or HTTP protocols). The desired protocol could be forced using `RestClientBuilder.HttpClientConfigCallback`. -### Create an index with default settings +See [SampleClient.java](./samples/src/main/java/org/opensearch/client/samples/SampleClient.java) for a working sample. + +### Creating an index + +#### With default settings ```java String index = "sample-index"; @@ -142,7 +109,7 @@ CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(i client.indices().create(createIndexRequest); ``` -### Create an index with custom settings and mappings +#### With custom settings and mappings ```java String index = "sample-index"; @@ -161,19 +128,21 @@ CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() client.indices().create(createIndexRequest); ``` -## Index data +### Indexing data + +[IndexData](./samples/src/main/java/org/opensearch/client/samples/util/IndexData.java) refers to sample data class. ```java -IndexData indexData = new IndexData("John", "Doe"); +IndexData indexData = new IndexData("Document 1", "Text for document 1"); IndexRequest indexRequest = new IndexRequest.Builder().index(index).id("1").document(indexData).build(); client.index(indexRequest); -indexData = new IndexData("John", "Joe"); +indexData = new IndexData("Document 2", "Text for document 2"); indexRequest = new IndexRequest.Builder().index(index).id("2").document(indexData).build(); client.index(indexRequest); ``` -## Search for the documents +### Searching for a document ```java SearchResponse searchResponse = client.search(s -> s.index(index), IndexData.class); @@ -182,444 +151,7 @@ for (int i = 0; i < searchResponse.hits().hits().size(); i++) { } ``` -### Get raw JSON results - -When the target class is not defined or if the response result is a semi-structured data not tied to an object definition, use a raw JSON data representation as the target class. For example, the below snippet uses `ObjectNode` from jackson. - -```java -SearchResponse searchResponse = client.search(b -> b.index(index), ObjectNode.class); -for (int i = 0; i < searchResponse.hits().hits().size(); i++) { - System.out.println(searchResponse.hits().hits().get(i).source()); -} -``` - -## Search documents using a match query - -```java -SearchRequest searchRequest = new SearchRequest.Builder().query(q -> q.match(m -> m.field("firstName") - .query(FieldValue.of("John")))) - .build(); - -SearchResponse searchResponse = client.search(searchRequest, IndexData.class); -for (int i = 0; i < searchResponse.hits().hits().size(); i++) { - System.out.println(searchResponse.hits().hits().get(i).source()); -} -``` - -## Search documents using k-NN - -### Exact k-NN with scoring script - -1. Create index with custom mapping - -```java -String index = "my-knn-index-1"; -TypeMapping mapping = new TypeMapping.Builder() - .properties("my_vector", new Property.Builder() - .knnVector(new KnnVectorProperty.Builder() - .dimension(4) - .build()) - .build()) - .build(); -CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() - .index(index) - .mappings(mapping) - .build(); -client.indices().create(createIndexRequest); -``` - -2. Index documents - -```java -JsonObject doc1 = Json.createObjectBuilder() - .add("my_vector", Json.createArrayBuilder().add(1.5).add(5.5).add(4.5).add(6.4).build()) - .add("price", 10.3) - .build(); -JsonObject doc2 = Json.createObjectBuilder() - .add("my_vector", Json.createArrayBuilder().add(2.5).add(3.5).add(5.6).add(6.7).build()) - .add("price", 5.5) - .build(); -JsonObject doc3 = Json.createObjectBuilder() - .add("my_vector", Json.createArrayBuilder().add(4.5).add(5.5).add(6.7).add(3.7).build()) - .add("price", 4.4) - .build(); - -ArrayList operations = new ArrayList<>(); -operations.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(index).id("1").document(doc1)) - ).build()); -operations.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(index).id("2").document(doc2)) - ).build()); -operations.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(index).id("3").document(doc3)) - ).build()); - -BulkRequest bulkRequest = new BulkRequest.Builder() - .index(index) - .operations(operations) - .build(); -client.bulk(bulkRequest); -``` - -3. Search documents using k-NN script score (_This implementation utilizes `com.fasterxml.jackson.databind.JsonNode` as the target document class, which is not part of the OpenSearch Java library. However, any document class that matches the searched data can be used instead._) - -```java -InlineScript inlineScript = new InlineScript.Builder() - .source("knn_score") - .lang("knn") - .params(Map.of( - "field", JsonData.of("my_vector"), - "query_value", JsonData.of(List.of(1.5, 5.5, 4.5, 6.4)), - "space_type", JsonData.of("cosinesimil") - )) - .build(); -Query query = new Query.Builder() - .scriptScore(new ScriptScoreQuery.Builder() - .query(new Query.Builder() - .matchAll(new MatchAllQuery.Builder().build()) - .build()) - .script(new Script.Builder() - .inline(inlineScript) - .build()) - .build()) - .build(); -SearchRequest searchRequest = new SearchRequest.Builder() - .index(index) - .query(query) - .build(); -SearchResponse searchResponse = client.search(searchRequest, JsonNode.class); -``` - -### Exact k-NN with painless scripting extension - -1. Create index with custom mapping - -```java -String index = "my-knn-index-1"; -TypeMapping mapping = new TypeMapping.Builder() - .properties("my_vector", new Property.Builder() - .knnVector(new KnnVectorProperty.Builder() - .dimension(4) - .build()) - .build()) - .build(); -CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() - .index(index) - .mappings(mapping) - .build(); -client.indices().create(createIndexRequest); -``` - -2. Index documents - -```java -JsonObject doc1 = Json.createObjectBuilder() - .add("my_vector", Json.createArrayBuilder().add(1.5).add(5.5).add(4.5).add(6.4).build()) - .add("price", 10.3) - .build(); -JsonObject doc2 = Json.createObjectBuilder() - .add("my_vector", Json.createArrayBuilder().add(2.5).add(3.5).add(5.6).add(6.7).build()) - .add("price", 5.5) - .build(); -JsonObject doc3 = Json.createObjectBuilder() - .add("my_vector", Json.createArrayBuilder().add(4.5).add(5.5).add(6.7).add(3.7).build()) - .add("price", 4.4) - .build(); - -ArrayList operations = new ArrayList<>(); -operations.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(index).id("1").document(doc1)) - ).build()); -operations.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(index).id("2").document(doc2)) - ).build()); -operations.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(index).id("3").document(doc3)) - ).build()); - -BulkRequest bulkRequest = new BulkRequest.Builder() - .index(index) - .operations(operations) - .build(); -client.bulk(bulkRequest); -``` - -3. Search documents using k-NN with painless scripting extension (_This implementation utilizes `com.fasterxml.jackson.databind.JsonNode` as the target document class, which is not part of the OpenSearch Java library. However, any document class that matches the searched data can be used instead._) - -```java -InlineScript inlineScript = new InlineScript.Builder() - .source("1.0 + cosineSimilarity(params.query_value, doc[params.field])") - .params(Map.of( - "field", JsonData.of("my_vector"), - "query_value", JsonData.of(List.of(1.5, 5.5, 4.5, 6.4)) - )) - .build(); -Query query = new Query.Builder() - .scriptScore(new ScriptScoreQuery.Builder() - .query(new Query.Builder() - .matchAll(new MatchAllQuery.Builder().build()) - .build()) - .script(new Script.Builder() - .inline(inlineScript) - .build()) - .build()) - .build(); -SearchRequest searchRequest = new SearchRequest.Builder() - .index(index) - .query(query) - .build(); -SearchResult searchResult = client.search(searchRequest, JsonNode.class); -``` - -## Search documents using suggesters - -### App Data class - -```java -public static class AppData { - - private int intValue; - private String msg; - - public int getIntValue() { - return intValue; - } - - public void setIntValue(int intValue) { - this.intValue = intValue; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } -} -``` - -### Using completion suggester - -```java -String index = "completion-suggester"; - -Property intValueProp = new Property.Builder() - .long_(v -> v) - .build(); -Property msgCompletionProp = new Property.Builder() - .completion(c -> c) - .build(); -client.indices().create(c -> c - .index(index) - .mappings(m -> m - .properties("intValue", intValueProp) - .properties("msg", msgCompletionProp))); - -AppData appData = new AppData(); -appData.setIntValue(1337); -appData.setMsg("foo"); - -client.index(b -> b - .index(index) - .id("1") - .document(appData) - .refresh(Refresh.True)); - -appData.setIntValue(1338); -appData.setMsg("foobar"); - -client.index(b -> b - .index(index) - .id("2") - .document(appData) - .refresh(Refresh.True)); - -String suggesterName = "msgSuggester"; - -CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() - .field("msg") - .size(1) - .build(); -FieldSuggester fieldSuggester = new FieldSuggester.Builder().prefix("foo") - .completion(completionSuggester) - .build(); -Suggester suggester = new Suggester.Builder() - .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) - .build(); -SearchRequest searchRequest = new SearchRequest.Builder() - .index(index) - .suggest(suggester) - .build(); - -SearchResponse response = client.search(searchRequest, AppData.class); -``` - -### Using term suggester - -```java - String index = "term-suggester"; - -// term suggester does not require a special mapping -client.indices().create(c -> c - .index(index)); - -AppData appData = new AppData(); -appData.setIntValue(1337); -appData.setMsg("foo"); - -client.index(b -> b - .index(index) - .id("1") - .document(appData) - .refresh(Refresh.True)); - -appData.setIntValue(1338); -appData.setMsg("foobar"); - -client.index(b -> b - .index(index) - .id("2") - .document(appData) - .refresh(Refresh.True)); - -String suggesterName = "msgSuggester"; - -TermSuggester termSuggester = FieldSuggesterBuilders.term() - .field("msg") - .size(1) - .build(); -FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("fool") - .term(termSuggester) - .build(); -Suggester suggester = new Suggester.Builder() - .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) - .build(); -SearchRequest searchRequest = new SearchRequest.Builder() - .index(index) - .suggest(suggester) - .build(); - -SearchResponse response = client.search(searchRequest, AppData.class); -``` - -### Using phrase suggester - -```java -String index = "test-phrase-suggester"; - -ShingleTokenFilter shingleTokenFilter = new ShingleTokenFilter.Builder().minShingleSize("2") - .maxShingleSize("3") - .build(); - -Analyzer analyzer = new Analyzer.Builder() - .custom(new CustomAnalyzer.Builder().tokenizer("standard") - .filter(Arrays.asList("lowercase", "shingle")).build()) - .build(); - -TokenFilter tokenFilter = new TokenFilter.Builder() - .definition(new TokenFilterDefinition.Builder() - .shingle(shingleTokenFilter).build()) - .build(); - -IndexSettingsAnalysis indexSettingsAnalysis = new IndexSettingsAnalysis.Builder() - .analyzer("trigram", analyzer) - .filter("shingle", tokenFilter) - .build(); - -IndexSettings settings = new IndexSettings.Builder().analysis(indexSettingsAnalysis).build(); - -TypeMapping mapping = new TypeMapping.Builder().properties("msg", new Property.Builder() - .text(new TextProperty.Builder().fields("trigram", new Property.Builder() - .text(new TextProperty.Builder().analyzer("trigram").build()) - .build()).build()) - .build()).build(); - -client.indices().create(c -> c - .index(index) - .settings(settings) - .mappings(mapping)); - -AppData appData = new AppData(); -appData.setIntValue(1337); -appData.setMsg("Design Patterns"); - -client.index(b -> b - .index(index) - .id("1") - .document(appData) - .refresh(Refresh.True)); - -appData.setIntValue(1338); -appData.setMsg("Software Architecture Patterns Explained"); - -client.index(b -> b - .index(index) - .id("2") - .document(appData) - .refresh(Refresh.True)); - -String suggesterName = "msgSuggester"; - -PhraseSuggester phraseSuggester = FieldSuggesterBuilders.phrase() - .field("msg.trigram") - .build(); -FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("design paterns") - .phrase(phraseSuggester) - .build(); -Suggester suggester = new Suggester.Builder() - .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) - .build(); -SearchRequest searchRequest = new SearchRequest.Builder() - .index(index) - .suggest(suggester) - .build(); - -SearchResponse response = client.search(searchRequest, AppData.class); -``` - -## Bulk requests - -```java -ArrayList ops = new ArrayList<>(); -SimplePojo doc1 = new SimplePojo("Document 1", "The text of document 1"); -ops.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(TEST_INDEX).id("id1").document(doc1)) -).build()); -SimplePojo doc2 = new SimplePojo("Document 2", "The text of document 2"); -ops.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(TEST_INDEX).id("id2").document(doc2)) -).build()); -SimplePojo doc3 = getLongDoc("Long Document 3", 100000); -ops.add(new BulkOperation.Builder().index( - IndexOperation.of(io -> io.index(TEST_INDEX).id("id3").document(doc3)) -).build()); - -BulkRequest.Builder bulkReq = new BulkRequest.Builder() - .index(index) - .operations(ops) - .refresh(Refresh.WaitFor); -BulkResponse bulkResponse = client.bulk(bulkReq.build()); -``` - -## Aggregations - -```java -SearchRequest searchRequest = new SearchRequest.Builder().query(q -> q.match(m -> m.field("firstName") - .query(FieldValue.of("John")))) - .aggregations("firstNames", new Aggregation.Builder().terms(t -> t.field("firstName.keyword")) - .build()) - .build(); - -SearchResponse searchResponse = client.search(searchRequest, IndexData.class); -for (Map.Entry entry : searchResponse.aggregations().entrySet()) { - System.out.println("Agg - " + entry.getKey()); - entry.getValue().sterms().buckets().array().forEach(b -> System.out.printf("%s : %d%n", b.key(), b.docCount())); -} -``` - -## Delete the document +### Deleting a document The following sample code deletes a document whose ID is 1. @@ -627,159 +159,24 @@ The following sample code deletes a document whose ID is 1. client.delete(d -> d.index(index).id("1")); ``` -## Delete the index +## Deleting an index ```java -DeleteIndexRequest deleteIndexRequest = new DeleteRequest.Builder().index(index).build(); +DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest.Builder().index(index).build(); DeleteIndexResponse deleteIndexResponse = client.indices().delete(deleteIndexRequest); ``` -## Data Stream API - -### Create a data stream +You can find a working sample of the above code in [IndexingBasics.java](./samples/src/main/java/org/opensearch/client/samples/IndexingBasics.java). -Before creating a data stream, you need to create an index template which configures a set of indices as a data stream. -A data stream must have a timestamp field. If not specified, OpenSearch uses `@timestamp` as the default timestamp field name. +## Advanced Features -The following sample code creates an index template for data stream with a custom timestamp field, and creates a data stream -which matches the name pattern specified in the index template. +- [Authentication (IAM, SigV4)](./guides/auth.md) +- [Bulk Indexing](./guides/bulk.md) +- [Cat APIs](./guides/cat.md) +- [Data Stream APIs](./guides/data_stream.md) +- [Point-in-Time APIs](./guides/point_in_time.md) +- [Search](./guides/search.md) -```java -String dataStreamIndexTemplateName = "sample-data-stream-template"; -String timestampFieldName = "my_timestamp_field"; -String namePattern = "sample-data-stream-*"; -String dataStreamName = "sample-data-stream-1"; - -// Create an index template which configures data stream -PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest.Builder() - .name(dataStreamIndexTemplateName) - .indexPatterns(namePattern) - .dataStream(new DataStream.Builder() - .timestampField(t -> t.name(timestampFieldName)) - .build()) - .build(); -PutIndexTemplateResponse putIndexTemplateResponse = javaClient().indices().putIndexTemplate(putIndexTemplateRequest); +## Plugins -// Create a data stream -CreateDataStreamRequest createDataStreamRequest = new CreateDataStreamRequest.Builder().name(dataStreamName).build(); -CreateDataStreamResponse createDataStreamResponse = javaClient().indices().createDataStream(createDataStreamRequest); -``` - -### Get data stream - -```java -GetDataStreamRequest getDataStreamRequest = new GetDataStreamRequest.Builder().name(dataStreamName).build(); -GetDataStreamResponse getDataStreamResponse = javaClient().indices().getDataStream(getDataStreamRequest); -``` - -### Data stream stats - -```java -DataStreamsStatsRequest dataStreamsStatsRequest = new DataStreamsStatsRequest.Builder().name(dataStreamName).build(); -DataStreamsStatsResponse dataStreamsStatsResponse = javaClient().indices().dataStreamsStats(dataStreamsStatsRequest); -``` - -### Delete data stream and backing indices - -```java -DeleteDataStreamRequest deleteDataStreamRequest = new DeleteDataStreamRequest.Builder().name(dataStreamName).build(); -DeleteDataStreamResponse deleteDataStreamResponse = javaClient().indices().deleteDataStream(deleteDataStreamRequest); -``` - -## Point-In-Time API - -### Creating a point in time - -Creates a PIT. The keep_alive query parameter is required; it specifies how long to keep a PIT. - -```java -CreatePitRequest createPitRequest = new CreatePitRequest.Builder() - .targetIndexes(Collections.singletonList(index)) - .keepAlive(new Time.Builder().time("100m").build()).build(); - -CreatePitResponse createPitResponse = javaClient() - .createPit(createPitRequest); -``` - -### List all point in time - -Returns all PITs in the OpenSearch cluster. - -```java -ListAllPitResponse listAllPitResponse = javaClient().listAllPit(); -``` - -### Delete point in time - -Deletes one, several, or all PITs. PITs are automatically deleted when the keep_alive time period elapses. However, to deallocate resources, you can delete a PIT using the Delete PIT API. The Delete PIT API supports deleting a list of PITs by ID or deleting all PITs at once. - -```java -DeletePitRequest deletePitRequest = new DeletePitRequest.Builder() - .pitId(Collections.singletonList("pit_id")).build(); - -DeletePitResponse deletePitResponse = javaClient() - .deletePit(deletePitRequest); -``` - -## Cat API - -### Cat Indices - -The following sample code cat indices with required headers and sorted by creation date - -```java -IndicesRequest indicesRequest = new IndicesRequest.Builder() - .headers("index,health,status,pri,rep,doc.count,creation.date,creation.date.string").sort("creation.date").build(); -IndicesResponse indicesResponse = javaClient().cat().indices(indicesRequest); -``` - -### Cat aliases - -The following sample code cat aliases with name "test-alias" and sorted by index - -```java -AliasesRequest aliasesRequest = new AliasesRequest.Builder().name("test-alias").sort("index").build(); -AliasesResponse aliasesResponse = javaClient().cat().aliases(aliasesRequest); -``` - -### Cat nodes - -The following sample code cat nodes sorted by cpu - -```java -NodesResponse nodesResponse = javaClient().cat().nodes(r -> r.sort("cpu")); -``` - -### Cat point in time segments - -Similarly to the CAT Segments API, the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. - -```java -SegmentsResponse pitSegmentsResponse = javaClient().cat() - .pitSegments(r -> r.headers("index,shard,id,segment,size")); -``` - -# Using different transport options - -## Amazon Managed OpenSearch - -Use `AwsSdk2Transport` to make requests to Amazon Managed OpenSearch and OpenSearch Serverless. - -```java -SdkHttpClient httpClient = ApacheHttpClient.builder().build(); - -OpenSearchClient client = new OpenSearchClient( - new AwsSdk2Transport( - httpClient, - "search-...us-west-2.es.amazonaws.com", // OpenSearch endpoint, without https:// - "es" // signing service name, use "aoss" for OpenSearch Serverless - Region.US_WEST_2, // signing service region - AwsSdk2TransportOptions.builder().build() - ) -); - -InfoResponse info = client.info(); -System.out.println(info.version().distribution() + ": " + info.version().number()); - -httpClient.close(); -``` +- [k-NN](guides/plugins/knn.md) \ No newline at end of file diff --git a/guides/auth.md b/guides/auth.md new file mode 100644 index 0000000000..658464642d --- /dev/null +++ b/guides/auth.md @@ -0,0 +1,27 @@ +- [Authentication](#authentication) + - [Amazon OpenSearch Service](#amazon-opensearch-service) + +# Authentication + +## Amazon OpenSearch Service + +Requests to [OpenSearch Service and OpenSearch Serverless](https://docs.aws.amazon.com/opensearch-service/index.html) must be signed using the AWS signing protocol. Use `AwsSdk2Transport` to send signed requests. + +```java +SdkHttpClient httpClient = ApacheHttpClient.builder().build(); + +OpenSearchClient client = new OpenSearchClient( + new AwsSdk2Transport( + httpClient, + "search-...us-west-2.es.amazonaws.com", // OpenSearch endpoint, without https:// + "es" // signing service name, use "aoss" for OpenSearch Serverless + Region.US_WEST_2, // signing service region + AwsSdk2TransportOptions.builder().build() + ) +); + +InfoResponse info = client.info(); +System.out.println(info.version().distribution() + ": " + info.version().number()); + +httpClient.close(); +``` \ No newline at end of file diff --git a/guides/bulk.md b/guides/bulk.md new file mode 100644 index 0000000000..3c12c2ddc7 --- /dev/null +++ b/guides/bulk.md @@ -0,0 +1,41 @@ +- [Bulk](#bulk) + - [Bulk Indexing](#bulk-indexing) + - [Bulk requests](#bulk-requests) + +# Bulk + +The [Bulk API](https://opensearch.org/docs/latest/api-reference/document-apis/bulk/) lets you add, update, or delete multiple documents in a single request. + +## Bulk Indexing + +## Bulk requests + +```java +String indexName = "sample-index"; +CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(index).build(); +client.indices().create(createIndexRequest); + +ArrayList ops = new ArrayList<>(); +IndexData doc1 = new IndexData("Document 1", "The text of document 1"); +ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(indexName).id("id1").document(doc1)) +).build()); +IndexData doc2 = new IndexData("Document 2", "The text of document 2"); +ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(indexName).id("id2").document(doc2)) +).build()); +IndexData doc3 = new IndexData("Document 3", "The text of document 3"); +ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(indexName).id("id3").document(doc3)) +).build()); + +BulkRequest.Builder bulkReq = new BulkRequest.Builder() + .index(indexName) + .operations(ops) + .refresh(Refresh.WaitFor); +BulkResponse bulkResponse = client.bulk(bulkReq.build()); +``` + +[IndexData](../samples/src/main/java/org/opensearch/client/samples/util/IndexData.java) refers to sample data class. + +You can find a working sample of the above code in [Bulk.java](../samples/src/main/java/org/opensearch/client/samples/Bulk.java). \ No newline at end of file diff --git a/guides/cat.md b/guides/cat.md new file mode 100644 index 0000000000..a5a3adcb5e --- /dev/null +++ b/guides/cat.md @@ -0,0 +1,42 @@ +- [Cat API](#cat-api) + - [Cat Indices](#cat-indices) + - [Cat aliases](#cat-aliases) + - [Cat nodes](#cat-nodes) + - [Cat point in time segments](#cat-point-in-time-segments) + +# Cat API + +The CAT API is a human-readable interface that returns plain text instead of traditional JSON. + +## Cat Indices +The following sample code cat indices with required headers and sorted by creation date + +```java +IndicesRequest indicesRequest = new IndicesRequest.Builder() + .headers("index,health,status,pri,rep,doc.count,creation.date,creation.date.string").sort("creation.date").build(); +IndicesResponse indicesResponse = javaClient().cat().indices(indicesRequest); +``` + + +## Cat aliases +The following sample code cat aliases with name "test-alias" and sorted by index + +```java +AliasesRequest aliasesRequest = new AliasesRequest.Builder().name("test-alias").sort("index").build(); +AliasesResponse aliasesResponse = javaClient().cat().aliases(aliasesRequest); +``` + +## Cat nodes +The following sample code cat nodes sorted by cpu + +```java +NodesResponse nodesResponse = javaClient().cat().nodes(r -> r.sort("cpu")); +``` + +## Cat point in time segments +Similarly to the CAT Segments API, the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. + +```java +SegmentsResponse pitSegmentsResponse = javaClient().cat() + .pitSegments(r -> r.headers("index,shard,id,segment,size")); +``` \ No newline at end of file diff --git a/guides/data_stream.md b/guides/data_stream.md new file mode 100644 index 0000000000..7c49807f8c --- /dev/null +++ b/guides/data_stream.md @@ -0,0 +1,54 @@ +- [Data Stream API](#data-stream-api) + - [Create a data stream](#create-a-data-stream) + - [Get data stream](#get-data-stream) + - [Data stream stats](#data-stream-stats) + - [Delete data stream and backing indices](#delete-data-stream-and-backing-indices) + +# Data Stream API + +## Create a data stream +Before creating a data stream, you need to create an index template which configures a set of indices as a data stream. +A data stream must have a timestamp field. If not specified, OpenSearch uses `@timestamp` as the default timestamp field name. + +The following sample code creates an index template for data stream with a custom timestamp field, and creates a data stream +which matches the name pattern specified in the index template. +```java +String dataStreamIndexTemplateName = "sample-data-stream-template"; +String timestampFieldName = "my_timestamp_field"; +String namePattern = "sample-data-stream-*"; +String dataStreamName = "sample-data-stream-1"; + +// Create an index template which configures data stream +PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest.Builder() + .name(dataStreamIndexTemplateName) + .indexPatterns(namePattern) + .dataStream(new DataStream.Builder() + .timestampField(t -> t.name(timestampFieldName)) + .build()) + .build(); +PutIndexTemplateResponse putIndexTemplateResponse = client.indices().putIndexTemplate(putIndexTemplateRequest); + +// Create a data stream +CreateDataStreamRequest createDataStreamRequest = new CreateDataStreamRequest.Builder().name(dataStreamName).build(); +CreateDataStreamResponse createDataStreamResponse = client.indices().createDataStream(createDataStreamRequest); +``` + +## Get data stream +```java +GetDataStreamRequest getDataStreamRequest = new GetDataStreamRequest.Builder().name(dataStreamName).build(); +GetDataStreamResponse getDataStreamResponse = client.indices().getDataStream(getDataStreamRequest); +``` + +## Data stream stats +```java +DataStreamsStatsRequest dataStreamsStatsRequest = new DataStreamsStatsRequest.Builder().name(dataStreamName).build(); +DataStreamsStatsResponse dataStreamsStatsResponse = client.indices().dataStreamsStats(dataStreamsStatsRequest); +``` + +## Delete data stream and backing indices +```java +DeleteDataStreamRequest deleteDataStreamRequest = new DeleteDataStreamRequest.Builder().name(dataStreamName).build(); +DeleteDataStreamResponse deleteDataStreamResponse = client.indices().deleteDataStream(deleteDataStreamRequest); +``` + +You can find a working sample of the above code in [DataStreamBasics.java](../samples/src/main/java/org/opensearch/client/samples/DataStreamBasics.java). \ No newline at end of file diff --git a/guides/plugins/knn.md b/guides/plugins/knn.md new file mode 100644 index 0000000000..a2c3db72b8 --- /dev/null +++ b/guides/plugins/knn.md @@ -0,0 +1,288 @@ +- [k-NN Plugin](#k-nn-plugin) + - [Basic Approximate k-NN](#basic-approximate-k-nn) + - [Create an Index](#create-an-index) + - [Index Vectors](#index-vectors) + - [Search for Nearest Neighbors](#search-for-nearest-neighbors) + - [Approximate k-NN with a Boolean Filter](#approximate-k-nn-with-a-boolean-filter) + - [Approximate k-NN with an Efficient Filter](#approximate-k-nn-with-an-efficient-filter) + - [Exact k-NN with a scoring script](#exact-k-nn-with-a-scoring-script) + - [Exact k-NN with the Painless scripting extensions](#exact-k-nn-with-the-painless-scripting-extensions) + +# k-NN Plugin + +Short for k-nearest neighbors, the k-NN plugin enables users to search for the k-nearest neighbors to a query point across an index of vectors. See the [plugin's documentation](https://opensearch.org/docs/latest/search-plugins/knn/index/) for more information. + +## Basic Approximate k-NN + +In the following example we create a 5-dimensional k-NN index with random data. You can find a synchronous version of this working sample in [samples/src/main/java/org/opensearch/client/samples/knn/KnnBasics.java](../../samples/src/main/java/org/opensearch/client/samples/knn/KnnBasics.java). + +```bash +$ ./gradlew :samples:run -Dsamples.mainClass=knn.KnnBasics + +[Main] INFO - Running main class: org.opensearch.client.samples.knn.KnnBasics +[KnnBasics] INFO - Server: opensearch@2.7.0 +[KnnBasics] INFO - Creating index my-index +[KnnBasics] INFO - Indexing 10 vectors +[KnnBasics] INFO - Waiting for indexing to finish +[KnnBasics] INFO - Searching for vector [0.67, 0.67, 0.37, 0.0, 0.72] +[KnnBasics] INFO - Found {values=[0.32, 0.96, 0.41, 0.04, 0.9]} with score 0.8050233 +[KnnBasics] INFO - Found {values=[0.04, 0.58, 0.13, 0.27, 0.37]} with score 0.6031363 +[KnnBasics] INFO - Found {values=[0.96, 0.88, 0.8, 0.41, 0.18]} with score 0.5640794 +[KnnBasics] INFO - Deleting index my-index +``` + +### Create an Index + +```java +final var indexName = "my-index"; +final var dimensions = 5; + +client.indices().create(r -> r + .index(indexName) + .settings(s -> s.knn(true)) + .mappings(m -> m + .properties("values", p -> p + .knnVector(k -> k.dimension(dimensions))))); +``` + +### Index Vectors + +Given the following document class definition: + +```java +public static class Doc { + private float[] values; + + public Doc() {} + + public Doc(float[] values) { + this.values = values; + } + + public static Doc rand(int dimensions) { + var values = new float[dimensions]; + for (var i = 0; i < dimensions; ++i) { + values[i] = Math.round(Math.random() * 100.0) / 100.0f; + } + return new Doc(values); + } + + // Getters/Setters & toString elided +} +``` + +Create 10 random vectors and insert them using the bulk API: + +```java +final var nVectors = 10; +var bulkRequest = new BulkRequest.Builder(); +for (var i = 0; i < nVectors; ++i) { + var id = Integer.toString(i); + var doc = Doc.rand(dimensions); + bulkRequest.operations(b -> b + .index(o -> o + .index(indexName) + .id(id) + .document(doc))); +} + +client.bulk(bulkRequest.build()); + +client.indices().refresh(i -> i.index(indexName)); +``` + +### Search for Nearest Neighbors + +Create a random vector of the same size and search for its nearest neighbors. + +```java +final var searchVector = new float[dimensions]; +for (var i = 0; i < dimensions; ++i) { + searchVector[i] = Math.round(Math.random() * 100.0) / 100.0f; +} + +var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .knn(k -> k + .field("values") + .vector(searchVector) + .k(3))), + Doc.class); + +for (var hit : searchResponse.hits().hits()) { + System.out.println(hit.source()); +} +``` + +## Approximate k-NN with a Boolean Filter + +In the [KnnBooleanFilter.java sample](../../samples/src/main/java/org/opensearch/client/samples/knn/KnnBooleanFilter.java) we create a 5-dimensional k-NN index with random data and a `metadata` field that contains a book genre (e.g. `fiction`). The search query is a k-NN search filtered by genre. The filter clause is outside the k-NN query clause and is applied after the k-NN search. + +```java +var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .bool(b -> b + .filter(f -> f + .bool(b2 -> b2 + .must(m -> m + .term(t -> t + .field("metadata.genre") + .value(v -> v.stringValue(searchGenre)))))) + .must(m -> m + .knn(k -> k + .field("values") + .vector(searchVector) + .k(5))))), + Doc.class); +``` + +```bash +$ ./gradlew :samples:run -Dsamples.mainClass=knn.KnnBooleanFilter + +[Main] INFO - Running main class: org.opensearch.client.samples.knn.KnnBooleanFilter +[KnnBooleanFilter] INFO - Server: opensearch@2.7.0 +[KnnBooleanFilter] INFO - Creating index my-index +[KnnBooleanFilter] INFO - Indexing 3000 vectors +[KnnBooleanFilter] INFO - Waiting for indexing to finish +[KnnBooleanFilter] INFO - Searching for vector [0.18, 0.71, 0.44, 0.03, 0.42] with the 'drama' genre +[KnnBooleanFilter] INFO - Found {values=[0.21, 0.58, 0.55, 0.09, 0.45], metadata={genre=drama}} with score 0.966744 +[KnnBooleanFilter] INFO - Deleting index my-index +``` + +## Approximate k-NN with an Efficient Filter + +In the [KnnEfficientFilter.java sample](../../samples/src/main/java/org/opensearch/client/samples/knn/KnnEfficientFilter.java) we implement the example in [the k-NN documentation](https://opensearch.org/docs/latest/search-plugins/knn/filter-search-knn/), which creates an index that uses the Lucene engine and HNSW as the method in the mapping, containing hotel location and parking data, then search for the top three hotels near the location with the coordinates `[5, 4]` that are rated between 8 and 10, inclusive, and provide parking. + +```java +var searchResponse = client.search(s -> s + .index(indexName) + .size(3) + .query(q -> q + .knn(k -> k + .field("location") + .vector(searchLocation) + .k(3) + .filter(Query.of(f -> f + .bool(b -> b + .must(m -> m + .range(r -> r + .field("rating") + .gte(JsonData.of(searchRatingMin)) + .lte(JsonData.of(searchRatingMax)))) + .must(m -> m + .term(t -> t + .field("parking") + .value(FieldValue.of(searchParking))))))))), + Hotel.class); +``` + +```bash +$ ./gradlew :samples:run -Dsamples.mainClass=knn.KnnEfficientFilter + +[Main] INFO - Running main class: org.opensearch.client.samples.knn.KnnEfficientFilter +[KnnEfficientFilter] INFO - Server: opensearch@2.7.0 +[KnnEfficientFilter] INFO - Creating index hotels-index +[KnnEfficientFilter] INFO - Indexing hotel {location=[5.2, 4.0], parking=true, rating=5} with id 1 +[KnnEfficientFilter] INFO - Indexing hotel {location=[5.2, 3.9], parking=false, rating=4} with id 2 +[KnnEfficientFilter] INFO - Indexing hotel {location=[4.9, 3.4], parking=true, rating=9} with id 3 +[KnnEfficientFilter] INFO - Indexing hotel {location=[4.2, 4.6], parking=false, rating=6} with id 4 +[KnnEfficientFilter] INFO - Indexing hotel {location=[3.3, 4.5], parking=true, rating=8} with id 5 +[KnnEfficientFilter] INFO - Indexing hotel {location=[6.4, 3.4], parking=true, rating=9} with id 6 +[KnnEfficientFilter] INFO - Indexing hotel {location=[4.2, 6.2], parking=true, rating=5} with id 7 +[KnnEfficientFilter] INFO - Indexing hotel {location=[2.4, 4.0], parking=true, rating=8} with id 8 +[KnnEfficientFilter] INFO - Indexing hotel {location=[1.4, 3.2], parking=false, rating=5} with id 9 +[KnnEfficientFilter] INFO - Indexing hotel {location=[7.0, 9.9], parking=true, rating=9} with id 10 +[KnnEfficientFilter] INFO - Indexing hotel {location=[3.0, 2.3], parking=false, rating=6} with id 11 +[KnnEfficientFilter] INFO - Indexing hotel {location=[5.0, 1.0], parking=true, rating=3} with id 12 +[KnnEfficientFilter] INFO - Indexing 12 documents +[KnnEfficientFilter] INFO - Waiting for indexing to finish +[KnnEfficientFilter] INFO - Searching for hotel near [5.0, 4.0] with rating >=8,<=10 and parking=true +[KnnEfficientFilter] INFO - Found {location=[4.9, 3.4], parking=true, rating=9} with score 0.72992706 +[KnnEfficientFilter] INFO - Found {location=[6.4, 3.4], parking=true, rating=9} with score 0.3012048 +[KnnEfficientFilter] INFO - Found {location=[3.3, 4.5], parking=true, rating=8} with score 0.24154587 +[KnnEfficientFilter] INFO - Deleting index hotels-index +``` + +## Exact k-NN with a scoring script + +In the [KnnScriptScore.java sample](../../samples/src/main/java/org/opensearch/client/samples/knn/KnnScriptScore.java) we create a 5-dimensional k-NN index with random data. The search query uses the [k-NN scoring script](https://opensearch.org/docs/latest/search-plugins/knn/knn-score-script/) to calculate exact nearest neighbors. + +```java +var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .scriptScore(ss -> ss + .query(qq -> qq.matchAll(m -> m)) + .script(sss -> sss + .inline(i -> i + .source("knn_score") + .lang("knn") + .params("field", JsonData.of("values")) + .params("query_value", JsonData.of(searchVector)) + .params("space_type", JsonData.of("cosinesimil")))))), + Doc.class); +``` + +```bash +$ ./gradlew :samples:run -Dsamples.mainClass=knn.KnnScriptScore + +[Main] INFO - Running main class: org.opensearch.client.samples.knn.KnnScriptScore +[KnnScriptScore] INFO - Server: opensearch@2.7.0 +[KnnScriptScore] INFO - Creating index my-index +[KnnScriptScore] INFO - Indexing 10 vectors +[KnnScriptScore] INFO - Waiting for indexing to finish +[KnnScriptScore] INFO - Searching for vector [0.94, 0.1, 0.39, 0.63, 0.42] +[KnnScriptScore] INFO - Found {values=[0.66, 0.23, 0.15, 0.44, 0.13]} with score 1.9564294 +[KnnScriptScore] INFO - Found {values=[0.94, 0.05, 0.86, 0.68, 0.05]} with score 1.90958 +[KnnScriptScore] INFO - Found {values=[0.88, 0.72, 0.29, 0.48, 0.56]} with score 1.8788767 +[KnnScriptScore] INFO - Found {values=[0.97, 0.99, 0.66, 0.61, 0.91]} with score 1.847905 +[KnnScriptScore] INFO - Found {values=[0.18, 0.29, 0.43, 0.63, 0.25]} with score 1.7819176 +[KnnScriptScore] INFO - Found {values=[0.35, 0.2, 0.62, 0.4, 0.96]} with score 1.7673628 +[KnnScriptScore] INFO - Found {values=[0.34, 0.59, 0.05, 0.47, 0.54]} with score 1.7316635 +[KnnScriptScore] INFO - Found {values=[0.55, 0.98, 0.07, 0.57, 0.06]} with score 1.6385877 +[KnnScriptScore] INFO - Found {values=[0.03, 0.72, 0.89, 0.83, 0.46]} with score 1.6147845 +[KnnScriptScore] INFO - Found {values=[0.17, 0.81, 0.09, 0.21, 0.3]} with score 1.4616101 +[KnnScriptScore] INFO - Deleting index my-index +``` + +## Exact k-NN with the Painless scripting extensions + +In the [KnnPainlessScript.java sample](../../samples/src/main/java/org/opensearch/client/samples/knn/KnnPainlessScript.java) we create a 5-dimensional k-NN index with random data. The search query uses the [k-NN Painless extensions](https://opensearch.org/docs/latest/search-plugins/knn/painless-functions/) to calculate exact nearest neighbors. + +```java +var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .scriptScore(ss -> ss + .query(qq -> qq.matchAll(m -> m)) + .script(sss -> sss + .inline(i -> i + .source("1.0 + cosineSimilarity(params.query_value, doc[params.field])") + .params("field", JsonData.of("values")) + .params("query_value", JsonData.of(searchVector)))))), + Doc.class); +``` + +```bash +$ ./gradlew :samples:run -Dsamples.mainClass=knn.KnnPainlessScript + +[Main] INFO - Running main class: org.opensearch.client.samples.knn.KnnPainlessScript +[KnnPainlessScript] INFO - Server: opensearch@2.7.0 +[KnnPainlessScript] INFO - Creating index my-index +[KnnPainlessScript] INFO - Indexing 10 vectors +[KnnPainlessScript] INFO - Waiting for indexing to finish +[KnnPainlessScript] INFO - Searching for vector [0.57, 0.86, 0.37, 0.07, 0.38] +[KnnPainlessScript] INFO - Found {values=[1.0, 0.6, 0.66, 0.03, 0.18]} with score 1.8911908 +[KnnPainlessScript] INFO - Found {values=[0.4, 0.39, 0.63, 0.09, 0.39]} with score 1.8776901 +[KnnPainlessScript] INFO - Found {values=[0.32, 0.98, 0.7, 0.7, 0.77]} with score 1.8616674 +[KnnPainlessScript] INFO - Found {values=[0.93, 0.35, 0.27, 0.45, 0.81]} with score 1.789043 +[KnnPainlessScript] INFO - Found {values=[0.81, 0.36, 0.87, 0.78, 0.56]} with score 1.7457235 +[KnnPainlessScript] INFO - Found {values=[0.55, 0.19, 0.61, 0.42, 0.4]} with score 1.743325 +[KnnPainlessScript] INFO - Found {values=[0.12, 0.54, 0.09, 0.83, 0.28]} with score 1.6045148 +[KnnPainlessScript] INFO - Found {values=[0.0, 0.04, 0.63, 0.07, 0.9]} with score 1.479921 +[KnnPainlessScript] INFO - Found {values=[0.41, 0.05, 0.52, 1.0, 0.18]} with score 1.4306322 +[KnnPainlessScript] INFO - Found {values=[0.22, 0.1, 0.59, 0.89, 0.15]} with score 1.4274814 +[KnnPainlessScript] INFO - Deleting index my-index +``` \ No newline at end of file diff --git a/guides/point_in_time.md b/guides/point_in_time.md new file mode 100644 index 0000000000..f2fa36118b --- /dev/null +++ b/guides/point_in_time.md @@ -0,0 +1,53 @@ +- [Point-in-Time](#point-in-time) + - [Point-In-Time API](#point-in-time-api) + - [Creating a point in time](#creating-a-point-in-time) + - [List all point in time](#list-all-point-in-time) + - [Delete point in time](#delete-point-in-time) + +# Point-in-Time + +[Point in Time (PIT)](https://opensearch.org/docs/latest/search-plugins/point-in-time/) lets you run different queries against a dataset that is fixed in time. + +## Point-In-Time API + +### Creating a point in time + +To create a PIT, first create an index. + +``` +java +String index = "sample-index"; +CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(index).build(); +client.indices().create(createIndexRequest); +``` + +To create a PIT, the keep_alive query parameter is required; it specifies how long to keep a PIT. + +```java +CreatePitRequest createPitRequest = new CreatePitRequest.Builder() + .targetIndexes(Collections.singletonList(index)) + .keepAlive(new Time.Builder().time("100m").build()).build(); + +CreatePitResponse createPitResponse = client.createPit(createPitRequest); +``` + +### List all point in time + +Returns all PITs in the OpenSearch cluster. + +```java +ListAllPitResponse listAllPitResponse = client.listAllPit(); +``` + +### Delete point in time + +Deletes one, several, or all PITs. PITs are automatically deleted when the keep_alive time period elapses. However, to deallocate resources, you can delete a PIT using the Delete PIT API. The Delete PIT API supports deleting a list of PITs by ID or deleting all PITs at once. + +```java +DeletePitRequest deletePitRequest = new DeletePitRequest.Builder() + .pitId(Collections.singletonList(createPitResponse.pitId())).build(); + +DeletePitResponse deletePitResponse = client.deletePit(deletePitRequest); +``` + +You can find a working sample of the above code in [PointInTime.java](../samples/src/main/java/org/opensearch/client/samples/PointInTime.java). \ No newline at end of file diff --git a/guides/search.md b/guides/search.md new file mode 100644 index 0000000000..d343b30420 --- /dev/null +++ b/guides/search.md @@ -0,0 +1,283 @@ +- [Search](#search) + - [Setup](#setup) + - [Search API](#search-api) + - [Basic Search](#basic-search) + - [Get raw JSON results](#get-raw-json-results) + - [Search documents using a match query](#search-documents-using-a-match-query) + - [Search documents using suggesters](#search-documents-using-suggesters) + - [Using completion suggester](#using-completion-suggester) + - [Using term suggester](#using-term-suggester) + - [Using phrase suggester](#using-phrase-suggester) + - [Aggregations](#aggregations) + +# Search + +OpenSearch provides a powerful search API that allows you to search for documents in an index. The search API supports a number of parameters that allow you to customize the search operation. In this guide, we will explore the search API and its parameters. + +## Setup + +To get started, first create a client, create an index and index some documents: + +```java +import org.apache.hc.core5.http.HttpHost; + +final HttpHost[] hosts = new HttpHost[] { + new HttpHost("http", "localhost", 9200) + }; + +final OpenSearchTransport transport = ApacheHttpClient5TransportBuilder + .builder(hosts) + .setMapper(new JacksonJsonpMapper()) + .build(); +OpenSearchClient client = new OpenSearchClient(transport); + +String index = "sample-index"; +CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(index).build(); +client.indices().create(createIndexRequest); + +IndexData indexData = new IndexData("Document 1", "Text for document 1"); +IndexRequest indexRequest = new IndexRequest.Builder().index(index).id("1").document(indexData).build(); +client.index(indexRequest); + +indexData = new IndexData("Document 2", "Text for document 2"); +indexRequest = new IndexRequest.Builder().index(index).id("2").document(indexData).build(); +client.index(indexRequest); +``` + +[IndexData](../samples/src/main/java/org/opensearch/client/samples/util/IndexData.java) refers to sample data class. + +## Search API + +### Basic Search + +```java +SearchResponse searchResponse = client.search(s -> s.index(index), IndexData.class); +for (int i = 0; i < searchResponse.hits().hits().size(); i++) { + System.out.println(searchResponse.hits().hits().get(i).source()); +} +``` + +#### Get raw JSON results + +When the target class is not defined or if the response result is a semi-structured data not tied to an object definition, use a raw JSON data representation as the target class. For example, the below snippet uses `ObjectNode` from jackson. + +```java +SearchResponse searchResponse = client.search(b -> b.index(index), ObjectNode.class); +for (int i = 0; i < searchResponse.hits().hits().size(); i++) { + System.out.println(searchResponse.hits().hits().get(i).source()); +} +``` + +### Search documents using a match query + +```java +SearchRequest searchRequest = new SearchRequest.Builder().query(q -> q.match(m -> m.field("text") + .query(FieldValue.of("Text for document 2")))) + .build(); + +SearchResponse searchResponse = client.search(searchRequest, IndexData.class); +for (int i = 0; i < searchResponse.hits().hits().size(); i++) { + System.out.println(searchResponse.hits().hits().get(i).source()); +} +``` + +### Search documents using suggesters + +[AppData](../samples/src/main/java/org/opensearch/client/samples/util/AppData.java) refers to the sample data class used in the below samples. + +#### Using completion suggester + +```java +String index = "completion-suggester"; + +Property intValueProp = new Property.Builder() + .long_(v -> v) + .build(); +Property msgCompletionProp = new Property.Builder() + .completion(c -> c) + .build(); +client.indices().create(c -> c + .index(index) + .mappings(m -> m + .properties("intValue", intValueProp) + .properties("msg", msgCompletionProp))); + +AppData appData = new AppData(); +appData.setIntValue(1337); +appData.setMsg("foo"); + +client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + +appData.setIntValue(1338); +appData.setMsg("foobar"); + +client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + +String suggesterName = "msgSuggester"; + +CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() + .field("msg") + .size(1) + .build(); +FieldSuggester fieldSuggester = new FieldSuggester.Builder().prefix("foo") + .completion(completionSuggester) + .build(); +Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + +SearchResponse response = client.search(searchRequest, AppData.class); +``` + +#### Using term suggester + +```java +String index = "term-suggester"; + +// term suggester does not require a special mapping +client.indices().create(c -> c + .index(index)); + +AppData appData = new AppData(); +appData.setIntValue(1337); +appData.setMsg("foo"); + +client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + +appData.setIntValue(1338); +appData.setMsg("foobar"); + +client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + +String suggesterName = "msgSuggester"; + +TermSuggester termSuggester = FieldSuggesterBuilders.term() + .field("msg") + .size(1) + .build(); +FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("fool") + .term(termSuggester) + .build(); +Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + +SearchResponse response = client.search(searchRequest, AppData.class); +``` + +#### Using phrase suggester + +```java +String index = "test-phrase-suggester"; + +ShingleTokenFilter shingleTokenFilter = new ShingleTokenFilter.Builder().minShingleSize("2") + .maxShingleSize("3") + .build(); + +Analyzer analyzer = new Analyzer.Builder() + .custom(new CustomAnalyzer.Builder().tokenizer("standard") + .filter(Arrays.asList("lowercase", "shingle")).build()) + .build(); + +TokenFilter tokenFilter = new TokenFilter.Builder() + .definition(new TokenFilterDefinition.Builder() + .shingle(shingleTokenFilter).build()) + .build(); + +IndexSettingsAnalysis indexSettingsAnalysis = new IndexSettingsAnalysis.Builder() + .analyzer("trigram", analyzer) + .filter("shingle", tokenFilter) + .build(); + +IndexSettings settings = new IndexSettings.Builder().analysis(indexSettingsAnalysis).build(); + +TypeMapping mapping = new TypeMapping.Builder().properties("msg", new Property.Builder() + .text(new TextProperty.Builder().fields("trigram", new Property.Builder() + .text(new TextProperty.Builder().analyzer("trigram").build()) + .build()).build()) + .build()).build(); + +client.indices().create(c -> c + .index(index) + .settings(settings) + .mappings(mapping)); + +AppData appData = new AppData(); +appData.setIntValue(1337); +appData.setMsg("Design Patterns"); + +client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + +appData.setIntValue(1338); +appData.setMsg("Software Architecture Patterns Explained"); + +client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + +String suggesterName = "msgSuggester"; + +PhraseSuggester phraseSuggester = FieldSuggesterBuilders.phrase() + .field("msg.trigram") + .build(); +FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("design paterns") + .phrase(phraseSuggester) + .build(); +Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); +SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + +SearchResponse response = client.search(searchRequest, AppData.class); +``` + +### Aggregations + +```java +SearchRequest searchRequest = new SearchRequest.Builder().query(q -> q.match(m -> m.field("title") + .query(FieldValue.of("Document 1")))) + .aggregations("titles", new Aggregation.Builder().terms(t -> t.field("title.keyword")) + .build()) + .build(); + +SearchResponse searchResponse = client.search(searchRequest, IndexData.class); +for (Map.Entry entry : searchResponse.aggregations().entrySet()) { + System.out.println("Agg - " + entry.getKey()); + entry.getValue().sterms().buckets().array().forEach(b -> System.out.printf("%s : %d%n", b.key(), b.docCount())); +} +``` + +You can find a working sample of the above code in [Search.java](../samples/src/main/java/org/opensearch/client/samples/Search.java). \ No newline at end of file diff --git a/samples/build.gradle.kts b/samples/build.gradle.kts new file mode 100644 index 0000000000..8c635d83d9 --- /dev/null +++ b/samples/build.gradle.kts @@ -0,0 +1,41 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +plugins { + java + application + checkstyle +} + +checkstyle { + toolVersion = "10.0" +} + +java { + targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_11 +} + +dependencies { + implementation(project(":java-client")) + implementation("org.apache.logging.log4j", "log4j-api","[2.17.1,3.0)") + implementation("org.apache.logging.log4j", "log4j-core","[2.17.1,3.0)") + implementation("org.apache.logging.log4j", "log4j-slf4j2-impl","[2.17.1,3.0)") + implementation("commons-logging", "commons-logging", "1.2") + implementation("com.fasterxml.jackson.core", "jackson-databind", "2.15.2") + implementation("org.apache.httpcomponents.client5", "httpclient5", "5.2.1") + implementation("org.apache.httpcomponents.core5", "httpcore5", "5.2.2") +} + +application { + mainClass.set("org.opensearch.client.samples.Main") +} + +tasks.named("run") { + systemProperty("samples.mainClass", System.getProperty("samples.mainClass")) +} diff --git a/samples/src/main/java/org/opensearch/client/samples/Bulk.java b/samples/src/main/java/org/opensearch/client/samples/Bulk.java new file mode 100644 index 0000000000..b3f84f04e6 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/Bulk.java @@ -0,0 +1,104 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.mapping.IntegerNumberProperty; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch._types.mapping.TypeMapping; +import org.opensearch.client.opensearch._types.query_dsl.Query; +import org.opensearch.client.opensearch.core.BulkRequest; +import org.opensearch.client.opensearch.core.BulkResponse; +import org.opensearch.client.opensearch.core.SearchRequest; +import org.opensearch.client.opensearch.core.SearchResponse; +import org.opensearch.client.opensearch.core.bulk.BulkOperation; +import org.opensearch.client.opensearch.core.bulk.IndexOperation; +import org.opensearch.client.opensearch.indices.CreateIndexRequest; +import org.opensearch.client.opensearch.indices.DeleteIndexRequest; +import org.opensearch.client.opensearch.indices.IndexSettings; +import org.opensearch.client.samples.util.IndexData; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=Bulk + */ +public class Bulk { + private static final Logger LOGGER = LogManager.getLogger(Bulk.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + IndexSettings settings = new IndexSettings.Builder() + .numberOfShards("2") + .numberOfReplicas("1") + .build(); + TypeMapping mapping = new TypeMapping.Builder() + .properties("age", new Property.Builder().integer(new IntegerNumberProperty.Builder().build()).build()) + .build(); + CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(indexName) + .settings(settings) + .mappings(mapping) + .build(); + client.indices().create(createIndexRequest); + } + + LOGGER.info("Bulk indexing documents"); + ArrayList ops = new ArrayList<>(); + IndexData doc1 = new IndexData("Document 1", "The text of document 1"); + ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(indexName).id("id1").document(doc1)) + ).build()); + IndexData doc2 = new IndexData("Document 2", "The text of document 2"); + ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(indexName).id("id2").document(doc2)) + ).build()); + IndexData doc3 = new IndexData("Document 3", "The text of document 3"); + ops.add(new BulkOperation.Builder().index( + IndexOperation.of(io -> io.index(indexName).id("id3").document(doc3)) + ).build()); + + BulkRequest.Builder bulkReq = new BulkRequest.Builder() + .index(indexName) + .operations(ops) + .refresh(Refresh.WaitFor); + BulkResponse bulkResponse = client.bulk(bulkReq.build()); + LOGGER.info("Bulk response items: {}", bulkResponse.items().size()); + + Query query = Query.of(qb -> qb.match(mb -> mb.field("title").query(fv -> fv.stringValue("Document")))); + final SearchRequest.Builder searchReq = new SearchRequest.Builder() + .allowPartialSearchResults(false) + .index(List.of(indexName)) + .size(10) + .source(sc -> sc.fetch(false)) + .ignoreThrottled(false) + .query(query); + SearchResponse searchResponse = client.search(searchReq.build(), IndexData.class); + LOGGER.info("Found {} documents", searchResponse.hits().hits().size()); + + LOGGER.info("Deleting index {}", indexName); + DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest.Builder().index(indexName).build(); + client.indices().delete(deleteIndexRequest); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/DataStreamBasics.java b/samples/src/main/java/org/opensearch/client/samples/DataStreamBasics.java new file mode 100644 index 0000000000..e6d8bf5875 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/DataStreamBasics.java @@ -0,0 +1,75 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.opensearch.indices.CreateDataStreamRequest; +import org.opensearch.client.opensearch.indices.DataStream; +import org.opensearch.client.opensearch.indices.DataStreamsStatsRequest; +import org.opensearch.client.opensearch.indices.DataStreamsStatsResponse; +import org.opensearch.client.opensearch.indices.DeleteDataStreamRequest; +import org.opensearch.client.opensearch.indices.GetDataStreamRequest; +import org.opensearch.client.opensearch.indices.GetDataStreamResponse; +import org.opensearch.client.opensearch.indices.PutIndexTemplateRequest; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=DataStreamBasics + */ +public class DataStreamBasics { + private static final Logger LOGGER = LogManager.getLogger(DataStreamBasics.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + String dataStreamIndexTemplateName = "sample-data-stream-template"; + String timestampFieldName = "my_timestamp_field"; + String namePattern = "sample-data-stream-*"; + String dataStreamName = "sample-data-stream-1"; + + // Create an index template which configures data stream + PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest.Builder() + .name(dataStreamIndexTemplateName) + .indexPatterns(namePattern) + .dataStream(new DataStream.Builder() + .timestampField(t -> t.name(timestampFieldName)) + .build()) + .build(); + client.indices().putIndexTemplate(putIndexTemplateRequest); + + // Create a data stream + CreateDataStreamRequest createDataStreamRequest = new CreateDataStreamRequest.Builder().name(dataStreamName).build(); + client.indices().createDataStream(createDataStreamRequest); + LOGGER.info("Created a data stream"); + + GetDataStreamRequest getDataStreamRequest = new GetDataStreamRequest.Builder().name(dataStreamName).build(); + GetDataStreamResponse getDataStreamResponse = client.indices().getDataStream(getDataStreamRequest); + LOGGER.info("Found {} data streams", getDataStreamResponse.dataStreams().size()); + + DataStreamsStatsRequest dataStreamsStatsRequest = new DataStreamsStatsRequest.Builder().name(dataStreamName).build(); + DataStreamsStatsResponse dataStreamsStatsResponse = client.indices().dataStreamsStats(dataStreamsStatsRequest); + LOGGER.info("Data stream stats:"); + LOGGER.info("Shards: {}", dataStreamsStatsResponse.shards()); + LOGGER.info("Data stream count: {}", dataStreamsStatsResponse.dataStreamCount()); + LOGGER.info("Backing indices: {}", dataStreamsStatsResponse.backingIndices()); + LOGGER.info("Total store size: {}", dataStreamsStatsResponse.totalStoreSize()); + LOGGER.info("Data stream name: {}", dataStreamsStatsResponse.dataStreams().get(0).dataStream()); + + LOGGER.info("Deleting data stream"); + DeleteDataStreamRequest deleteDataStreamRequest = new DeleteDataStreamRequest.Builder().name(dataStreamName).build(); + client.indices().deleteDataStream(deleteDataStreamRequest); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/IndexingBasics.java b/samples/src/main/java/org/opensearch/client/samples/IndexingBasics.java new file mode 100644 index 0000000000..bba03de80b --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/IndexingBasics.java @@ -0,0 +1,118 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import java.util.ArrayList; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch._types.mapping.DynamicMapping; +import org.opensearch.client.opensearch._types.mapping.FieldNamesField; +import org.opensearch.client.opensearch._types.mapping.IntegerNumberProperty; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch._types.mapping.RoutingField; +import org.opensearch.client.opensearch._types.mapping.SourceField; +import org.opensearch.client.opensearch._types.mapping.TypeMapping; +import org.opensearch.client.opensearch.core.IndexRequest; +import org.opensearch.client.opensearch.core.SearchResponse; +import org.opensearch.client.opensearch.indices.CreateIndexRequest; +import org.opensearch.client.opensearch.indices.DeleteIndexRequest; +import org.opensearch.client.opensearch.indices.GetMappingRequest; +import org.opensearch.client.opensearch.indices.GetMappingResponse; +import org.opensearch.client.opensearch.indices.IndexSettings; +import org.opensearch.client.opensearch.indices.PutMappingRequest; +import org.opensearch.client.samples.util.IndexData; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=IndexingBasics + */ +public class IndexingBasics { + private static final Logger LOGGER = LogManager.getLogger(IndexingBasics.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + IndexSettings settings = new IndexSettings.Builder() + .numberOfShards("2") + .numberOfReplicas("1") + .build(); + TypeMapping mapping = new TypeMapping.Builder() + .properties("age", new Property.Builder().integer(new IntegerNumberProperty.Builder().build()).build()) + .build(); + CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(indexName) + .settings(settings) + .mappings(mapping) + .build(); + client.indices().create(createIndexRequest); + } + + LOGGER.info("Indexing documents"); + IndexData indexData = new IndexData("Document 1", "Text for document 1"); + IndexRequest indexRequest = new IndexRequest.Builder().index(indexName) + .id("1") + .document(indexData) + .build(); + client.index(indexRequest); + + indexData = new IndexData("Document 2", "Text for document 2"); + indexRequest = new IndexRequest.Builder().index(indexName).id("2").document(indexData).build(); + client.index(indexRequest); + + // wait for the document to index + Thread.sleep(3000); + + SearchResponse searchResponse = client.search(s -> s.index(indexName), IndexData.class); + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + LOGGER.info("Adding a new mapping to index {}", indexName); + PutMappingRequest.Builder mappingsRequestBuilder = new PutMappingRequest.Builder().index(indexName) + .source( + new SourceField.Builder() + .enabled(true) + .build()) + .routing( + new RoutingField.Builder() + .required(false) + .build()) + .dynamic(DynamicMapping.Strict) + .meta("key", JsonData.of("key value")) + .fieldNames(new FieldNamesField.Builder().enabled(false).build()) + .dateDetection(false) + .dynamicDateFormats(new ArrayList<>()) + .dynamicTemplates(new ArrayList<>()) + .numericDetection(false); + client.indices().putMapping(mappingsRequestBuilder.build()); + + GetMappingRequest mappingsRequest = new GetMappingRequest.Builder().index(indexName).build(); + GetMappingResponse getMappingResponse = client.indices().getMapping(mappingsRequest); + LOGGER.info("Mappings {} found for index {}", getMappingResponse.result().get(indexName).mappings(), indexName); + + LOGGER.info("Deleting document with id 1"); + client.delete(d -> d.index(indexName).id("1")); + + LOGGER.info("Deleting index {}", indexName); + DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest.Builder().index(indexName).build(); + client.indices().delete(deleteIndexRequest); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/Main.java b/samples/src/main/java/org/opensearch/client/samples/Main.java new file mode 100644 index 0000000000..f6f9e4ac01 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/Main.java @@ -0,0 +1,39 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class Main { + private static final Logger LOGGER = LogManager.getLogger(Main.class); + + public static void main(String[] args) { + var mainClass = System.getProperty("samples.mainClass"); + if (mainClass == null || mainClass.isEmpty()) { + LOGGER.error("Please specify the main class to run with -Dsamples.mainClass=

"); + System.exit(1); + } + + if (!mainClass.startsWith("org.")) { + mainClass = Main.class.getPackageName() + "." + mainClass; + } + + LOGGER.info("Running main class: {}", mainClass); + + try { + final var clazz = Class.forName(mainClass); + final var mainMethod = clazz.getMethod("main", String[].class); + mainMethod.invoke(null, (Object) args); + } catch (Exception e) { + LOGGER.error("Failed to run main class", e); + System.exit(1); + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/PointInTime.java b/samples/src/main/java/org/opensearch/client/samples/PointInTime.java new file mode 100644 index 0000000000..55a348ef8c --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/PointInTime.java @@ -0,0 +1,81 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import java.util.Collections; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.opensearch._types.Time; +import org.opensearch.client.opensearch._types.mapping.IntegerNumberProperty; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch._types.mapping.TypeMapping; +import org.opensearch.client.opensearch.core.pit.CreatePitRequest; +import org.opensearch.client.opensearch.core.pit.CreatePitResponse; +import org.opensearch.client.opensearch.core.pit.DeletePitRequest; +import org.opensearch.client.opensearch.core.pit.DeletePitResponse; +import org.opensearch.client.opensearch.core.pit.ListAllPitResponse; +import org.opensearch.client.opensearch.indices.CreateIndexRequest; +import org.opensearch.client.opensearch.indices.DeleteIndexRequest; +import org.opensearch.client.opensearch.indices.IndexSettings; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=PointInTime + */ +public class PointInTime { + private static final Logger LOGGER = LogManager.getLogger(PointInTime.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + IndexSettings settings = new IndexSettings.Builder() + .numberOfShards("2") + .numberOfReplicas("1") + .build(); + TypeMapping mapping = new TypeMapping.Builder() + .properties("age", new Property.Builder().integer(new IntegerNumberProperty.Builder().build()).build()) + .build(); + CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder() + .index(indexName) + .settings(settings) + .mappings(mapping) + .build(); + client.indices().create(createIndexRequest); + } + + CreatePitRequest createPitRequest = new CreatePitRequest.Builder() + .targetIndexes(Collections.singletonList(indexName)) + .keepAlive(new Time.Builder().time("100m").build()).build(); + + CreatePitResponse createPitResponse = client.createPit(createPitRequest); + LOGGER.info("PIT created with id: {}", createPitResponse.pitId()); + + ListAllPitResponse listAllPitResponse = client.listAllPit(); + LOGGER.info("Found {} PITs", listAllPitResponse.pits().size()); + + DeletePitRequest deletePitRequest = new DeletePitRequest.Builder() + .pitId(Collections.singletonList(createPitResponse.pitId())).build(); + DeletePitResponse deletePitResponse = client.deletePit(deletePitRequest); + LOGGER.info("Deleting PIT: {}", deletePitResponse.pits()); + + LOGGER.info("Deleting index {}", indexName); + DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest.Builder().index(indexName).build(); + client.indices().delete(deleteIndexRequest); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/SampleClient.java b/samples/src/main/java/org/opensearch/client/samples/SampleClient.java new file mode 100644 index 0000000000..9b73d9504f --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/SampleClient.java @@ -0,0 +1,71 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import org.apache.hc.client5.http.auth.AuthScope; +import org.apache.hc.client5.http.auth.UsernamePasswordCredentials; +import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider; +import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder; +import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder; +import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.ssl.SSLContextBuilder; +import org.opensearch.client.json.jackson.JacksonJsonpMapper; +import org.opensearch.client.opensearch.OpenSearchClient; +import org.opensearch.client.transport.httpclient5.ApacheHttpClient5TransportBuilder; + +public class SampleClient { + public static OpenSearchClient create() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException { + var env = System.getenv(); + var https = Boolean.parseBoolean(env.getOrDefault("HTTPS", "true")); + var hostname = env.getOrDefault("HOST", "localhost"); + var port = Integer.parseInt(env.getOrDefault("PORT", "9200")); + var user = env.getOrDefault("USERNAME", "admin"); + var pass = env.getOrDefault("PASSWORD", "admin"); + + final var hosts = new HttpHost[]{ + new HttpHost(https ? "https" : "http", hostname, port) + }; + + final var sslContext = SSLContextBuilder.create() + .loadTrustMaterial(null, (chains, authType) -> true) + .build(); + + final var transport = ApacheHttpClient5TransportBuilder + .builder(hosts) + .setMapper(new JacksonJsonpMapper()) + .setHttpClientConfigCallback(httpClientBuilder -> { + final var credentialsProvider = new BasicCredentialsProvider(); + for (final var host : hosts) { + credentialsProvider.setCredentials( + new AuthScope(host), + new UsernamePasswordCredentials(user, pass.toCharArray())); + } + + // Disable SSL/TLS verification as our local testing clusters use self-signed certificates + final var tlsStrategy = ClientTlsStrategyBuilder.create() + .setSslContext(sslContext) + .setHostnameVerifier(NoopHostnameVerifier.INSTANCE) + .build(); + + final var connectionManager = PoolingAsyncClientConnectionManagerBuilder.create() + .setTlsStrategy(tlsStrategy) + .build(); + + return httpClientBuilder + .setDefaultCredentialsProvider(credentialsProvider) + .setConnectionManager(connectionManager); + }) + .build(); + return new OpenSearchClient(transport); + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/Search.java b/samples/src/main/java/org/opensearch/client/samples/Search.java new file mode 100644 index 0000000000..ccc1acb679 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/Search.java @@ -0,0 +1,315 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.opensearch.OpenSearchClient; +import org.opensearch.client.opensearch._types.FieldValue; +import org.opensearch.client.opensearch._types.Refresh; +import org.opensearch.client.opensearch._types.aggregations.Aggregate; +import org.opensearch.client.opensearch._types.aggregations.Aggregation; +import org.opensearch.client.opensearch._types.analysis.Analyzer; +import org.opensearch.client.opensearch._types.analysis.CustomAnalyzer; +import org.opensearch.client.opensearch._types.analysis.ShingleTokenFilter; +import org.opensearch.client.opensearch._types.analysis.TokenFilter; +import org.opensearch.client.opensearch._types.analysis.TokenFilterDefinition; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch._types.mapping.TextProperty; +import org.opensearch.client.opensearch._types.mapping.TypeMapping; +import org.opensearch.client.opensearch.core.IndexRequest; +import org.opensearch.client.opensearch.core.SearchRequest; +import org.opensearch.client.opensearch.core.SearchResponse; +import org.opensearch.client.opensearch.core.search.CompletionSuggester; +import org.opensearch.client.opensearch.core.search.FieldSuggester; +import org.opensearch.client.opensearch.core.search.FieldSuggesterBuilders; +import org.opensearch.client.opensearch.core.search.PhraseSuggester; +import org.opensearch.client.opensearch.core.search.Suggester; +import org.opensearch.client.opensearch.core.search.TermSuggester; +import org.opensearch.client.opensearch.indices.CreateIndexRequest; +import org.opensearch.client.opensearch.indices.DeleteIndexRequest; +import org.opensearch.client.opensearch.indices.IndexSettings; +import org.opensearch.client.opensearch.indices.IndexSettingsAnalysis; +import org.opensearch.client.samples.util.AppData; +import org.opensearch.client.samples.util.IndexData; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=Search + */ +public class Search { + private static final Logger LOGGER = LogManager.getLogger(IndexingBasics.class); + + private static OpenSearchClient client; + + public static void main(String[] args) { + try { + client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(indexName).build(); + client.indices().create(createIndexRequest); + } + + LOGGER.info("Indexing documents"); + IndexData indexData = new IndexData("Document 1", "Text for document 1"); + IndexRequest indexRequest = new IndexRequest.Builder().index(indexName) + .id("1") + .document(indexData) + .build(); + client.index(indexRequest); + + indexData = new IndexData("Document 2", "Text for document 2"); + indexRequest = new IndexRequest.Builder().index(indexName).id("2").document(indexData).build(); + client.index(indexRequest); + + // wait for the document to index + Thread.sleep(3000); + + SearchResponse searchResponse = client.search(s -> s.index(indexName), IndexData.class); + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + SearchRequest searchRequest = new SearchRequest.Builder().query(q -> q.match(m -> m.field("text") + .query(FieldValue.of("Text for document 2")))) + .build(); + + searchResponse = client.search(searchRequest, IndexData.class); + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + searchRequest = new SearchRequest.Builder().query(q -> q.match(m -> m.field("title") + .query(FieldValue.of("Document 1")))) + .aggregations("titles", + new Aggregation.Builder().terms(t -> t.field("title.keyword")) + .build()) + .build(); + + searchResponse = client.search(searchRequest, IndexData.class); + for (Map.Entry entry : searchResponse.aggregations().entrySet()) { + LOGGER.info("Agg - {}", entry.getKey()); + entry.getValue().sterms().buckets().array().forEach(b -> LOGGER.info("{} : {}", b.key(), b.docCount())); + } + + LOGGER.info("Deleting index {}", indexName); + DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest.Builder().index(indexName).build(); + client.indices().delete(deleteIndexRequest); + + searchWithCompletionSuggester(); + searchWithTermSuggester(); + searchWithPhraseSuggester(); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static void searchWithCompletionSuggester() { + try { + var index = "completion-suggester"; + Property intValueProp = new Property.Builder() + .long_(v -> v) + .build(); + Property msgCompletionProp = new Property.Builder() + .completion(c -> c) + .build(); + client.indices().create(c -> c + .index(index) + .mappings(m -> m + .properties("intValue", intValueProp) + .properties("msg", msgCompletionProp))); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("foobar"); + + client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + String suggesterName = "msgSuggester"; + + CompletionSuggester completionSuggester = FieldSuggesterBuilders.completion() + .field("msg") + .size(1) + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder().prefix("foo") + .completion(completionSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse searchResponse = client.search(searchRequest, AppData.class); + LOGGER.info("Suggester response size {}", searchResponse.suggest().get(suggesterName).size()); + + client.indices().delete(new DeleteIndexRequest.Builder().index(index).build()); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static void searchWithTermSuggester() { + try { + String index = "term-suggester"; + + // term suggester does not require a special mapping + client.indices().create(c -> c + .index(index)); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("foo"); + + client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("foobar"); + + client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + String suggesterName = "msgSuggester"; + + TermSuggester termSuggester = FieldSuggesterBuilders.term() + .field("msg") + .size(1) + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("fool") + .term(termSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse searchResponse = client.search(searchRequest, AppData.class); + LOGGER.info("Suggester response size {}", searchResponse.suggest().get(suggesterName).size()); + + client.indices().delete(new DeleteIndexRequest.Builder().index(index).build()); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static void searchWithPhraseSuggester() { + try { + String index = "test-phrase-suggester"; + + ShingleTokenFilter shingleTokenFilter = new ShingleTokenFilter.Builder().minShingleSize("2") + .maxShingleSize("3") + .build(); + + Analyzer analyzer = new Analyzer.Builder() + .custom(new CustomAnalyzer.Builder().tokenizer("standard") + .filter(Arrays.asList("lowercase", "shingle")).build()) + .build(); + + TokenFilter tokenFilter = new TokenFilter.Builder() + .definition(new TokenFilterDefinition.Builder() + .shingle(shingleTokenFilter).build()) + .build(); + + IndexSettingsAnalysis indexSettingsAnalysis = new IndexSettingsAnalysis.Builder() + .analyzer("trigram", analyzer) + .filter("shingle", tokenFilter) + .build(); + + IndexSettings settings = new IndexSettings.Builder().analysis(indexSettingsAnalysis).build(); + + TypeMapping mapping = new TypeMapping.Builder().properties("msg", new Property.Builder() + .text(new TextProperty.Builder().fields("trigram", new Property.Builder() + .text(new TextProperty.Builder().analyzer("trigram").build()) + .build()).build()) + .build()).build(); + + client.indices().create(c -> c + .index(index) + .settings(settings) + .mappings(mapping)); + + AppData appData = new AppData(); + appData.setIntValue(1337); + appData.setMsg("Design Patterns"); + + client.index(b -> b + .index(index) + .id("1") + .document(appData) + .refresh(Refresh.True)); + + appData.setIntValue(1338); + appData.setMsg("Software Architecture Patterns Explained"); + + client.index(b -> b + .index(index) + .id("2") + .document(appData) + .refresh(Refresh.True)); + + String suggesterName = "msgSuggester"; + + PhraseSuggester phraseSuggester = FieldSuggesterBuilders.phrase() + .field("msg.trigram") + .build(); + FieldSuggester fieldSuggester = new FieldSuggester.Builder().text("design paterns") + .phrase(phraseSuggester) + .build(); + Suggester suggester = new Suggester.Builder() + .suggesters(Collections.singletonMap(suggesterName, fieldSuggester)) + .build(); + SearchRequest searchRequest = new SearchRequest.Builder() + .index(index) + .suggest(suggester) + .build(); + + SearchResponse searchResponse = client.search(searchRequest, AppData.class); + LOGGER.info("Suggester response size {}", searchResponse.suggest().get(suggesterName).size()); + + client.indices().delete(new DeleteIndexRequest.Builder().index(index).build()); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/knn/KnnBasics.java b/samples/src/main/java/org/opensearch/client/samples/knn/KnnBasics.java new file mode 100644 index 0000000000..1ac93a2723 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/knn/KnnBasics.java @@ -0,0 +1,113 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.knn; + +import java.util.Arrays; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.opensearch.core.BulkRequest; +import org.opensearch.client.samples.SampleClient; +import org.opensearch.client.samples.util.RandUtil; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=knn.KnnBasics + */ +public class KnnBasics { + private static final Logger LOGGER = LogManager.getLogger(KnnBasics.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + final var dimensions = 5; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + client.indices().create(r -> r + .index(indexName) + .settings(s -> s.knn(true)) + .mappings(m -> m + .properties("values", p -> p + .knnVector(k -> k.dimension(dimensions))))); + } + + final var nVectors = 10; + var bulkRequest = new BulkRequest.Builder(); + for (var i = 0; i < nVectors; ++i) { + var id = Integer.toString(i); + var doc = Doc.rand(dimensions); + bulkRequest.operations(b -> b + .index(o -> o + .index(indexName) + .id(id) + .document(doc))); + } + + LOGGER.info("Indexing {} vectors", nVectors); + client.bulk(bulkRequest.build()); + + LOGGER.info("Waiting for indexing to finish"); + client.indices().refresh(i -> i.index(indexName)); + + final var searchVector = RandUtil.rand2SfArray(dimensions); + LOGGER.info("Searching for vector {}", searchVector); + + var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .knn(k -> k + .field("values") + .vector(searchVector) + .k(3))), + Doc.class); + + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + LOGGER.info("Deleting index {}", indexName); + client.indices().delete(r -> r.index(indexName)); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static class Doc { + private float[] values; + + public Doc() {} + + public Doc(float[] values) { + this.values = values; + } + + public static Doc rand(int dimensions) { + return new Doc(RandUtil.rand2SfArray(dimensions)); + } + + public float[] getValues() { + return values; + } + + public void setValues(float[] values) { + this.values = values; + } + + @Override + public String toString() { + return "{" + + "values=" + Arrays.toString(values) + + '}'; + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/knn/KnnBooleanFilter.java b/samples/src/main/java/org/opensearch/client/samples/knn/KnnBooleanFilter.java new file mode 100644 index 0000000000..47f637a8d0 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/knn/KnnBooleanFilter.java @@ -0,0 +1,159 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.knn; + +import java.util.Arrays; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.opensearch.core.BulkRequest; +import org.opensearch.client.samples.SampleClient; +import org.opensearch.client.samples.util.RandUtil; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=knn.KnnBooleanFilter + */ +public class KnnBooleanFilter { + private static final Logger LOGGER = LogManager.getLogger(KnnBooleanFilter.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + final var dimensions = 5; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + client.indices().create(r -> r + .index(indexName) + .settings(s -> s.knn(true)) + .mappings(m -> m + .properties("values", p -> p + .knnVector(k -> k.dimension(dimensions))))); + } + + final var nVectors = 3000; + final var genres = new String[] {"fiction", "drama", "romance"}; + var bulkRequest = new BulkRequest.Builder(); + for (var i = 0; i < nVectors; ++i) { + var id = Integer.toString(i); + var doc = Doc.rand(dimensions, genres); + bulkRequest.operations(b -> b + .index(o -> o + .index(indexName) + .id(id) + .document(doc))); + } + + LOGGER.info("Indexing {} vectors", nVectors); + client.bulk(bulkRequest.build()); + + LOGGER.info("Waiting for indexing to finish"); + client.indices().refresh(i -> i.index(indexName)); + + final var searchGenre = RandUtil.choice(genres); + final var searchVector = RandUtil.rand2SfArray(dimensions); + LOGGER.info("Searching for vector {} with the '{}' genre", searchVector, searchGenre); + + var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .bool(b -> b + .filter(f -> f + .bool(b2 -> b2 + .must(m -> m + .term(t -> t + .field("metadata.genre") + .value(v -> v.stringValue(searchGenre)))))) + .must(m -> m + .knn(k -> k + .field("values") + .vector(searchVector) + .k(5))))), + Doc.class); + + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + LOGGER.info("Deleting index {}", indexName); + client.indices().delete(r -> r.index(indexName)); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static class Doc { + private float[] values; + private Metadata metadata; + + public Doc() {} + + public Doc(float[] values, Metadata metadata) { + this.values = values; + this.metadata = metadata; + } + + public static Doc rand(int dimensions, String[] genres) { + return new Doc(RandUtil.rand2SfArray(dimensions), new Metadata(RandUtil.choice(genres))); + } + + public float[] getValues() { + return values; + } + + public void setValues(float[] values) { + this.values = values; + } + + public Metadata getMetadata() { + return metadata; + } + + public void setMetadata(Metadata metadata) { + this.metadata = metadata; + } + + @Override + public String toString() { + return "{" + + "values=" + Arrays.toString(values) + + ", metadata=" + metadata + + '}'; + } + } + + private static class Metadata { + private String genre; + + private Metadata() {} + + private Metadata(String genre) { + this.genre = genre; + } + + public String getGenre() { + return genre; + } + + public void setGenre(String genre) { + this.genre = genre; + } + + @Override + public String toString() { + return "{" + + "genre=" + genre + + '}'; + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/knn/KnnEfficientFilter.java b/samples/src/main/java/org/opensearch/client/samples/knn/KnnEfficientFilter.java new file mode 100644 index 0000000000..6f512a0f1d --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/knn/KnnEfficientFilter.java @@ -0,0 +1,174 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.knn; + +import java.util.Arrays; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch._types.FieldValue; +import org.opensearch.client.opensearch._types.query_dsl.Query; +import org.opensearch.client.opensearch.core.BulkRequest; +import org.opensearch.client.samples.SampleClient; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=knn.KnnEfficientFilter + */ +public class KnnEfficientFilter { + private static final Logger LOGGER = LogManager.getLogger(KnnEfficientFilter.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "hotels-index"; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + client.indices().create(r -> r + .index(indexName) + .settings(s -> s + .knn(true) + .knnAlgoParamEfSearch(100) + .numberOfShards("1") + .numberOfReplicas("0")) + .mappings(m -> m + .properties("location", p -> p + .knnVector(k -> k + .dimension(2) + .method(v -> v + .name("hnsw") + .spaceType("l2") + .engine("lucene") + .parameters("ef_construction", JsonData.of(100)) + .parameters("m", JsonData.of(16))))))); + } + + final var hotels = new Hotel[] { + new Hotel(5.2f, 4.f, true, 5), + new Hotel(5.2f, 3.9f, false, 4), + new Hotel(4.9f, 3.4f, true, 9), + new Hotel(4.2f, 4.6f, false, 6), + new Hotel(3.3f, 4.5f, true, 8), + new Hotel(6.4f, 3.4f, true, 9), + new Hotel(4.2f, 6.2f, true, 5), + new Hotel(2.4f, 4.0f, true, 8), + new Hotel(1.4f, 3.2f, false, 5), + new Hotel(7.0f, 9.9f, true, 9), + new Hotel(3.0f, 2.3f, false, 6), + new Hotel(5.0f, 1.0f, true, 3), + }; + var bulkRequest = new BulkRequest.Builder(); + for (var i = 0; i < hotels.length; ++i) { + final var id = Integer.toString(i + 1); + final var hotel = hotels[i]; + LOGGER.info("Indexing hotel {} with id {}", hotel, id); + bulkRequest.operations(b -> b + .index(o -> o + .index(indexName) + .id(id) + .document(hotel))); + } + + LOGGER.info("Indexing {} documents", hotels.length); + client.bulk(bulkRequest.build()); + + LOGGER.info("Waiting for indexing to finish"); + client.indices().refresh(i -> i.index(indexName)); + + final var searchLocation = new float[]{ 5.0f, 4.0f }; + final var searchRatingMin = 8; + final var searchRatingMax = 10; + final var searchParking = true; + LOGGER.info( + "Searching for hotel near {} with rating >={},<={} and parking={}", + searchLocation, searchRatingMin, searchRatingMax, searchParking); + + var searchResponse = client.search(s -> s + .index(indexName) + .size(3) + .query(q -> q + .knn(k -> k + .field("location") + .vector(searchLocation) + .k(3) + .filter(Query.of(f -> f + .bool(b -> b + .must(m -> m + .range(r -> r + .field("rating") + .gte(JsonData.of(searchRatingMin)) + .lte(JsonData.of(searchRatingMax)))) + .must(m -> m + .term(t -> t + .field("parking") + .value(FieldValue.of(searchParking))))))))), + Hotel.class); + + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + LOGGER.info("Deleting index {}", indexName); + client.indices().delete(r -> r.index(indexName)); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static class Hotel { + private float[] location; + private boolean parking; + private int rating; + + public Hotel() {} + + public Hotel(float locX, float locY, boolean parking, int rating) { + this.location = new float[] {locX, locY}; + this.parking = parking; + this.rating = rating; + } + + public float[] getLocation() { + return location; + } + + public void setLocation(float[] location) { + this.location = location; + } + + public boolean isParking() { + return parking; + } + + public void setParking(boolean parking) { + this.parking = parking; + } + + public int getRating() { + return rating; + } + + public void setRating(int rating) { + this.rating = rating; + } + + @Override + public String toString() { + return "{" + + "location=" + Arrays.toString(location) + + ", parking=" + parking + + ", rating=" + rating + + '}'; + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/knn/KnnPainlessScript.java b/samples/src/main/java/org/opensearch/client/samples/knn/KnnPainlessScript.java new file mode 100644 index 0000000000..3ff803138a --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/knn/KnnPainlessScript.java @@ -0,0 +1,117 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.knn; + +import java.util.Arrays; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch.core.BulkRequest; +import org.opensearch.client.samples.SampleClient; +import org.opensearch.client.samples.util.RandUtil; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=knn.KnnPainlessScript + */ +public class KnnPainlessScript { + private static final Logger LOGGER = LogManager.getLogger(KnnPainlessScript.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + final var dimensions = 5; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + client.indices().create(r -> r + .index(indexName) + .settings(s -> s.knn(true)) + .mappings(m -> m + .properties("values", p -> p + .knnVector(k -> k.dimension(dimensions))))); + } + + final var nVectors = 10; + var bulkRequest = new BulkRequest.Builder(); + for (var i = 0; i < nVectors; ++i) { + var id = Integer.toString(i); + var doc = Doc.rand(dimensions); + bulkRequest.operations(b -> b + .index(o -> o + .index(indexName) + .id(id) + .document(doc))); + } + + LOGGER.info("Indexing {} vectors", nVectors); + client.bulk(bulkRequest.build()); + + LOGGER.info("Waiting for indexing to finish"); + client.indices().refresh(i -> i.index(indexName)); + + final var searchVector = RandUtil.rand2SfArray(dimensions); + LOGGER.info("Searching for vector {}", searchVector); + + var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .scriptScore(ss -> ss + .query(qq -> qq.matchAll(m -> m)) + .script(sss -> sss + .inline(i -> i + .source("1.0 + cosineSimilarity(params.query_value, doc[params.field])") + .params("field", JsonData.of("values")) + .params("query_value", JsonData.of(searchVector)))))), + Doc.class); + + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + LOGGER.info("Deleting index {}", indexName); + client.indices().delete(r -> r.index(indexName)); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static class Doc { + private float[] values; + + public Doc() {} + + public Doc(float[] values) { + this.values = values; + } + + public static Doc rand(int dimensions) { + return new Doc(RandUtil.rand2SfArray(dimensions)); + } + + public float[] getValues() { + return values; + } + + public void setValues(float[] values) { + this.values = values; + } + + @Override + public String toString() { + return "{" + + "values=" + Arrays.toString(values) + + '}'; + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/knn/KnnScriptScore.java b/samples/src/main/java/org/opensearch/client/samples/knn/KnnScriptScore.java new file mode 100644 index 0000000000..0ee46e4fc0 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/knn/KnnScriptScore.java @@ -0,0 +1,119 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.knn; + +import java.util.Arrays; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch.core.BulkRequest; +import org.opensearch.client.samples.SampleClient; +import org.opensearch.client.samples.util.RandUtil; + +/** + * Run with: ./gradlew :samples:run -Dsamples.mainClass=knn.KnnScriptScore + */ +public class KnnScriptScore { + private static final Logger LOGGER = LogManager.getLogger(KnnScriptScore.class); + + public static void main(String[] args) { + try { + var client = SampleClient.create(); + + var version = client.info().version(); + LOGGER.info("Server: {}@{}", version.distribution(), version.number()); + + final var indexName = "my-index"; + final var dimensions = 5; + + if (!client.indices().exists(r -> r.index(indexName)).value()) { + LOGGER.info("Creating index {}", indexName); + client.indices().create(r -> r + .index(indexName) + .settings(s -> s.knn(true)) + .mappings(m -> m + .properties("values", p -> p + .knnVector(k -> k.dimension(dimensions))))); + } + + final var nVectors = 10; + var bulkRequest = new BulkRequest.Builder(); + for (var i = 0; i < nVectors; ++i) { + var id = Integer.toString(i); + var doc = Doc.rand(dimensions); + bulkRequest.operations(b -> b + .index(o -> o + .index(indexName) + .id(id) + .document(doc))); + } + + LOGGER.info("Indexing {} vectors", nVectors); + client.bulk(bulkRequest.build()); + + LOGGER.info("Waiting for indexing to finish"); + client.indices().refresh(i -> i.index(indexName)); + + final var searchVector = RandUtil.rand2SfArray(dimensions); + LOGGER.info("Searching for vector {}", searchVector); + + var searchResponse = client.search(s -> s + .index(indexName) + .query(q -> q + .scriptScore(ss -> ss + .query(qq -> qq.matchAll(m -> m)) + .script(sss -> sss + .inline(i -> i + .source("knn_score") + .lang("knn") + .params("field", JsonData.of("values")) + .params("query_value", JsonData.of(searchVector)) + .params("space_type", JsonData.of("cosinesimil")))))), + Doc.class); + + for (var hit : searchResponse.hits().hits()) { + LOGGER.info("Found {} with score {}", hit.source(), hit.score()); + } + + LOGGER.info("Deleting index {}", indexName); + client.indices().delete(r -> r.index(indexName)); + } catch (Exception e) { + LOGGER.error("Unexpected exception", e); + } + } + + public static class Doc { + private float[] values; + + public Doc() {} + + public Doc(float[] values) { + this.values = values; + } + + public static Doc rand(int dimensions) { + return new Doc(RandUtil.rand2SfArray(dimensions)); + } + + public float[] getValues() { + return values; + } + + public void setValues(float[] values) { + this.values = values; + } + + @Override + public String toString() { + return "{" + + "values=" + Arrays.toString(values) + + '}'; + } + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/util/AppData.java b/samples/src/main/java/org/opensearch/client/samples/util/AppData.java new file mode 100644 index 0000000000..3b6968722a --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/util/AppData.java @@ -0,0 +1,30 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.util; + +public class AppData { + private int intValue; + private String msg; + + public int getIntValue() { + return intValue; + } + + public void setIntValue(int intValue) { + this.intValue = intValue; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/util/IndexData.java b/samples/src/main/java/org/opensearch/client/samples/util/IndexData.java new file mode 100644 index 0000000000..759f03be8f --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/util/IndexData.java @@ -0,0 +1,43 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.util; + +public class IndexData { + private String title; + private String text; + + public IndexData() { + } + + public IndexData(String title, String text) { + this.title = title; + this.text = text; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + @Override + public String toString() { + return String.format("IndexData{title='%s', text='%s'}", title, text); + } +} diff --git a/samples/src/main/java/org/opensearch/client/samples/util/RandUtil.java b/samples/src/main/java/org/opensearch/client/samples/util/RandUtil.java new file mode 100644 index 0000000000..fbc2249621 --- /dev/null +++ b/samples/src/main/java/org/opensearch/client/samples/util/RandUtil.java @@ -0,0 +1,23 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.samples.util; + +public class RandUtil { + public static float[] rand2SfArray(int n) { + var arr = new float[n]; + for (var i = 0; i < n; ++i) { + arr[i] = Math.round(Math.random() * 100.0) / 100.0f; + } + return arr; + } + + public static T choice(T[] arr) { + return arr[(int)Math.floor(Math.random() * arr.length)]; + } +} diff --git a/samples/src/main/resources/log4j2.xml b/samples/src/main/resources/log4j2.xml new file mode 100644 index 0000000000..a388d16da0 --- /dev/null +++ b/samples/src/main/resources/log4j2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 2f1f60b93b..6d462291d4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -32,3 +32,4 @@ rootProject.name = "opensearch-java" include("java-client") +include("samples") \ No newline at end of file From 4b47ab04e4edc48c07b23e7f523a9183f2b0013a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:28:18 -0700 Subject: [PATCH 081/123] Add support for wrapper queries (#630) (#633) * add wrapperquery * add changelog entry * add test --------- (cherry picked from commit 626e99c0dd711851487829f6755de47993fef6c5) Signed-off-by: Andrew Parmet Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- CHANGELOG.md | 3 +- .../opensearch/_types/query_dsl/Query.java | 2 + .../_types/query_dsl/QueryBuilders.java | 8 + .../_types/query_dsl/WrapperQuery.java | 144 ++++++++++++++++++ .../opensearch/model/BehaviorsTest.java | 14 ++ 5 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WrapperQuery.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 77981d5a68..9f8c80de4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - Added support for "smartcn" analyzer ([#605](https://github.com/opensearch-project/opensearch-java/pull/605)) - Added support for "cjk" analyzer ([#604](https://github.com/opensearch-project/opensearch-java/pull/604)) +- Added support for wrapper queries ([#630](https://github.com/opensearch-project/opensearch-java/pull/630)) ### Dependencies - Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 @@ -168,4 +169,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [2.5.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.4.0...v2.5.0 [2.4.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.3.0...v2.4.0 [2.3.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.2.0...v2.3.0 -[2.2.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.1.0...v2.2.0 \ No newline at end of file +[2.2.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.1.0...v2.2.0 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java index abd141d078..280637acf7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java @@ -169,6 +169,8 @@ public enum Kind implements JsonEnum { Wildcard("wildcard"), + Wrapper("wrapper"), + Type("type"), ; diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java index 0deebb5343..90227a52cd 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java @@ -446,6 +446,14 @@ public static WildcardQuery.Builder wildcard() { return new WildcardQuery.Builder(); } + /** + * Creates a builder for the {@link WrapperQuery wrapper} {@code Query} + * variant. + */ + public static WrapperQuery.Builder wrapper() { + return new WrapperQuery.Builder(); + } + /** * Creates a builder for the {@link TypeQuery type} {@code Query} variant. */ diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WrapperQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WrapperQuery.java new file mode 100644 index 0000000000..391278b080 --- /dev/null +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/WrapperQuery.java @@ -0,0 +1,144 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.client.opensearch._types.query_dsl; + +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.function.Function; + +// typedef: _types.query_dsl.WrapperQuery + + +@JsonpDeserializable +public class WrapperQuery extends QueryBase implements QueryVariant { + private final String query; + + // --------------------------------------------------------------------------------------------- + + private WrapperQuery(Builder builder) { + super(builder); + + this.query = ApiTypeHelper.requireNonNull(builder.query, this, "query"); + + } + + public static WrapperQuery of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Query variant kind. + */ + @Override + public Query.Kind _queryKind() { + return Query.Kind.Wrapper; + } + + /** + * Required - A base64 encoded query. The binary data format can be any of JSON, + * YAML, CBOR or SMILE encodings + *

+ * API name: {@code query} + */ + public final String query() { + return this.query; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("query"); + generator.write(this.query); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link WrapperQuery}. + */ + + public static class Builder extends QueryBase.AbstractBuilder implements ObjectBuilder { + private String query; + + /** + * Required - A base64 encoded query. The binary data format can be any of JSON, + * YAML, CBOR or SMILE encodings + *

+ * API name: {@code query} + */ + public final Builder query(String value) { + this.query = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link WrapperQuery}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public WrapperQuery build() { + _checkSingleUse(); + + return new WrapperQuery(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link WrapperQuery} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + WrapperQuery::setupWrapperQueryDeserializer); + + protected static void setupWrapperQueryDeserializer(ObjectDeserializer op) { + QueryBase.setupQueryBaseDeserializer(op); + op.add(Builder::query, JsonpDeserializer.stringDeserializer(), "query"); + + } + +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java index d3fba08179..300eeef743 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java @@ -43,6 +43,7 @@ import org.opensearch.client.opensearch._types.query_dsl.ShapeQuery; import org.opensearch.client.opensearch._types.query_dsl.TermQuery; import org.opensearch.client.json.JsonData; +import org.opensearch.client.opensearch._types.query_dsl.WrapperQuery; import org.opensearch.client.util.MapBuilder; import org.junit.Test; @@ -84,6 +85,19 @@ public void testAdditionalPropertyOnClass() { System.out.println(toJson(q)); } + @Test + public void testWrapperQuery() { + WrapperQuery q = new WrapperQuery.Builder() + .query("encoded_query") + .build(); + + q = checkJsonRoundtrip(q, + "{\"query\":\"encoded_query\"}" + ); + + assertEquals("encoded_query", q.query()); + } + @Test public void testAdditionalPropertyOnContainer() { // Regular variant From 2fbe40366fb574ce6e21e2ff7f23c43dc9790aed Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 22 Sep 2023 11:23:32 -0700 Subject: [PATCH 082/123] Moving "software.amazon.awssdk" dependencies to the compileOnly scope. (#628) (#634) * move "software.amazon.awssdk" dependencies to the compileOnly scope. * PR feedback * PR feedback --------- Signed-off-by: Dmitry Kaukov Signed-off-by: Vacha Shah Co-authored-by: Dmitry Kaukov --- CHANGELOG.md | 1 + java-client/build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f8c80de4b..6843daa0fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `io.github.classgraph:classgraph` from 4.8.160 to 4.8.161 ### Changed +- Moved "software.amazon.awssdk" dependencies to the compileOnly scope. ([#628](https://github.com/opensearch-project/opensearch-java/pull/628)) ### Deprecated diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 68b8ace30d..ba555bf000 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -180,8 +180,8 @@ dependencies { implementation("org.apache.httpcomponents.core5", "httpcore5", "5.1.5") // For AwsSdk2Transport - "awsSdk2SupportImplementation"("software.amazon.awssdk","sdk-core","[2.15,3.0)") - "awsSdk2SupportImplementation"("software.amazon.awssdk","auth","[2.15,3.0)") + "awsSdk2SupportCompileOnly"("software.amazon.awssdk","sdk-core","[2.15,3.0)") + "awsSdk2SupportCompileOnly"("software.amazon.awssdk","auth","[2.15,3.0)") testImplementation("software.amazon.awssdk","sdk-core","[2.15,3.0)") testImplementation("software.amazon.awssdk","auth","[2.15,3.0)") testImplementation("software.amazon.awssdk","aws-crt-client","[2.15,3.0)") From d498c65f527e4782e1aad67f1cfe39d871bc78d7 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:01:11 -0400 Subject: [PATCH 083/123] Add newer versions of server to compatibility matrix (#635) (#643) * Add newer versions of server to compatibility matrix * Fixing tests with >=2.9.0 and adding 2.10.0 to compatibility matrix --------- (cherry picked from commit 063db02366dd106f5d8327b33334bf4dd9c6be4f) Signed-off-by: Vacha Shah Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .github/workflows/test-integration.yml | 5 ++++- COMPATIBILITY.md | 10 ++-------- .../integTest/OpenSearchJavaClientTestCase.java | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 2aa32ecb2d..2961130bdf 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -12,7 +12,7 @@ jobs: - { opensearch_version: 1.0.1, java: 11 } - { opensearch_version: 1.1.0, java: 11 } - { opensearch_version: 1.2.4, java: 11 } - - { opensearch_version: 1.3.9, java: 11 } + - { opensearch_version: 1.3.13, java: 11 } - { opensearch_version: 2.0.1, java: 11 } - { opensearch_version: 2.1.0, java: 11 } - { opensearch_version: 2.2.1, java: 11 } @@ -21,6 +21,9 @@ jobs: - { opensearch_version: 2.5.0, java: 11 } - { opensearch_version: 2.6.0, java: 11 } - { opensearch_version: 2.7.0, java: 11 } + - { opensearch_version: 2.8.0, java: 11 } + - { opensearch_version: 2.9.0, java: 11 } + - { opensearch_version: 2.10.0, java: 11 } steps: - name: Checkout Java Client uses: actions/checkout@v3 diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 0a1ec94bc8..d528d976aa 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -7,14 +7,8 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | Client Version | OpenSearch Version | |----------------|--------------------| -| 1.0.0 | 1.0.0-1.3.9 | -| 2.0.0 | 1.3.9-2.0.1 | -| 2.1.0 | 1.3.9-2.3.0 | -| 2.2.0 | 1.3.9-2.5.0 | -| 2.3.0 | 1.3.9-2.7.0 | -| 2.4.0 | 1.3.9-2.7.0 | -| 2.5.0 | 1.3.9-2.7.0 | -| 2.6.0 | 1.3.9-2.7.0 | +| 1.0.0 | 1.x | +| 2.x.0 | 1.3.13-2.10.0 | ## Upgrading diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java index 7cae6e2599..a5511840a7 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java @@ -39,7 +39,7 @@ import java.util.TreeSet; public abstract class OpenSearchJavaClientTestCase extends OpenSearchRestTestCase implements OpenSearchTransportSupport { - private static final List systemIndices = List.of(".opensearch-observability", ".opendistro_security"); + private static final List systemIndices = List.of(".opensearch-observability", ".opendistro_security", ".plugins-ml-config"); private static OpenSearchClient javaClient; private static OpenSearchClient adminJavaClient; From d7b3abf62c9ac7ab768bf1b7535ae17c18265f31 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Tue, 3 Oct 2023 11:50:22 -0700 Subject: [PATCH 084/123] Add script fields support for multi search request (#632) (#646) * Adding script_fields support for mseearch request with tests * Fixing logger in Search sample * Fixing build * Fixing tests --------- Signed-off-by: Vacha Shah --- CHANGELOG.md | 1 + .../core/msearch/MultisearchBody.java | 48 +++++++++++++++- .../AbstractMultiSearchRequestIT.java | 55 +++++++++++++++++++ .../org/opensearch/client/samples/Search.java | 2 +- 4 files changed, 104 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6843daa0fd..740f639b0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added support for "smartcn" analyzer ([#605](https://github.com/opensearch-project/opensearch-java/pull/605)) - Added support for "cjk" analyzer ([#604](https://github.com/opensearch-project/opensearch-java/pull/604)) - Added support for wrapper queries ([#630](https://github.com/opensearch-project/opensearch-java/pull/630)) +- Added support for "script_fields" in multi search request ([#632](https://github.com/opensearch-project/opensearch-java/pull/632)) ### Dependencies - Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java index f58b987ad2..e03538d484 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java @@ -32,6 +32,7 @@ package org.opensearch.client.opensearch.core.msearch; +import org.opensearch.client.opensearch._types.ScriptField; import org.opensearch.client.opensearch._types.SortOptions; import org.opensearch.client.opensearch._types.aggregations.Aggregation; import org.opensearch.client.opensearch._types.query_dsl.Query; @@ -96,6 +97,8 @@ public class MultisearchBody implements JsonpSerializable { @Nullable private SourceConfig source; + private final Map scriptFields; + // --------------------------------------------------------------------------------------------- private MultisearchBody(Builder builder) { @@ -113,7 +116,7 @@ private MultisearchBody(Builder builder) { this.suggest = builder.suggest; this.highlight = builder.highlight; this.source = builder.source; - + this.scriptFields = ApiTypeHelper.unmodifiable(builder.scriptFields); } public static MultisearchBody of(Function> fn) { @@ -221,6 +224,10 @@ public final SourceConfig source() { return this.source; } + public final Map scriptFields() { + return this.scriptFields; + } + /** * Serialize this object to JSON. */ @@ -316,6 +323,18 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } + if (ApiTypeHelper.isDefined(this.scriptFields)) { + generator.writeKey("script_fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.scriptFields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + } // --------------------------------------------------------------------------------------------- @@ -364,6 +383,8 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder scriptFields; + /** * API name: {@code aggregations} @@ -571,6 +592,29 @@ public final Builder source(Function map) { + this.scriptFields = _mapPutAll(this.scriptFields, map); + return this; + } + + /** + * API name: {@code script_fields} + */ + public final Builder scriptFields(String key, ScriptField value) { + this.scriptFields = _mapPut(this.scriptFields, key, value); + return this; + } + + /** + * API name: {@code script_fields} + */ + public final Builder scriptFields(String key, Function> fn) { + return scriptFields(key, fn.apply(new ScriptField.Builder()).build()); + } + /** * Builds a {@link MultisearchBody}. * @@ -609,6 +653,8 @@ protected static void setupMultisearchBodyDeserializer(ObjectDeserializer response = sendMSearchRequest(index, List.of(sortedItemsQuery)); + assertEquals(1, response.responses().size()); + var hits = response.responses().get(0).result().hits().hits(); + assertEquals(3, hits.size()); + assertNull(hits.get(0).score()); + assertNull(hits.get(1).score()); + assertNull(hits.get(2).score()); + + Map scriptFields = new HashMap<>(); + scriptFields.put("quantity", new ScriptField.Builder().script(Script.of(s -> s.inline(new InlineScript.Builder() + .lang("painless") + .source("doc['quantity'].value + params.inc") + .params("inc", JsonData.of(1)) + .build()))) + .build()); + + + RequestItem requestItem = createMSearchQueryWithScriptFields("small", scriptFields); + + MsearchResponse responseWithScriptFields = sendMSearchRequest(index, List.of(requestItem)); + var hitsWithScriptFields = responseWithScriptFields.responses().get(0).result().hits().hits(); + assertEquals(2, hitsWithScriptFields.size()); + // validating that the quantity for small items is increased by 1 + ObjectMapper mapper = new ObjectMapper(); + JsonNode node = mapper.readTree(hitsWithScriptFields.get(0).fields().get("quantity").toString()); + assertEquals(2, (int) mapper.treeToValue(node.get(0), int.class)); + + node = mapper.readTree(hitsWithScriptFields.get(1).fields().get("quantity").toString()); + assertEquals(3, (int) mapper.treeToValue(node.get(0), int.class)); + } + private void assertResponseSources(MultiSearchResponseItem response) { List> hitsWithHighlights = response.result().hits().hits(); @@ -198,6 +245,14 @@ private RequestItem createMSearchQuery(String itemSize) { return createMSearchQuery(itemSize, null, List.of()); } + private RequestItem createMSearchQueryWithScriptFields(String itemSize, Map scriptFields) { + return RequestItem.of(item -> item.header(header -> header) + .body(body -> body.query(createItemSizeSearchQuery(itemSize)) + .scriptFields(scriptFields) + ) + ); + } + private RequestItem createMSearchQueryWithHighlight(String itemSize) { return createMSearchQuery(itemSize, "size", List.of()); } diff --git a/samples/src/main/java/org/opensearch/client/samples/Search.java b/samples/src/main/java/org/opensearch/client/samples/Search.java index ccc1acb679..ea41bfc48c 100644 --- a/samples/src/main/java/org/opensearch/client/samples/Search.java +++ b/samples/src/main/java/org/opensearch/client/samples/Search.java @@ -47,7 +47,7 @@ * Run with: ./gradlew :samples:run -Dsamples.mainClass=Search */ public class Search { - private static final Logger LOGGER = LogManager.getLogger(IndexingBasics.class); + private static final Logger LOGGER = LogManager.getLogger(Search.class); private static OpenSearchClient client; From 4d074c969842d56964d91d150b031a17f6ddfbd6 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 4 Oct 2023 09:31:34 -0700 Subject: [PATCH 085/123] Fixed GetFieldMappingResponse. (#641) (#647) * Fixed GetFieldMappingResponse. * Add Changelog. * Changelog fix. * Tabs vs. spaces fix. --------- Signed-off-by: pieper Signed-off-by: Vacha Shah Co-authored-by: MikePieperSer <41434171+MikePieperSer@users.noreply.github.com> --- CHANGELOG.md | 1 + .../_types/mapping/FieldMapping.java | 27 ------- .../get_field_mapping/TypeFieldMappings.java | 47 ++++++++--- .../opensearch/experiments/ParsingTests.java | 78 ++++++++++++++++++- 4 files changed, 115 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 740f639b0c..deaab93a56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [BUG] JarHell caused by latest software.amazon.awssdk 2.20.141 ([#616](https://github.com/opensearch-project/opensearch-java/pull/616)) - Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#620](https://github.com/opensearch-project/opensearch-java/pull/620)) - Fixed CVE-2976 + added CVE checker ([#624](https://github.com/opensearch-project/opensearch-java/pull/624)) +- Fix parsing of GetFieldMappingResponse ([#641](https://github.com/opensearch-project/opensearch-java/pull/641)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java index 3ee5bbdf79..7c0b75828a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldMapping.java @@ -50,9 +50,6 @@ @JsonpDeserializable public class FieldMapping implements JsonpSerializable { - // Single key dictionary - private final String field; - private final String fullName; private final Map mapping; @@ -61,8 +58,6 @@ public class FieldMapping implements JsonpSerializable { private FieldMapping(Builder builder) { - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - this.fullName = ApiTypeHelper.requireNonNull(builder.fullName, this, "fullName"); this.mapping = ApiTypeHelper.unmodifiableRequired(builder.mapping, this, "mapping"); @@ -72,13 +67,6 @@ public static FieldMapping of(Function> fn) return fn.apply(new Builder()).build(); } - /** - * Required - The target field - */ - public final String field() { - return this.field; - } - /** * Required - API name: {@code full_name} */ @@ -103,8 +91,6 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(this.field); - generator.writeKey("full_name"); generator.write(this.fullName); @@ -120,8 +106,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } - generator.writeEnd(); - } // --------------------------------------------------------------------------------------------- @@ -131,15 +115,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String field; - - /** - * Required - The target field - */ - public final Builder field(String value) { - this.field = value; - return this; - } private String fullName; @@ -208,8 +183,6 @@ protected static void setupFieldMappingDeserializer(ObjectDeserializer mappings; // --------------------------------------------------------------------------------------------- private TypeFieldMappings(Builder builder) { - this.mappings = ApiTypeHelper.requireNonNull(builder.mappings, this, "mappings"); + this.mappings = ApiTypeHelper.unmodifiableRequired(builder.mappings, this, "mappings"); } @@ -68,7 +71,7 @@ public static TypeFieldMappings of(Function mappings() { return this.mappings; } @@ -84,7 +87,13 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("mappings"); - this.mappings.serialize(generator, mapper); + generator.writeStartObject(); + for (Map.Entry item0 : this.mappings.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); } @@ -95,21 +104,39 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private FieldMapping mappings; + private Map mappings; /** * Required - API name: {@code mappings} */ - public final Builder mappings(FieldMapping value) { + public Builder mappings(Map value) { this.mappings = value; return this; } /** - * Required - API name: {@code mappings} + * Add a key/value to {@link #mappings(Map)}, creating the map if needed. + */ + public Builder putMappings(String key, FieldMapping value) { + if (this.mappings == null) { + this.mappings = new HashMap<>(); + } + this.mappings.put(key, value); + return this; + } + + /** + * Set {@link #mappings(Map)} to a singleton map. + */ + public Builder mappings(String key, Function> fn) { + return this.mappings(Collections.singletonMap(key, fn.apply(new FieldMapping.Builder()).build())); + } + + /** + * Add a key/value to {@link #mappings(Map)}, creating the map if needed. */ - public final Builder mappings(Function> fn) { - return this.mappings(fn.apply(new FieldMapping.Builder()).build()); + public Builder putMappings(String key, Function> fn) { + return this.putMappings(key, fn.apply(new FieldMapping.Builder()).build()); } /** @@ -135,7 +162,7 @@ public TypeFieldMappings build() { protected static void setupTypeFieldMappingsDeserializer(ObjectDeserializer op) { - op.add(Builder::mappings, FieldMapping._DESERIALIZER, "mappings"); + op.add(Builder::mappings, JsonpDeserializer.stringMapDeserializer(FieldMapping._DESERIALIZER), "mappings"); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java index ccb3e4b5d3..026fe79bf1 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java @@ -33,17 +33,23 @@ package org.opensearch.client.opensearch.experiments; import java.util.List; - +import java.util.Map; import org.junit.Test; import org.opensearch.client.opensearch._types.Time; import org.opensearch.client.opensearch._types.analysis.Analyzer; import org.opensearch.client.opensearch._types.analysis.TokenFilterDefinition; import org.opensearch.client.opensearch._types.analysis.TokenizerBuilders; import org.opensearch.client.opensearch._types.analysis.TokenizerDefinition; +import org.opensearch.client.opensearch._types.mapping.FieldMapping; +import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch._types.mapping.TermVectorOption; +import org.opensearch.client.opensearch._types.mapping.TextProperty; import org.opensearch.client.opensearch.experiments.api.FooRequest; +import org.opensearch.client.opensearch.indices.GetFieldMappingResponse; import org.opensearch.client.opensearch.indices.IndexSettings; import org.opensearch.client.opensearch.indices.IndexSettingsMapping; import org.opensearch.client.opensearch.indices.Translog; +import org.opensearch.client.opensearch.indices.get_field_mapping.TypeFieldMappings; import org.opensearch.client.opensearch.model.ModelTestCase; public class ParsingTests extends ModelTestCase { @@ -173,4 +179,74 @@ public void testCjk_Analyzer() { assertEquals(analyzer.cjk().stopwords(), analyzer2.cjk().stopwords()); assertEquals(analyzer.cjk().stopwordsPath(), analyzer2.cjk().stopwordsPath()); } + + @Test + public void testFieldMappingResponse() { + final String indexName = "indexName"; + final String field1Name = "field1"; + final String field1Analyzer = "my_analyzer"; + final FieldMapping field1 = FieldMapping.of(fmb -> fmb + .fullName(field1Name) + .mapping(field1Name, pb -> pb + .text(tpb -> tpb + .store(true) + .termVector(TermVectorOption.WithPositionsOffsets) + .analyzer(field1Analyzer) + .positionIncrementGap(10)) + ) + ); + final String field3Name = "field3"; + // Build aFieldMappingResponse with several fields + final GetFieldMappingResponse response = GetFieldMappingResponse.of(b -> b + .putResult(indexName, TypeFieldMappings.of(tfmb -> tfmb + .putMappings(field1Name, field1) + .putMappings("field2", fmb -> fmb + .fullName("field2") + .mapping("field2", pb -> pb + .text(tpb -> tpb + .store(true) + .termVector(TermVectorOption.WithPositionsOffsets) + .analyzer("another_analyzer") + .positionIncrementGap(10)) + ) + ) + .putMappings(field3Name, fmb -> fmb + .fullName(field3Name) + .mapping(field3Name, pb -> pb + .text(tpb -> tpb + .store(true) + .termVector(TermVectorOption.WithPositionsOffsets) + .analyzer("this_analyzer") + .positionIncrementGap(10)) + ) + ) + ) + ) + ); + String str = toJson(response); + assertEquals("{\"indexName\":{\"mappings\":{\"field1\":{\"full_name\":\"field1\",\"mapping\"" + +":{\"field1\":{\"type\":\"text\",\"store\":true,\"analyzer\":\"my_analyzer\"," + + "\"position_increment_gap\":10,\"term_vector\":\"with_positions_offsets\"}}}," + +"\"field3\":{\"full_name\":\"field3\",\"mapping\":{\"field3\":{\"type\":\"text\",\"store\":true," + + "\"analyzer\":\"this_analyzer\",\"position_increment_gap\":10,\"term_vector\":\"with_positions_offsets\"}}}," + +"\"field2\":{\"full_name\":\"field2\",\"mapping\":{\"field2\":{\"type\":\"text\",\"store\":true," + +"\"analyzer\":\"another_analyzer\",\"position_increment_gap\":10,\"term_vector\":\"with_positions_offsets\"}}}}}}", str); + + final GetFieldMappingResponse response2 = fromJson(str, GetFieldMappingResponse._DESERIALIZER); + final TypeFieldMappings typeFieldMappings = response2.get(indexName); + assertNotNull(typeFieldMappings); + final Map mappings = typeFieldMappings.mappings(); + assertFalse(mappings.isEmpty()); + final FieldMapping field1_des = mappings.get(field1Name); + assertNotNull(field1_des); + assertEquals(field1Name, field1_des.fullName()); + final Property field1Prop = field1_des.mapping().get(field1Name); + assertNotNull(field1Prop); + final TextProperty textProperty = field1Prop.text(); + assertNotNull(textProperty); + assertEquals(field1Analyzer, textProperty.analyzer()); + + assertNotNull(mappings.get(field3Name)); + } + } From 3d2f20b6bff4a52c2ca7f54ceea6ebd860678b35 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 4 Oct 2023 12:04:14 -0700 Subject: [PATCH 086/123] Added size attribute to MultiTermsAggregation (#627) (#652) * Added size attribute to MultiTermsAggregation * Added integrationTest check if MultiTermsAggregation is supported --------- Signed-off-by: Fabian Kopatschek Signed-off-by: Vacha Shah Co-authored-by: fabiankopatschek <34305396+fabiankopatschek@users.noreply.github.com> --- CHANGELOG.md | 1 + .../aggregations/MultiTermsAggregation.java | 33 ++++++- .../AbstractAggregationRequestIT.java | 90 +++++++++++++++++++ 3 files changed, 122 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index deaab93a56..155f0234f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added support for "cjk" analyzer ([#604](https://github.com/opensearch-project/opensearch-java/pull/604)) - Added support for wrapper queries ([#630](https://github.com/opensearch-project/opensearch-java/pull/630)) - Added support for "script_fields" in multi search request ([#632](https://github.com/opensearch-project/opensearch-java/pull/632)) +- Added size attribute to MultiTermsAggregation ([#627](https://github.com/opensearch-project/opensearch-java/pull/627)) ### Dependencies - Bumps `org.ajoberstar.grgit:grgit-gradle` from 5.0.0 to 5.2.0 diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java index 7470809839..a4b58fe966 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/aggregations/MultiTermsAggregation.java @@ -43,19 +43,24 @@ import java.util.List; import java.util.function.Function; +import javax.annotation.Nullable; + // typedef: _types.aggregations.MultiTermsAggregation @JsonpDeserializable public class MultiTermsAggregation extends BucketAggregationBase implements AggregationVariant { private final List terms; + @Nullable + private final Integer size; + // --------------------------------------------------------------------------------------------- private MultiTermsAggregation(Builder builder) { super(builder); this.terms = ApiTypeHelper.unmodifiableRequired(builder.terms, this, "terms"); - + this.size = builder.size; } public static MultiTermsAggregation of(Function> fn) { @@ -77,9 +82,22 @@ public final List terms() { return this.terms; } + /** + * API name: {@code size} + */ + @Nullable + public final Integer size() { + return this.size; + } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); + if (this.size != null) { + generator.writeKey("size"); + generator.write(this.size); + + } if (ApiTypeHelper.isDefined(this.terms)) { generator.writeKey("terms"); generator.writeStartArray(); @@ -104,6 +122,9 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder { private List terms; + @Nullable + private Integer size; + /** * Required - API name: {@code terms} *

@@ -133,6 +154,14 @@ public final Builder terms(Function op) { BucketAggregationBase.setupBucketAggregationBaseDeserializer(op); + op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size"); op.add(Builder::terms, JsonpDeserializer.arrayDeserializer(MultiTermLookup._DESERIALIZER), "terms"); - } } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java index 1530024c6a..402792f90f 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java @@ -9,14 +9,18 @@ package org.opensearch.client.opensearch.integTest; import org.junit.Test; +import org.opensearch.Version; import org.opensearch.client.opensearch._types.Refresh; import org.opensearch.client.opensearch._types.aggregations.Aggregation; import org.opensearch.client.opensearch._types.aggregations.AggregationRange; import org.opensearch.client.opensearch._types.aggregations.DateRangeAggregation; import org.opensearch.client.opensearch._types.aggregations.DateRangeExpression; import org.opensearch.client.opensearch._types.aggregations.FieldDateMath; +import org.opensearch.client.opensearch._types.aggregations.MultiTermLookup; +import org.opensearch.client.opensearch._types.aggregations.MultiTermsAggregation; import org.opensearch.client.opensearch._types.aggregations.RangeAggregation; import org.opensearch.client.opensearch._types.mapping.Property; +import org.opensearch.client.opensearch.core.InfoResponse; import org.opensearch.client.opensearch.core.SearchResponse; import java.io.IOException; @@ -63,6 +67,70 @@ public void testDateRangeAggregation() throws Exception { assertEquals(2, buckets.get(2).docCount()); } + @Test + public void testMultiTermsAggregation() throws Exception { + checkIfOpenSearchSupportsMultiTermsAggregation(); + + var index = "test-multiterms-aggregation-no-size"; + createMultiTermsDocuments(index); + var searchResponse = sendAggregateRequest(index, "multiterms", getMultiTermsAggregation(null)); + var multitermsAggregations = searchResponse.aggregations().get("multiterms"); + var buckets = multitermsAggregations._get() + ._toAggregate() + .multiTerms() + .buckets() + .array(); + + assertEquals(3, buckets.size()); + assertEquals(1, buckets.get(0).docCount()); + } + + @Test + public void testMultiTermsAggregationWithSizeFewerThenBucketsSize() throws Exception { + checkIfOpenSearchSupportsMultiTermsAggregation(); + + var index = "test-multiterms-aggregation-fewer-size"; + createMultiTermsDocuments(index); + var searchResponse = sendAggregateRequest(index, "multiterms", getMultiTermsAggregation(1)); + var multitermsAggregations = searchResponse.aggregations().get("multiterms"); + var buckets = multitermsAggregations._get() + ._toAggregate() + .multiTerms() + .buckets() + .array(); + + assertEquals(1, buckets.size()); + assertEquals(1, buckets.get(0).docCount()); + } + + @Test + public void testMultiTermsAggregationWithSizeBiggerThenBucketsSize() throws Exception { + checkIfOpenSearchSupportsMultiTermsAggregation(); + + var index = "test-multiterms-aggregation-bigger-size"; + createMultiTermsDocuments(index); + var searchResponse = sendAggregateRequest(index, "multiterms", getMultiTermsAggregation(50)); + var multitermsAggregations = searchResponse.aggregations().get("multiterms"); + var buckets = multitermsAggregations._get() + ._toAggregate() + .multiTerms() + .buckets() + .array(); + + assertEquals(3, buckets.size()); + assertEquals(1, buckets.get(0).docCount()); + } + + private void checkIfOpenSearchSupportsMultiTermsAggregation() throws Exception { + InfoResponse info = javaClient().info(); + String version = info.version().number(); + if (version.contains("SNAPSHOT")) { + version = version.split("-")[0]; + } + assumeTrue("multi_terms is supported in OpenSearch 2.1.0 and later", + Version.fromString(version).onOrAfter(Version.fromString("2.1.0"))); + } + private Aggregation getExpiryDateRangeAggregation() { DateRangeAggregation expiryDateRangeAggregation = new DateRangeAggregation.Builder() .field("expDate") @@ -79,6 +147,21 @@ private Aggregation getCostValueRangeAggregation() { return new Aggregation.Builder().range(costValueRangeAggregation).build(); } + private Aggregation getMultiTermsAggregation(Integer size) { + MultiTermsAggregation.Builder multiTermsAggregationBuilder = new MultiTermsAggregation.Builder() + .terms(List.of( + MultiTermLookup.of(multiTermLookup -> multiTermLookup.field("cost")), + MultiTermLookup.of(multiTermLookup -> multiTermLookup.field("expDate")) + )); + + if(size != null) { + multiTermsAggregationBuilder = multiTermsAggregationBuilder.size(size); + } + + MultiTermsAggregation multiTermsAggregation = multiTermsAggregationBuilder.build(); + return new Aggregation.Builder().multiTerms(multiTermsAggregation).build(); + } + private SearchResponse sendAggregateRequest(String index, String key, Aggregation value) throws IOException { return javaClient().search( request -> request.index(index) @@ -131,6 +214,13 @@ private void createDateRangeDocuments(String index) throws IOException { javaClient().create(_1 -> _1.index(index).id("6").document(createProduct("oil", 50, 6)).refresh(Refresh.True)); } + private void createMultiTermsDocuments(String index) throws IOException { + createIndex(index); + javaClient().create(_1 -> _1.index(index).id("1").document(createProduct("appleA", 2, 1)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("2").document(createProduct("appleB", 2, 2)).refresh(Refresh.True)); + javaClient().create(_1 -> _1.index(index).id("3").document(createProduct("appleC", 2, 3)).refresh(Refresh.True)); + } + private void createIndex(String index) throws IOException { Property nameValueProp = new Property.Builder() .text(v -> v) From 53489bc22d1cf68c16769073566f7d9ef44c1311 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Mon, 9 Oct 2023 14:57:37 -0700 Subject: [PATCH 087/123] TermvectorsResponse fix for optionals. (#642) (#658) * TermvectorsResponse fix for optionals. * Add Changelog. * Tabs vs. spaces fix. * Version is not optional. * Changelog fix. * Period removed. --------- Signed-off-by: pieper Signed-off-by: Vacha Shah Co-authored-by: MikePieperSer <41434171+MikePieperSer@users.noreply.github.com> --- CHANGELOG.md | 1 + .../opensearch/core/termvectors/Term.java | 20 ++++++++------- .../core/termvectors/TermVector.java | 8 +++--- .../opensearch/experiments/ParsingTests.java | 25 +++++++++++++++++++ 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 155f0234f6..cb61a63a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#620](https://github.com/opensearch-project/opensearch-java/pull/620)) - Fixed CVE-2976 + added CVE checker ([#624](https://github.com/opensearch-project/opensearch-java/pull/624)) - Fix parsing of GetFieldMappingResponse ([#641](https://github.com/opensearch-project/opensearch-java/pull/641)) +- Fix TermvectorsResponse for optional fields ([#642](https://github.com/opensearch-project/opensearch-java/pull/642)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java index cb654cbeb3..d82d483a44 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/Term.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch.core.termvectors; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,10 +45,6 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _global.termvectors.Term @@ -57,7 +57,7 @@ public class Term implements JsonpSerializable { @Nullable private final Double score; - private final int termFreq; + private final Integer termFreq; private final List tokens; @@ -70,8 +70,8 @@ private Term(Builder builder) { this.docFreq = builder.docFreq; this.score = builder.score; - this.termFreq = ApiTypeHelper.requireNonNull(builder.termFreq, this, "termFreq"); - this.tokens = ApiTypeHelper.unmodifiableRequired(builder.tokens, this, "tokens"); + this.termFreq = builder.termFreq; + this.tokens = ApiTypeHelper.unmodifiable(builder.tokens); this.ttf = builder.ttf; } @@ -139,8 +139,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.score); } - generator.writeKey("term_freq"); - generator.write(this.termFreq); + if (null != this.termFreq) { + generator.writeKey("term_freq"); + generator.write(this.termFreq); + } if (ApiTypeHelper.isDefined(this.tokens)) { generator.writeKey("tokens"); diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java index 3ce0d1e1a6..26d0c006f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/termvectors/TermVector.java @@ -58,7 +58,7 @@ public class TermVector implements JsonpSerializable { private TermVector(Builder builder) { - this.fieldStatistics = ApiTypeHelper.requireNonNull(builder.fieldStatistics, this, "fieldStatistics"); + this.fieldStatistics = builder.fieldStatistics; this.terms = ApiTypeHelper.unmodifiableRequired(builder.terms, this, "terms"); } @@ -92,8 +92,10 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("field_statistics"); - this.fieldStatistics.serialize(generator, mapper); + if (null != this.fieldStatistics) { + generator.writeKey("field_statistics"); + this.fieldStatistics.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.terms)) { generator.writeKey("terms"); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java index 026fe79bf1..6e88290ed2 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/experiments/ParsingTests.java @@ -40,6 +40,7 @@ import org.opensearch.client.opensearch._types.analysis.TokenFilterDefinition; import org.opensearch.client.opensearch._types.analysis.TokenizerBuilders; import org.opensearch.client.opensearch._types.analysis.TokenizerDefinition; +import org.opensearch.client.opensearch.core.TermvectorsResponse; import org.opensearch.client.opensearch._types.mapping.FieldMapping; import org.opensearch.client.opensearch._types.mapping.Property; import org.opensearch.client.opensearch._types.mapping.TermVectorOption; @@ -248,5 +249,29 @@ public void testFieldMappingResponse() { assertNotNull(mappings.get(field3Name)); } + + @Test + public void testTermvectorsResponseOptionals() { + // Build a response without any optionals + final TermvectorsResponse response = TermvectorsResponse.of(b -> b + .index("index") + .id("id") + .version(1) + .found(true) + .took(0) + .termVectors("key1", tvb -> tvb + .terms("term1", tb -> tb + .score(0.3) + ) + ) + ); + + String str = toJson(response); + assertEquals("{\"found\":true,\"_id\":\"id\",\"_index\":\"index\"," + +"\"term_vectors\":{\"key1\":{\"terms\":{\"term1\":{\"score\":0.3}}}},\"took\":0,\"_version\":1}", str); + + final TermvectorsResponse response2 = fromJson(str, TermvectorsResponse._DESERIALIZER); + assertEquals(response.index(), response2.index()); + } } From 119cabc2a3d37fec059385b9760d804d18b3f949 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Thu, 12 Oct 2023 13:44:44 -0700 Subject: [PATCH 088/123] [Backport 2.x] Migrating from checkstyle to spotless (#648 and #651) (#661) * Migrating from checkstyle to spotless for formatting (#648) * Adding spotless for checking and fixing formatting and removing checkstyle Signed-off-by: Vacha Shah * Making build task depend on spotlessJavaCheck Signed-off-by: Vacha Shah * Removing resources and documentation related to checkstyle Signed-off-by: Vacha Shah * Running spotless for json, transport and util folders Signed-off-by: Vacha Shah * Running spotless for samples Signed-off-by: Vacha Shah * Removing commented code Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah * Fixing merge conflicts and build Signed-off-by: Vacha Shah * Enabling spotless for all modules from PR 651 Signed-off-by: Vacha Shah * Applying spotless to all the remaining files Signed-off-by: Vacha Shah --------- Signed-off-by: Vacha Shah --- .github/workflows/checkstyle.yml | 24 - CHANGELOG.md | 1 + DEVELOPER_GUIDE.md | 25 +- README.md | 1 - build.gradle.kts | 2 - buildSrc/formatterConfig.xml | 362 + config/checkstyle/checkstyle.xml | 156 - config/checkstyle/checkstyle_suppressions.xml | 44 - config/checkstyle/header.java.txt | 7 - java-client/build.gradle.kts | 26 +- .../java/org/opensearch/client/ApiClient.java | 7 +- .../client/json/AttributedJsonpMapper.java | 2 +- .../json/BuildFunctionDeserializer.java | 1 - .../client/json/DelegatingDeserializer.java | 3 +- .../client/json/DelegatingJsonParser.java | 3 +- .../client/json/ExternallyTaggedUnion.java | 93 +- .../org/opensearch/client/json/JsonData.java | 11 +- .../opensearch/client/json/JsonDataImpl.java | 6 +- .../org/opensearch/client/json/JsonEnum.java | 3 +- .../client/json/JsonpDeserializable.java | 2 +- .../client/json/JsonpDeserializer.java | 12 +- .../client/json/JsonpDeserializerBase.java | 218 +- .../client/json/JsonpMapperBase.java | 5 +- .../opensearch/client/json/JsonpUtils.java | 22 +- .../client/json/LookAheadJsonParser.java | 1 - .../client/json/NamedDeserializer.java | 1 - .../json/ObjectBuilderDeserializer.java | 11 +- .../client/json/ObjectDeserializer.java | 57 +- .../json/UnexpectedJsonEventException.java | 1 - .../client/json/UnionDeserializer.java | 54 +- .../json/jackson/JacksonJsonProvider.java | 7 +- .../json/jackson/JacksonJsonpGenerator.java | 9 +- .../json/jackson/JacksonJsonpMapper.java | 24 +- .../json/jackson/JacksonJsonpParser.java | 38 +- .../client/json/jackson/JacksonUtils.java | 1 - .../client/json/jackson/JsonValueParser.java | 7 +- .../client/json/jsonb/JsonbJsonpMapper.java | 23 +- .../opensearch/OpenSearchAsyncClient.java | 3011 +++--- .../client/opensearch/OpenSearchClient.java | 2959 +++--- .../_types/AcknowledgedResponseBase.java | 96 +- .../client/opensearch/_types/BaseNode.java | 449 +- .../_types/BulkIndexByScrollFailure.java | 351 +- .../client/opensearch/_types/BulkStats.java | 591 +- .../client/opensearch/_types/Bytes.java | 30 +- .../opensearch/_types/ClusterStatistics.java | 260 +- .../opensearch/_types/CompletionStats.java | 334 +- .../client/opensearch/_types/Conflicts.java | 23 +- .../opensearch/_types/CoordsGeoBounds.java | 292 +- .../opensearch/_types/DistanceUnit.java | 37 +- .../client/opensearch/_types/DocStats.java | 166 +- .../client/opensearch/_types/EmptyObject.java | 41 +- .../opensearch/_types/EmptyTransform.java | 39 +- .../client/opensearch/_types/ErrorCause.java | 688 +- .../opensearch/_types/ErrorResponse.java | 263 +- .../opensearch/_types/ExpandWildcard.java | 63 +- .../opensearch/_types/FieldMemoryUsage.java | 226 +- .../opensearch/_types/FieldSizeUsage.java | 226 +- .../client/opensearch/_types/FieldSort.java | 607 +- .../_types/FieldSortNumericType.java | 29 +- .../client/opensearch/_types/FieldValue.java | 479 +- .../opensearch/_types/FielddataStats.java | 383 +- .../client/opensearch/_types/FlushStats.java | 310 +- .../client/opensearch/_types/GeoBounds.java | 353 +- .../opensearch/_types/GeoBoundsBuilders.java | 57 +- .../opensearch/_types/GeoDistanceSort.java | 559 +- .../opensearch/_types/GeoDistanceType.java | 23 +- .../opensearch/_types/GeoHashLocation.java | 124 +- .../opensearch/_types/GeoHashPrecision.java | 269 +- .../_types/GeoHashPrecisionBuilders.java | 5 +- .../client/opensearch/_types/GeoLine.java | 297 +- .../client/opensearch/_types/GeoLocation.java | 371 +- .../_types/GeoLocationBuilders.java | 33 +- .../opensearch/_types/GeoShapeRelation.java | 27 +- .../client/opensearch/_types/GetStats.java | 629 +- .../opensearch/_types/HealthStatus.java | 59 +- .../opensearch/_types/IndexingStats.java | 883 +- .../_types/IndicesResponseBase.java | 100 +- .../client/opensearch/_types/InlineGet.java | 626 +- .../opensearch/_types/InlineScript.java | 319 +- .../opensearch/_types/LatLonGeoLocation.java | 166 +- .../client/opensearch/_types/Level.java | 24 +- .../_types/LifecycleOperationMode.java | 27 +- .../client/opensearch/_types/MergesStats.java | 952 +- .../opensearch/_types/NestedSortValue.java | 371 +- .../opensearch/_types/NodeAttributes.java | 547 +- .../client/opensearch/_types/NodeRole.java | 50 +- .../client/opensearch/_types/NodeShard.java | 632 +- .../opensearch/_types/NodeStatistics.java | 398 +- .../client/opensearch/_types/OpType.java | 22 +- .../_types/OpenSearchException.java | 48 +- .../_types/OpenSearchVersionInfo.java | 603 +- .../client/opensearch/_types/PluginStats.java | 533 +- .../opensearch/_types/QueryCacheStats.java | 502 +- .../opensearch/_types/RecoveryStats.java | 311 +- .../client/opensearch/_types/Refresh.java | 24 +- .../opensearch/_types/RefreshStats.java | 403 +- .../client/opensearch/_types/RequestBase.java | 12 +- .../opensearch/_types/RequestCacheStats.java | 350 +- .../client/opensearch/_types/Result.java | 28 +- .../client/opensearch/_types/Retries.java | 166 +- .../client/opensearch/_types/ScoreSort.java | 195 +- .../client/opensearch/_types/Script.java | 234 +- .../client/opensearch/_types/ScriptBase.java | 124 +- .../opensearch/_types/ScriptBuilders.java | 29 +- .../client/opensearch/_types/ScriptField.java | 242 +- .../client/opensearch/_types/ScriptSort.java | 441 +- .../opensearch/_types/ScriptSortType.java | 23 +- .../client/opensearch/_types/SearchStats.java | 863 +- .../client/opensearch/_types/SearchType.java | 39 +- .../opensearch/_types/SegmentsStats.java | 1362 ++- .../opensearch/_types/ShardFailure.java | 398 +- .../opensearch/_types/ShardStatistics.java | 410 +- .../_types/ShardsOperationResponseBase.java | 99 +- .../opensearch/_types/SlicedScroll.java | 274 +- .../client/opensearch/_types/SortMode.java | 28 +- .../client/opensearch/_types/SortOptions.java | 544 +- .../_types/SortOptionsBuilders.java | 71 +- .../opensearch/_types/SortOptionsVariant.java | 8 +- .../client/opensearch/_types/SortOrder.java | 23 +- .../client/opensearch/_types/StoreStats.java | 484 +- .../opensearch/_types/StoredScript.java | 310 +- .../opensearch/_types/StoredScriptId.java | 122 +- .../client/opensearch/_types/SuggestMode.java | 25 +- .../client/opensearch/_types/ThreadType.java | 25 +- .../client/opensearch/_types/Time.java | 266 +- .../opensearch/_types/TimeBuilders.java | 5 +- .../client/opensearch/_types/TimeUnit.java | 32 +- .../_types/TopLeftBottomRightGeoBounds.java | 244 +- .../_types/TopRightBottomLeftGeoBounds.java | 244 +- .../opensearch/_types/TranslogStats.java | 473 +- .../client/opensearch/_types/VersionType.java | 27 +- .../_types/WaitForActiveShardOptions.java | 23 +- .../_types/WaitForActiveShards.java | 259 +- .../_types/WaitForActiveShardsBuilders.java | 5 +- .../opensearch/_types/WaitForEvents.java | 31 +- .../client/opensearch/_types/WarmerStats.java | 310 +- .../opensearch/_types/WktGeoBounds.java | 124 +- .../opensearch/_types/WriteResponseBase.java | 468 +- .../AdjacencyMatrixAggregate.java | 128 +- .../AdjacencyMatrixAggregation.java | 251 +- .../aggregations/AdjacencyMatrixBucket.java | 79 +- .../_types/aggregations/Aggregate.java | 3967 ++++---- .../_types/aggregations/AggregateBase.java | 124 +- .../aggregations/AggregateBuilders.java | 1019 +- .../_types/aggregations/AggregateVariant.java | 8 +- .../_types/aggregations/Aggregation.java | 4599 +++++---- .../_types/aggregations/AggregationBase.java | 220 +- .../aggregations/AggregationBuilders.java | 1105 +- .../_types/aggregations/AggregationRange.java | 296 +- .../aggregations/AggregationVariant.java | 8 +- .../aggregations/ArrayPercentilesItem.java | 282 +- .../AutoDateHistogramAggregate.java | 189 +- .../AutoDateHistogramAggregation.java | 709 +- .../aggregations/AverageAggregation.java | 119 +- .../AverageBucketAggregation.java | 122 +- .../_types/aggregations/AvgAggregate.java | 119 +- .../_types/aggregations/BoxPlotAggregate.java | 878 +- .../aggregations/BoxplotAggregation.java | 194 +- .../aggregations/BucketAggregationBase.java | 27 +- .../BucketMetricValueAggregate.java | 225 +- .../aggregations/BucketScriptAggregation.java | 212 +- .../BucketSelectorAggregation.java | 214 +- .../aggregations/BucketSortAggregation.java | 418 +- .../_types/aggregations/Buckets.java | 269 +- .../_types/aggregations/BucketsBuilders.java | 5 +- .../_types/aggregations/BucketsPath.java | 328 +- .../aggregations/BucketsPathBuilders.java | 5 +- .../_types/aggregations/CalendarInterval.java | 45 +- .../aggregations/CardinalityAggregate.java | 180 +- .../aggregations/CardinalityAggregation.java | 253 +- .../aggregations/ChiSquareHeuristic.java | 167 +- .../aggregations/ChildrenAggregate.java | 117 +- .../aggregations/ChildrenAggregation.java | 194 +- .../ClassificationInferenceOptions.java | 475 +- .../aggregations/CompositeAggregate.java | 232 +- .../aggregations/CompositeAggregation.java | 399 +- .../CompositeAggregationSource.java | 414 +- .../_types/aggregations/CompositeBucket.java | 208 +- .../CumulativeCardinalityAggregate.java | 246 +- .../CumulativeCardinalityAggregation.java | 125 +- .../CumulativeSumAggregation.java | 122 +- .../aggregations/DateHistogramAggregate.java | 124 +- .../DateHistogramAggregation.java | 1147 ++- .../aggregations/DateHistogramBucket.java | 224 +- .../aggregations/DateRangeAggregate.java | 121 +- .../aggregations/DateRangeAggregation.java | 550 +- .../aggregations/DateRangeExpression.java | 324 +- .../aggregations/DerivativeAggregate.java | 252 +- .../aggregations/DerivativeAggregation.java | 119 +- .../DiversifiedSamplerAggregation.java | 443 +- .../aggregations/DoubleTermsAggregate.java | 125 +- .../aggregations/DoubleTermsBucket.java | 226 +- .../aggregations/EwmaModelSettings.java | 136 +- .../EwmaMovingAverageAggregation.java | 206 +- .../_types/aggregations/ExtendedBounds.java | 261 +- .../aggregations/ExtendedStatsAggregate.java | 867 +- .../ExtendedStatsAggregation.java | 197 +- .../ExtendedStatsBucketAggregate.java | 122 +- .../ExtendedStatsBucketAggregation.java | 198 +- .../_types/aggregations/FieldDateMath.java | 269 +- .../aggregations/FieldDateMathBuilders.java | 5 +- .../_types/aggregations/FilterAggregate.java | 119 +- .../_types/aggregations/FiltersAggregate.java | 123 +- .../aggregations/FiltersAggregation.java | 384 +- .../_types/aggregations/FiltersBucket.java | 79 +- .../FormatMetricAggregationBase.java | 85 +- .../FormattableMetricAggregation.java | 85 +- .../_types/aggregations/GapPolicy.java | 23 +- .../aggregations/GeoBoundsAggregate.java | 197 +- .../aggregations/GeoBoundsAggregation.java | 194 +- .../aggregations/GeoCentroidAggregate.java | 258 +- .../aggregations/GeoCentroidAggregation.java | 269 +- .../aggregations/GeoDistanceAggregate.java | 121 +- .../aggregations/GeoDistanceAggregation.java | 493 +- .../aggregations/GeoHashGridAggregate.java | 123 +- .../aggregations/GeoHashGridAggregation.java | 459 +- .../aggregations/GeoHashGridBucket.java | 124 +- .../_types/aggregations/GeoLineAggregate.java | 244 +- .../aggregations/GeoLineAggregation.java | 436 +- .../_types/aggregations/GeoLinePoint.java | 124 +- .../_types/aggregations/GeoLineSort.java | 124 +- .../aggregations/GeoTileGridAggregate.java | 123 +- .../aggregations/GeoTileGridAggregation.java | 443 +- .../aggregations/GeoTileGridBucket.java | 125 +- .../_types/aggregations/GlobalAggregate.java | 120 +- .../aggregations/GlobalAggregation.java | 120 +- .../GoogleNormalizedDistanceHeuristic.java | 141 +- .../_types/aggregations/HdrMethod.java | 138 +- .../HdrPercentileRanksAggregate.java | 123 +- .../aggregations/HdrPercentilesAggregate.java | 123 +- .../aggregations/HistogramAggregate.java | 124 +- .../aggregations/HistogramAggregation.java | 842 +- .../_types/aggregations/HistogramBucket.java | 225 +- .../_types/aggregations/HistogramOrder.java | 238 +- .../aggregations/HoltLinearModelSettings.java | 240 +- .../HoltMovingAverageAggregation.java | 208 +- .../HoltWintersModelSettings.java | 470 +- .../HoltWintersMovingAverageAggregation.java | 212 +- .../_types/aggregations/HoltWintersType.java | 24 +- .../aggregations/InferenceAggregate.java | 586 +- .../aggregations/InferenceAggregation.java | 257 +- .../InferenceClassImportance.java | 168 +- .../_types/aggregations/InferenceConfig.java | 296 +- .../InferenceFeatureImportance.java | 336 +- .../aggregations/InferenceTopClassEntry.java | 278 +- .../_types/aggregations/IpRangeAggregate.java | 124 +- .../aggregations/IpRangeAggregation.java | 304 +- .../aggregations/IpRangeAggregationRange.java | 297 +- .../_types/aggregations/IpRangeBucket.java | 237 +- .../LinearMovingAverageAggregation.java | 210 +- .../aggregations/LongRareTermsAggregate.java | 124 +- .../aggregations/LongRareTermsBucket.java | 227 +- .../aggregations/LongTermsAggregate.java | 123 +- .../_types/aggregations/LongTermsBucket.java | 227 +- .../aggregations/MatrixAggregation.java | 238 +- .../aggregations/MatrixStatsAggregate.java | 288 +- .../aggregations/MatrixStatsAggregation.java | 197 +- .../aggregations/MatrixStatsFields.java | 577 +- .../_types/aggregations/MaxAggregate.java | 120 +- .../_types/aggregations/MaxAggregation.java | 120 +- .../aggregations/MaxBucketAggregation.java | 120 +- .../MedianAbsoluteDeviationAggregate.java | 126 +- .../MedianAbsoluteDeviationAggregation.java | 201 +- .../aggregations/MetricAggregationBase.java | 280 +- .../_types/aggregations/MinAggregate.java | 119 +- .../_types/aggregations/MinAggregation.java | 119 +- .../aggregations/MinBucketAggregation.java | 119 +- .../_types/aggregations/MinimumInterval.java | 31 +- .../_types/aggregations/MissingAggregate.java | 119 +- .../aggregations/MissingAggregation.java | 268 +- .../_types/aggregations/MissingOrder.java | 25 +- .../MovingAverageAggregation.java | 488 +- .../MovingAverageAggregationBase.java | 229 +- .../MovingAverageAggregationBuilders.java | 73 +- .../MovingAverageAggregationVariant.java | 8 +- .../MovingFunctionAggregation.java | 313 +- .../MovingPercentilesAggregation.java | 313 +- .../MultiBucketAggregateBase.java | 151 +- .../_types/aggregations/MultiBucketBase.java | 225 +- .../_types/aggregations/MultiTermLookup.java | 124 +- .../aggregations/MultiTermsAggregate.java | 123 +- .../aggregations/MultiTermsAggregation.java | 297 +- .../_types/aggregations/MultiTermsBucket.java | 324 +- .../MutualInformationHeuristic.java | 239 +- .../_types/aggregations/NestedAggregate.java | 119 +- .../aggregations/NestedAggregation.java | 194 +- .../aggregations/NormalizeAggregation.java | 193 +- .../_types/aggregations/NormalizeMethod.java | 31 +- .../aggregations/ParentAggregation.java | 194 +- .../PercentageScoreHeuristic.java | 41 +- .../PercentileRanksAggregation.java | 431 +- .../_types/aggregations/Percentiles.java | 268 +- .../PercentilesAggregateBase.java | 88 +- .../aggregations/PercentilesAggregation.java | 432 +- .../PercentilesBucketAggregate.java | 122 +- .../PercentilesBucketAggregation.java | 230 +- .../aggregations/PercentilesBuilders.java | 5 +- .../aggregations/PipelineAggregationBase.java | 243 +- .../_types/aggregations/RangeAggregate.java | 131 +- .../_types/aggregations/RangeAggregation.java | 493 +- .../_types/aggregations/RangeBucket.java | 407 +- .../aggregations/RareTermsAggregation.java | 587 +- .../_types/aggregations/RateAggregate.java | 241 +- .../_types/aggregations/RateAggregation.java | 250 +- .../_types/aggregations/RateMode.java | 23 +- .../RegressionInferenceOptions.java | 265 +- .../aggregations/ReverseNestedAggregate.java | 123 +- .../ReverseNestedAggregation.java | 196 +- .../_types/aggregations/SamplerAggregate.java | 120 +- .../aggregations/SamplerAggregation.java | 195 +- .../SamplerAggregationExecutionHint.java | 28 +- .../aggregations/ScriptedHeuristic.java | 140 +- .../aggregations/ScriptedMetricAggregate.java | 183 +- .../ScriptedMetricAggregation.java | 520 +- .../SerialDifferencingAggregation.java | 198 +- .../SignificantLongTermsAggregate.java | 130 +- .../SignificantLongTermsBucket.java | 230 +- .../SignificantStringTermsAggregate.java | 131 +- .../SignificantStringTermsBucket.java | 128 +- .../SignificantTermsAggregation.java | 1086 +- .../SignificantTermsBucketBase.java | 112 +- .../SignificantTextAggregation.java | 1233 ++- .../SimpleMovingAverageAggregation.java | 210 +- .../aggregations/SimpleValueAggregate.java | 120 +- .../SingleBucketAggregateBase.java | 159 +- .../SingleMetricAggregateBase.java | 179 +- .../aggregations/StandardDeviationBounds.java | 445 +- .../StandardDeviationBoundsAsString.java | 381 +- .../_types/aggregations/StatsAggregate.java | 644 +- .../_types/aggregations/StatsAggregation.java | 119 +- .../aggregations/StatsBucketAggregate.java | 120 +- .../aggregations/StatsBucketAggregation.java | 121 +- .../StringRareTermsAggregate.java | 128 +- .../aggregations/StringRareTermsBucket.java | 125 +- .../aggregations/StringStatsAggregate.java | 633 +- .../aggregations/StringStatsAggregation.java | 195 +- .../aggregations/StringTermsAggregate.java | 123 +- .../aggregations/StringTermsBucket.java | 125 +- .../_types/aggregations/SumAggregate.java | 119 +- .../_types/aggregations/SumAggregation.java | 120 +- .../aggregations/SumBucketAggregation.java | 120 +- .../_types/aggregations/TDigest.java | 137 +- .../TDigestPercentileRanksAggregate.java | 124 +- .../TDigestPercentilesAggregate.java | 123 +- .../_types/aggregations/TTestAggregate.java | 249 +- .../_types/aggregations/TTestAggregation.java | 338 +- .../_types/aggregations/TTestType.java | 26 +- .../aggregations/TermsAggregateBase.java | 162 +- .../_types/aggregations/TermsAggregation.java | 1117 +- .../TermsAggregationCollectMode.java | 26 +- .../TermsAggregationExecutionHint.java | 30 +- .../_types/aggregations/TermsBucketBase.java | 84 +- .../_types/aggregations/TermsExclude.java | 280 +- .../aggregations/TermsExcludeBuilders.java | 5 +- .../_types/aggregations/TermsInclude.java | 310 +- .../aggregations/TermsIncludeBuilders.java | 19 +- .../_types/aggregations/TermsPartition.java | 167 +- .../_types/aggregations/TestPopulation.java | 319 +- .../_types/aggregations/TopHitsAggregate.java | 198 +- .../aggregations/TopHitsAggregation.java | 1034 +- .../_types/aggregations/TopMetrics.java | 337 +- .../aggregations/TopMetricsAggregate.java | 124 +- .../aggregations/TopMetricsAggregation.java | 409 +- .../_types/aggregations/TopMetricsBucket.java | 225 +- .../_types/aggregations/TopMetricsValue.java | 125 +- .../UnmappedRareTermsAggregate.java | 124 +- .../UnmappedSignificantTermsAggregate.java | 127 +- .../aggregations/UnmappedTermsAggregate.java | 122 +- .../aggregations/ValueCountAggregate.java | 119 +- .../aggregations/ValueCountAggregation.java | 122 +- .../_types/aggregations/ValueType.java | 40 +- .../VariableWidthHistogramAggregate.java | 131 +- .../VariableWidthHistogramAggregation.java | 374 +- .../VariableWidthHistogramBucket.java | 430 +- .../WeightedAverageAggregation.java | 396 +- .../aggregations/WeightedAverageValue.java | 313 +- .../aggregations/WeightedAvgAggregate.java | 119 +- .../opensearch/_types/analysis/Analyzer.java | 1008 +- .../_types/analysis/AnalyzerBuilders.java | 223 +- .../_types/analysis/AnalyzerVariant.java | 8 +- .../analysis/AsciiFoldingTokenFilter.java | 186 +- .../_types/analysis/CharFilter.java | 243 +- .../_types/analysis/CharFilterBase.java | 94 +- .../_types/analysis/CharFilterBuilders.java | 19 +- .../_types/analysis/CharFilterDefinition.java | 490 +- .../CharFilterDefinitionBuilders.java | 73 +- .../analysis/CharFilterDefinitionVariant.java | 8 +- .../_types/analysis/CharGroupTokenizer.java | 287 +- .../_types/analysis/CjkAnalyzer.java | 293 +- .../analysis/CommonGramsTokenFilter.java | 407 +- .../analysis/CompoundWordTokenFilterBase.java | 495 +- .../_types/analysis/ConditionTokenFilter.java | 288 +- .../_types/analysis/CustomAnalyzer.java | 485 +- .../_types/analysis/CustomNormalizer.java | 324 +- .../analysis/DelimitedPayloadEncoding.java | 28 +- .../analysis/DelimitedPayloadTokenFilter.java | 233 +- .../DictionaryDecompounderTokenFilter.java | 148 +- .../_types/analysis/DutchAnalyzer.java | 235 +- .../_types/analysis/EdgeNGramSide.java | 23 +- .../_types/analysis/EdgeNGramTokenFilter.java | 347 +- .../_types/analysis/EdgeNGramTokenizer.java | 370 +- .../_types/analysis/ElisionTokenFilter.java | 274 +- .../_types/analysis/FingerprintAnalyzer.java | 491 +- .../analysis/FingerprintTokenFilter.java | 233 +- .../_types/analysis/HtmlStripCharFilter.java | 105 +- .../_types/analysis/HunspellTokenFilter.java | 317 +- .../HyphenationDecompounderTokenFilter.java | 149 +- .../_types/analysis/IcuAnalyzer.java | 236 +- .../analysis/IcuCollationAlternate.java | 25 +- .../analysis/IcuCollationCaseFirst.java | 25 +- .../analysis/IcuCollationDecomposition.java | 26 +- .../_types/analysis/IcuCollationStrength.java | 31 +- .../analysis/IcuCollationTokenFilter.java | 670 +- .../analysis/IcuFoldingTokenFilter.java | 184 +- .../analysis/IcuNormalizationCharFilter.java | 254 +- .../_types/analysis/IcuNormalizationMode.java | 26 +- .../analysis/IcuNormalizationTokenFilter.java | 186 +- .../_types/analysis/IcuNormalizationType.java | 28 +- .../_types/analysis/IcuTokenizer.java | 199 +- .../analysis/IcuTransformDirection.java | 26 +- .../analysis/IcuTransformTokenFilter.java | 231 +- .../_types/analysis/KStemTokenFilter.java | 105 +- .../_types/analysis/KeepTypesMode.java | 23 +- .../_types/analysis/KeepTypesTokenFilter.java | 287 +- .../_types/analysis/KeepWordsTokenFilter.java | 348 +- .../_types/analysis/KeywordAnalyzer.java | 155 +- .../analysis/KeywordMarkerTokenFilter.java | 406 +- .../_types/analysis/KeywordTokenizer.java | 185 +- .../_types/analysis/KuromojiAnalyzer.java | 249 +- .../KuromojiIterationMarkCharFilter.java | 235 +- .../KuromojiPartOfSpeechTokenFilter.java | 230 +- .../KuromojiReadingFormTokenFilter.java | 186 +- .../analysis/KuromojiStemmerTokenFilter.java | 185 +- .../analysis/KuromojiTokenizationMode.java | 28 +- .../_types/analysis/KuromojiTokenizer.java | 572 +- .../opensearch/_types/analysis/Language.java | 86 +- .../_types/analysis/LanguageAnalyzer.java | 485 +- .../_types/analysis/LengthTokenFilter.java | 232 +- .../_types/analysis/LetterTokenizer.java | 106 +- .../analysis/LimitTokenCountTokenFilter.java | 234 +- .../_types/analysis/LowercaseNormalizer.java | 105 +- .../_types/analysis/LowercaseTokenFilter.java | 199 +- .../_types/analysis/LowercaseTokenizer.java | 106 +- .../_types/analysis/MappingCharFilter.java | 288 +- .../analysis/MultiplexerTokenFilter.java | 275 +- .../_types/analysis/NGramTokenFilter.java | 314 +- .../_types/analysis/NGramTokenizer.java | 371 +- .../_types/analysis/NoriAnalyzer.java | 408 +- .../_types/analysis/NoriDecompoundMode.java | 26 +- .../analysis/NoriPartOfSpeechTokenFilter.java | 229 +- .../_types/analysis/NoriTokenizer.java | 406 +- .../_types/analysis/Normalizer.java | 224 +- .../_types/analysis/NormalizerBuilders.java | 31 +- .../_types/analysis/NormalizerVariant.java | 8 +- .../analysis/PathHierarchyTokenizer.java | 356 +- .../_types/analysis/PatternAnalyzer.java | 457 +- .../analysis/PatternCaptureTokenFilter.java | 274 +- .../analysis/PatternReplaceCharFilter.java | 281 +- .../analysis/PatternReplaceTokenFilter.java | 282 +- .../_types/analysis/PatternTokenizer.java | 281 +- .../_types/analysis/PhoneticEncoder.java | 43 +- .../_types/analysis/PhoneticLanguage.java | 44 +- .../_types/analysis/PhoneticNameType.java | 26 +- .../_types/analysis/PhoneticRuleType.java | 24 +- .../_types/analysis/PhoneticTokenFilter.java | 482 +- .../analysis/PorterStemTokenFilter.java | 106 +- .../_types/analysis/PredicateTokenFilter.java | 202 +- .../analysis/RemoveDuplicatesTokenFilter.java | 107 +- .../_types/analysis/ReverseTokenFilter.java | 106 +- .../_types/analysis/ShingleTokenFilter.java | 489 +- .../_types/analysis/SimpleAnalyzer.java | 155 +- .../_types/analysis/SmartcnAnalyzer.java | 104 +- .../analysis/SmartcnStopTokenFilter.java | 104 +- .../_types/analysis/SmartcnTokenizer.java | 102 +- .../_types/analysis/SnowballAnalyzer.java | 336 +- .../_types/analysis/SnowballLanguage.java | 64 +- .../_types/analysis/SnowballTokenFilter.java | 186 +- .../_types/analysis/StandardAnalyzer.java | 294 +- .../_types/analysis/StandardTokenizer.java | 199 +- .../analysis/StemmerOverrideTokenFilter.java | 290 +- .../_types/analysis/StemmerTokenFilter.java | 184 +- .../_types/analysis/StopAnalyzer.java | 347 +- .../_types/analysis/StopTokenFilter.java | 403 +- .../_types/analysis/SynonymFormat.java | 23 +- .../analysis/SynonymGraphTokenFilter.java | 578 +- .../_types/analysis/SynonymTokenFilter.java | 577 +- .../opensearch/_types/analysis/TokenChar.java | 32 +- .../_types/analysis/TokenFilter.java | 242 +- .../_types/analysis/TokenFilterBase.java | 94 +- .../_types/analysis/TokenFilterBuilders.java | 19 +- .../analysis/TokenFilterDefinition.java | 3096 +++--- .../TokenFilterDefinitionBuilders.java | 771 +- .../TokenFilterDefinitionVariant.java | 8 +- .../opensearch/_types/analysis/Tokenizer.java | 242 +- .../_types/analysis/TokenizerBase.java | 95 +- .../_types/analysis/TokenizerBuilders.java | 19 +- .../_types/analysis/TokenizerDefinition.java | 1007 +- .../analysis/TokenizerDefinitionBuilders.java | 227 +- .../analysis/TokenizerDefinitionVariant.java | 8 +- .../_types/analysis/TrimTokenFilter.java | 105 +- .../_types/analysis/TruncateTokenFilter.java | 185 +- .../_types/analysis/UaxEmailUrlTokenizer.java | 198 +- .../_types/analysis/UniqueTokenFilter.java | 198 +- .../_types/analysis/UppercaseTokenFilter.java | 106 +- .../_types/analysis/WhitespaceAnalyzer.java | 154 +- .../_types/analysis/WhitespaceTokenizer.java | 198 +- .../WordDelimiterGraphTokenFilter.java | 1075 +- .../analysis/WordDelimiterTokenFilter.java | 960 +- .../AggregateMetricDoubleProperty.java | 277 +- .../opensearch/_types/mapping/AllField.java | 593 +- .../_types/mapping/BinaryProperty.java | 106 +- .../_types/mapping/BooleanProperty.java | 389 +- .../_types/mapping/ByteNumberProperty.java | 199 +- .../_types/mapping/CompletionProperty.java | 540 +- .../mapping/ConstantKeywordProperty.java | 201 +- .../_types/mapping/CorePropertyBase.java | 261 +- .../_types/mapping/DateNanosProperty.java | 489 +- .../_types/mapping/DateProperty.java | 621 +- .../_types/mapping/DateRangeProperty.java | 199 +- .../_types/mapping/DocValuesPropertyBase.java | 86 +- .../_types/mapping/DoubleNumberProperty.java | 199 +- .../_types/mapping/DoubleRangeProperty.java | 106 +- .../_types/mapping/DynamicMapping.java | 28 +- .../_types/mapping/DynamicTemplate.java | 541 +- .../_types/mapping/FieldAliasProperty.java | 199 +- .../_types/mapping/FieldMapping.java | 277 +- .../_types/mapping/FieldNamesField.java | 125 +- .../opensearch/_types/mapping/FieldType.java | 101 +- .../_types/mapping/FlattenedProperty.java | 662 +- .../_types/mapping/FloatNumberProperty.java | 199 +- .../_types/mapping/FloatRangeProperty.java | 106 +- .../_types/mapping/GeoOrientation.java | 34 +- .../_types/mapping/GeoPointProperty.java | 331 +- .../_types/mapping/GeoShapeProperty.java | 428 +- .../_types/mapping/GeoStrategy.java | 24 +- .../mapping/HalfFloatNumberProperty.java | 199 +- .../_types/mapping/HistogramProperty.java | 199 +- .../opensearch/_types/mapping/IndexField.java | 125 +- .../_types/mapping/IndexOptions.java | 28 +- .../_types/mapping/IntegerNumberProperty.java | 199 +- .../_types/mapping/IntegerRangeProperty.java | 106 +- .../opensearch/_types/mapping/IpProperty.java | 373 +- .../_types/mapping/IpRangeProperty.java | 106 +- .../_types/mapping/JoinProperty.java | 252 +- .../_types/mapping/KeywordProperty.java | 604 +- .../_types/mapping/KnnVectorMethod.java | 14 +- .../_types/mapping/KnnVectorProperty.java | 315 +- .../_types/mapping/LongNumberProperty.java | 199 +- .../_types/mapping/LongRangeProperty.java | 106 +- .../opensearch/_types/mapping/MatchType.java | 24 +- .../_types/mapping/Murmur3HashProperty.java | 106 +- .../_types/mapping/NestedProperty.java | 315 +- .../_types/mapping/NumberPropertyBase.java | 172 +- .../_types/mapping/ObjectProperty.java | 199 +- .../_types/mapping/OnScriptError.java | 24 +- .../_types/mapping/PercolatorProperty.java | 106 +- .../_types/mapping/PointProperty.java | 315 +- .../opensearch/_types/mapping/Property.java | 2729 +++-- .../_types/mapping/PropertyBase.java | 646 +- .../_types/mapping/PropertyBuilders.java | 699 +- .../_types/mapping/PropertyVariant.java | 8 +- .../_types/mapping/RangePropertyBase.java | 228 +- .../_types/mapping/RankFeatureProperty.java | 199 +- .../_types/mapping/RankFeaturesProperty.java | 106 +- .../_types/mapping/RoutingField.java | 125 +- .../_types/mapping/RuntimeField.java | 301 +- .../_types/mapping/RuntimeFieldType.java | 34 +- .../mapping/ScaledFloatNumberProperty.java | 316 +- .../mapping/SearchAsYouTypeProperty.java | 602 +- .../_types/mapping/ShapeProperty.java | 372 +- .../_types/mapping/ShortNumberProperty.java | 199 +- .../opensearch/_types/mapping/SizeField.java | 125 +- .../_types/mapping/SourceField.java | 477 +- .../mapping/StandardNumberProperty.java | 246 +- .../_types/mapping/SuggestContext.java | 321 +- .../_types/mapping/TermVectorOption.java | 34 +- .../_types/mapping/TextIndexPrefixes.java | 167 +- .../_types/mapping/TextProperty.java | 982 +- .../_types/mapping/TokenCountProperty.java | 432 +- .../_types/mapping/TypeMapping.java | 1298 +-- .../mapping/UnsignedLongNumberProperty.java | 200 +- .../_types/mapping/VersionProperty.java | 106 +- .../_types/mapping/WildcardProperty.java | 199 +- .../_types/query_dsl/BoolQuery.java | 619 +- .../_types/query_dsl/BoostingQuery.java | 301 +- .../_types/query_dsl/ChildScoreMode.java | 30 +- .../query_dsl/CombinedFieldsOperator.java | 26 +- .../_types/query_dsl/CombinedFieldsQuery.java | 502 +- .../query_dsl/CombinedFieldsZeroTerms.java | 26 +- .../_types/query_dsl/CommonTermsQuery.java | 521 +- .../_types/query_dsl/ConstantScoreQuery.java | 196 +- .../_types/query_dsl/DecayFunction.java | 241 +- .../_types/query_dsl/DecayFunctionBase.java | 85 +- .../_types/query_dsl/DecayPlacement.java | 355 +- .../_types/query_dsl/DisMaxQuery.java | 299 +- .../query_dsl/DistanceFeatureQuery.java | 277 +- .../_types/query_dsl/ExistsQuery.java | 179 +- .../_types/query_dsl/FieldAndFormat.java | 310 +- .../_types/query_dsl/FieldLookup.java | 335 +- .../query_dsl/FieldValueFactorModifier.java | 42 +- .../FieldValueFactorScoreFunction.java | 358 +- .../_types/query_dsl/FunctionBoostMode.java | 32 +- .../_types/query_dsl/FunctionScore.java | 721 +- .../query_dsl/FunctionScoreBuilders.java | 87 +- .../_types/query_dsl/FunctionScoreMode.java | 32 +- .../_types/query_dsl/FunctionScoreQuery.java | 545 +- .../query_dsl/FunctionScoreVariant.java | 8 +- .../_types/query_dsl/FuzzyQuery.java | 541 +- .../_types/query_dsl/GeoBoundingBoxQuery.java | 429 +- .../_types/query_dsl/GeoDistanceQuery.java | 417 +- .../_types/query_dsl/GeoExecution.java | 24 +- .../_types/query_dsl/GeoPolygonPoints.java | 229 +- .../_types/query_dsl/GeoPolygonQuery.java | 356 +- .../_types/query_dsl/GeoShapeFieldQuery.java | 312 +- .../_types/query_dsl/GeoShapeQuery.java | 301 +- .../_types/query_dsl/GeoValidationMethod.java | 28 +- .../_types/query_dsl/HasChildQuery.java | 547 +- .../_types/query_dsl/HasParentQuery.java | 429 +- .../opensearch/_types/query_dsl/IdsQuery.java | 225 +- .../_types/query_dsl/Intervals.java | 545 +- .../_types/query_dsl/IntervalsAllOf.java | 449 +- .../_types/query_dsl/IntervalsAnyOf.java | 333 +- .../_types/query_dsl/IntervalsBuilders.java | 87 +- .../_types/query_dsl/IntervalsFilter.java | 700 +- .../query_dsl/IntervalsFilterBuilders.java | 129 +- .../query_dsl/IntervalsFilterVariant.java | 8 +- .../_types/query_dsl/IntervalsFuzzy.java | 493 +- .../_types/query_dsl/IntervalsMatch.java | 507 +- .../_types/query_dsl/IntervalsPrefix.java | 317 +- .../_types/query_dsl/IntervalsQuery.java | 619 +- .../query_dsl/IntervalsQueryBuilders.java | 87 +- .../query_dsl/IntervalsQueryVariant.java | 2 +- .../_types/query_dsl/IntervalsVariant.java | 8 +- .../_types/query_dsl/IntervalsWildcard.java | 317 +- .../opensearch/_types/query_dsl/KnnQuery.java | 6 +- .../opensearch/_types/query_dsl/Like.java | 241 +- .../_types/query_dsl/LikeBuilders.java | 17 +- .../_types/query_dsl/LikeDocument.java | 716 +- .../_types/query_dsl/MatchAllQuery.java | 118 +- .../query_dsl/MatchBoolPrefixQuery.java | 699 +- .../_types/query_dsl/MatchNoneQuery.java | 118 +- .../query_dsl/MatchPhrasePrefixQuery.java | 470 +- .../_types/query_dsl/MatchPhraseQuery.java | 409 +- .../_types/query_dsl/MatchQuery.java | 958 +- .../_types/query_dsl/MoreLikeThisQuery.java | 1424 +-- .../_types/query_dsl/MultiMatchQuery.java | 1148 +-- .../_types/query_dsl/MultiValueMode.java | 28 +- .../_types/query_dsl/NestedQuery.java | 433 +- .../opensearch/_types/query_dsl/Operator.java | 33 +- .../_types/query_dsl/ParentIdQuery.java | 309 +- .../_types/query_dsl/PercolateQuery.java | 679 +- .../_types/query_dsl/PinnedDoc.java | 167 +- .../_types/query_dsl/PinnedQuery.java | 457 +- .../_types/query_dsl/PinnedQueryBuilders.java | 5 +- .../_types/query_dsl/PinnedQueryVariant.java | 2 +- .../_types/query_dsl/PrefixQuery.java | 349 +- .../opensearch/_types/query_dsl/Query.java | 3333 +++--- .../_types/query_dsl/QueryBase.java | 185 +- .../_types/query_dsl/QueryBuilders.java | 847 +- .../_types/query_dsl/QueryStringQuery.java | 1559 ++- .../_types/query_dsl/QueryVariant.java | 8 +- .../_types/query_dsl/RandomScoreFunction.java | 253 +- .../_types/query_dsl/RangeQuery.java | 651 +- .../_types/query_dsl/RangeQueryBase.java | 85 +- .../_types/query_dsl/RangeRelation.java | 26 +- .../_types/query_dsl/RankFeatureFunction.java | 13 +- .../query_dsl/RankFeatureFunctionLinear.java | 42 +- .../RankFeatureFunctionLogarithm.java | 126 +- .../RankFeatureFunctionSaturation.java | 138 +- .../query_dsl/RankFeatureFunctionSigmoid.java | 167 +- .../_types/query_dsl/RankFeatureQuery.java | 475 +- .../_types/query_dsl/RegexpQuery.java | 467 +- .../_types/query_dsl/ScoreFunctionBase.java | 203 +- .../_types/query_dsl/ScriptQuery.java | 196 +- .../_types/query_dsl/ScriptScoreFunction.java | 198 +- .../_types/query_dsl/ScriptScoreQuery.java | 317 +- .../_types/query_dsl/ShapeFieldQuery.java | 312 +- .../_types/query_dsl/ShapeQuery.java | 301 +- .../query_dsl/SimpleQueryStringFlag.java | 48 +- .../query_dsl/SimpleQueryStringFlags.java | 259 +- .../SimpleQueryStringFlagsBuilders.java | 5 +- .../query_dsl/SimpleQueryStringQuery.java | 927 +- .../_types/query_dsl/SpanContainingQuery.java | 274 +- .../query_dsl/SpanFieldMaskingQuery.java | 259 +- .../_types/query_dsl/SpanFirstQuery.java | 257 +- .../_types/query_dsl/SpanGapQuery.java | 173 +- .../_types/query_dsl/SpanMultiTermQuery.java | 230 +- .../_types/query_dsl/SpanNearQuery.java | 373 +- .../_types/query_dsl/SpanNotQuery.java | 449 +- .../_types/query_dsl/SpanOrQuery.java | 255 +- .../_types/query_dsl/SpanQuery.java | 760 +- .../_types/query_dsl/SpanQueryBuilders.java | 143 +- .../_types/query_dsl/SpanQueryVariant.java | 8 +- .../_types/query_dsl/SpanTermQuery.java | 249 +- .../_types/query_dsl/SpanWithinQuery.java | 272 +- .../_types/query_dsl/TermQuery.java | 309 +- .../_types/query_dsl/TermsLookup.java | 311 +- .../_types/query_dsl/TermsQuery.java | 239 +- .../_types/query_dsl/TermsQueryField.java | 258 +- .../query_dsl/TermsQueryFieldBuilders.java | 19 +- .../_types/query_dsl/TermsSetQuery.java | 405 +- .../_types/query_dsl/TextQueryType.java | 32 +- .../_types/query_dsl/TypeQuery.java | 179 +- .../_types/query_dsl/WildcardQuery.java | 469 +- .../_types/query_dsl/WrapperQuery.java | 12 +- .../_types/query_dsl/ZeroTermsQuery.java | 24 +- .../client/opensearch/cat/AliasesRequest.java | 352 +- .../opensearch/cat/AliasesResponse.java | 216 +- .../opensearch/cat/AllocationRequest.java | 321 +- .../opensearch/cat/AllocationResponse.java | 215 +- .../client/opensearch/cat/CatRequestBase.java | 16 +- .../opensearch/cat/ClusterManagerRequest.java | 82 +- .../cat/ClusterManagerResponse.java | 215 +- .../client/opensearch/cat/CountRequest.java | 248 +- .../client/opensearch/cat/CountResponse.java | 216 +- .../opensearch/cat/FielddataRequest.java | 319 +- .../opensearch/cat/FielddataResponse.java | 215 +- .../client/opensearch/cat/HealthRequest.java | 197 +- .../client/opensearch/cat/HealthResponse.java | 216 +- .../client/opensearch/cat/HelpRequest.java | 30 +- .../client/opensearch/cat/HelpResponse.java | 216 +- .../client/opensearch/cat/IndicesRequest.java | 128 +- .../opensearch/cat/IndicesResponse.java | 216 +- .../opensearch/cat/NodeattrsRequest.java | 30 +- .../opensearch/cat/NodeattrsResponse.java | 217 +- .../client/opensearch/cat/NodesRequest.java | 61 +- .../client/opensearch/cat/NodesResponse.java | 216 +- .../cat/OpenSearchCatAsyncClient.java | 1477 +-- .../opensearch/cat/OpenSearchCatClient.java | 1484 +-- .../opensearch/cat/PendingTasksRequest.java | 50 +- .../opensearch/cat/PendingTasksResponse.java | 217 +- .../opensearch/cat/PitSegmentsRequest.java | 52 +- .../client/opensearch/cat/PluginsRequest.java | 48 +- .../opensearch/cat/PluginsResponse.java | 216 +- .../opensearch/cat/RecoveryRequest.java | 111 +- .../opensearch/cat/RecoveryResponse.java | 215 +- .../opensearch/cat/RepositoriesRequest.java | 50 +- .../opensearch/cat/RepositoriesResponse.java | 217 +- .../opensearch/cat/SegmentsRequest.java | 318 +- .../opensearch/cat/SegmentsResponse.java | 216 +- .../client/opensearch/cat/ShardsRequest.java | 318 +- .../client/opensearch/cat/ShardsResponse.java | 216 +- .../opensearch/cat/SnapshotsRequest.java | 319 +- .../opensearch/cat/SnapshotsResponse.java | 215 +- .../client/opensearch/cat/TasksRequest.java | 413 +- .../client/opensearch/cat/TasksResponse.java | 215 +- .../opensearch/cat/TemplatesRequest.java | 222 +- .../opensearch/cat/TemplatesResponse.java | 215 +- .../opensearch/cat/ThreadPoolRequest.java | 328 +- .../opensearch/cat/ThreadPoolResponse.java | 215 +- .../opensearch/cat/aliases/AliasesRecord.java | 519 +- .../cat/allocation/AllocationRecord.java | 717 +- .../cluster_manager/ClusterManagerRecord.java | 387 +- .../opensearch/cat/count/CountRecord.java | 321 +- .../cat/fielddata/FielddataRecord.java | 519 +- .../opensearch/cat/health/HealthRecord.java | 1053 +- .../opensearch/cat/help/HelpRecord.java | 125 +- .../opensearch/cat/indices/IndicesRecord.java | 9016 +++++++++-------- .../cat/nodeattrs/NodeAttributesRecord.java | 651 +- .../opensearch/cat/nodes/NodesRecord.java | 6313 ++++++------ .../cat/pending_tasks/PendingTasksRecord.java | 386 +- .../opensearch/cat/plugins/PluginsRecord.java | 519 +- .../cat/recovery/RecoveryRecord.java | 1791 ++-- .../cat/repositories/RepositoriesRecord.java | 255 +- .../cat/segments/SegmentsRecord.java | 1113 +- .../opensearch/cat/shards/ShardsRecord.java | 4955 ++++----- .../cat/snapshots/SnapshotsRecord.java | 1001 +- .../opensearch/cat/tasks/TasksRecord.java | 1179 +-- .../cat/templates/TemplatesRecord.java | 453 +- .../cat/thread_pool/ThreadPoolRecord.java | 1439 +-- .../cat/thread_pool/ThreadPoolSize.java | 30 +- .../cluster/AllocationExplainRequest.java | 577 +- .../cluster/AllocationExplainResponse.java | 1684 +-- .../cluster/ClusterStatsRequest.java | 413 +- .../cluster/ClusterStatsResponse.java | 515 +- .../opensearch/cluster/ComponentTemplate.java | 230 +- .../cluster/ComponentTemplateNode.java | 332 +- .../cluster/ComponentTemplateSummary.java | 567 +- .../DeleteComponentTemplateRequest.java | 448 +- .../DeleteComponentTemplateResponse.java | 109 +- .../DeleteVotingConfigExclusionsRequest.java | 212 +- .../DeleteVotingConfigExclusionsResponse.java | 17 +- .../ExistsComponentTemplateRequest.java | 484 +- .../ExistsComponentTemplateResponse.java | 17 +- .../cluster/GetClusterSettingsRequest.java | 491 +- .../cluster/GetClusterSettingsResponse.java | 385 +- .../cluster/GetComponentTemplateRequest.java | 501 +- .../cluster/GetComponentTemplateResponse.java | 230 +- .../opensearch/cluster/HealthRequest.java | 1165 ++- .../opensearch/cluster/HealthResponse.java | 1094 +- .../cluster/OpenSearchClusterAsyncClient.java | 1258 +-- .../cluster/OpenSearchClusterClient.java | 1234 +-- .../cluster/PendingTasksRequest.java | 357 +- .../cluster/PendingTasksResponse.java | 229 +- .../PostVotingConfigExclusionsRequest.java | 410 +- .../PostVotingConfigExclusionsResponse.java | 17 +- .../cluster/PutClusterSettingsRequest.java | 671 +- .../cluster/PutClusterSettingsResponse.java | 341 +- .../cluster/PutComponentTemplateRequest.java | 967 +- .../cluster/PutComponentTemplateResponse.java | 108 +- .../opensearch/cluster/RemoteInfoRequest.java | 54 +- .../cluster/RemoteInfoResponse.java | 112 +- .../opensearch/cluster/RerouteRequest.java | 857 +- .../opensearch/cluster/RerouteResponse.java | 296 +- .../opensearch/cluster/StateRequest.java | 1017 +- .../opensearch/cluster/StateResponse.java | 116 +- .../AllocationDecision.java | 261 +- .../AllocationExplainDecision.java | 29 +- .../allocation_explain/AllocationStore.java | 380 +- .../allocation_explain/ClusterInfo.java | 610 +- .../allocation_explain/CurrentNode.java | 380 +- .../cluster/allocation_explain/Decision.java | 35 +- .../cluster/allocation_explain/DiskUsage.java | 379 +- .../NodeAllocationExplanation.java | 627 +- .../allocation_explain/NodeDiskUsage.java | 289 +- .../allocation_explain/ReservedSize.java | 335 +- .../UnassignedInformation.java | 507 +- .../UnassignedInformationReason.java | 51 +- .../cluster/health/IndexHealthStats.java | 607 +- .../cluster/health/ShardHealthStats.java | 381 +- .../cluster/pending_tasks/PendingTask.java | 378 +- .../remote_info/ClusterRemoteInfo.java | 239 +- .../ClusterRemoteInfoBuilders.java | 31 +- .../remote_info/ClusterRemoteInfoVariant.java | 8 +- .../remote_info/ClusterRemoteProxyInfo.java | 484 +- .../remote_info/ClusterRemoteSniffInfo.java | 474 +- .../opensearch/cluster/reroute/Command.java | 696 +- .../reroute/CommandAllocatePrimaryAction.java | 320 +- .../reroute/CommandAllocateReplicaAction.java | 261 +- .../cluster/reroute/CommandCancelAction.java | 311 +- .../cluster/reroute/CommandMoveAction.java | 315 +- .../cluster/reroute/RerouteDecision.java | 261 +- .../cluster/reroute/RerouteExplanation.java | 333 +- .../cluster/reroute/RerouteParameters.java | 414 +- .../cluster/stats/CharFilterTypes.java | 963 +- .../cluster/stats/ClusterFileSystem.java | 261 +- .../cluster/stats/ClusterIndices.java | 989 +- .../cluster/stats/ClusterIndicesShards.java | 405 +- .../stats/ClusterIndicesShardsIndex.java | 361 +- .../cluster/stats/ClusterIngest.java | 279 +- .../opensearch/cluster/stats/ClusterJvm.java | 364 +- .../cluster/stats/ClusterJvmMemory.java | 167 +- .../cluster/stats/ClusterJvmVersion.java | 431 +- .../cluster/stats/ClusterNetworkTypes.java | 304 +- .../cluster/stats/ClusterNodeCount.java | 796 +- .../cluster/stats/ClusterNodes.java | 1119 +- .../cluster/stats/ClusterOperatingSystem.java | 608 +- .../ClusterOperatingSystemArchitecture.java | 220 +- .../stats/ClusterOperatingSystemName.java | 167 +- .../ClusterOperatingSystemPrettyName.java | 218 +- .../cluster/stats/ClusterProcess.java | 247 +- .../cluster/stats/ClusterProcessCpu.java | 124 +- .../ClusterProcessOpenFileDescriptors.java | 264 +- .../cluster/stats/ClusterProcessor.java | 293 +- .../cluster/stats/ClusterShardMetrics.java | 261 +- .../opensearch/cluster/stats/FieldTypes.java | 311 +- .../cluster/stats/FieldTypesMappings.java | 337 +- .../cluster/stats/IndicesVersions.java | 293 +- .../cluster/stats/NodePackagingType.java | 260 +- .../stats/OperatingSystemMemoryInfo.java | 338 +- .../cluster/stats/RuntimeFieldTypes.java | 822 +- .../client/opensearch/core/BulkRequest.java | 1062 +- .../client/opensearch/core/BulkResponse.java | 372 +- .../opensearch/core/ClearScrollRequest.java | 268 +- .../opensearch/core/ClearScrollResponse.java | 166 +- .../client/opensearch/core/CountRequest.java | 1296 +-- .../client/opensearch/core/CountResponse.java | 231 +- .../client/opensearch/core/CreateRequest.java | 880 +- .../opensearch/core/CreateResponse.java | 82 +- .../opensearch/core/DeleteByQueryRequest.java | 2640 ++--- .../core/DeleteByQueryResponse.java | 1005 +- .../core/DeleteByQueryRethrottleRequest.java | 270 +- .../core/DeleteByQueryRethrottleResponse.java | 107 +- .../client/opensearch/core/DeleteRequest.java | 816 +- .../opensearch/core/DeleteResponse.java | 82 +- .../opensearch/core/DeleteScriptRequest.java | 443 +- .../opensearch/core/DeleteScriptResponse.java | 81 +- .../client/opensearch/core/ExistsRequest.java | 966 +- .../opensearch/core/ExistsResponse.java | 15 +- .../opensearch/core/ExistsSourceRequest.java | 881 +- .../opensearch/core/ExistsSourceResponse.java | 16 +- .../opensearch/core/ExplainRequest.java | 1248 +-- .../opensearch/core/ExplainResponse.java | 468 +- .../opensearch/core/FieldCapsRequest.java | 870 +- .../opensearch/core/FieldCapsResponse.java | 323 +- .../client/opensearch/core/GetRequest.java | 989 +- .../client/opensearch/core/GetResponse.java | 137 +- .../core/GetScriptContextRequest.java | 54 +- .../core/GetScriptContextResponse.java | 230 +- .../core/GetScriptLanguagesRequest.java | 54 +- .../core/GetScriptLanguagesResponse.java | 318 +- .../opensearch/core/GetScriptRequest.java | 367 +- .../opensearch/core/GetScriptResponse.java | 288 +- .../opensearch/core/GetSourceRequest.java | 978 +- .../opensearch/core/GetSourceResponse.java | 205 +- .../client/opensearch/core/IndexRequest.java | 1178 +-- .../client/opensearch/core/IndexResponse.java | 82 +- .../client/opensearch/core/InfoRequest.java | 52 +- .../client/opensearch/core/InfoResponse.java | 355 +- .../client/opensearch/core/MgetRequest.java | 1080 +- .../client/opensearch/core/MgetResponse.java | 303 +- .../opensearch/core/MsearchRequest.java | 1037 +- .../opensearch/core/MsearchResponse.java | 137 +- .../core/MsearchTemplateRequest.java | 605 +- .../core/MsearchTemplateResponse.java | 139 +- .../opensearch/core/MtermvectorsRequest.java | 1229 +-- .../opensearch/core/MtermvectorsResponse.java | 229 +- .../client/opensearch/core/PingRequest.java | 54 +- .../client/opensearch/core/PingResponse.java | 16 +- .../opensearch/core/PutScriptRequest.java | 648 +- .../opensearch/core/PutScriptResponse.java | 81 +- .../opensearch/core/RankEvalRequest.java | 827 +- .../opensearch/core/RankEvalResponse.java | 399 +- .../opensearch/core/ReindexRequest.java | 1148 +-- .../opensearch/core/ReindexResponse.java | 1138 ++- .../core/ReindexRethrottleRequest.java | 267 +- .../core/ReindexRethrottleResponse.java | 232 +- .../core/RenderSearchTemplateRequest.java | 490 +- .../core/RenderSearchTemplateResponse.java | 212 +- .../core/ScriptsPainlessExecuteRequest.java | 415 +- .../core/ScriptsPainlessExecuteResponse.java | 238 +- .../client/opensearch/core/ScrollRequest.java | 341 +- .../opensearch/core/ScrollResponse.java | 136 +- .../client/opensearch/core/SearchRequest.java | 4228 ++++---- .../opensearch/core/SearchResponse.java | 122 +- .../opensearch/core/SearchShardsRequest.java | 664 +- .../opensearch/core/SearchShardsResponse.java | 443 +- .../core/SearchTemplateRequest.java | 1316 +-- .../core/SearchTemplateResponse.java | 135 +- .../opensearch/core/TermsEnumRequest.java | 775 +- .../opensearch/core/TermsEnumResponse.java | 317 +- .../opensearch/core/TermvectorsRequest.java | 1320 +-- .../opensearch/core/TermvectorsResponse.java | 453 +- .../opensearch/core/UpdateByQueryRequest.java | 2762 ++--- .../core/UpdateByQueryResponse.java | 1005 +- .../core/UpdateByQueryRethrottleRequest.java | 270 +- .../core/UpdateByQueryRethrottleResponse.java | 238 +- .../client/opensearch/core/UpdateRequest.java | 1570 +-- .../opensearch/core/UpdateResponse.java | 263 +- .../opensearch/core/bulk/BulkOperation.java | 413 +- .../core/bulk/BulkOperationBase.java | 477 +- .../core/bulk/BulkOperationBuilders.java | 59 +- .../core/bulk/BulkOperationVariant.java | 8 +- .../core/bulk/BulkResponseItem.java | 848 +- .../opensearch/core/bulk/CreateOperation.java | 186 +- .../opensearch/core/bulk/DeleteOperation.java | 120 +- .../opensearch/core/bulk/IndexOperation.java | 186 +- .../opensearch/core/bulk/OperationType.java | 28 +- .../opensearch/core/bulk/UpdateOperation.java | 376 +- .../core/bulk/UpdateOperationData.java | 16 +- .../opensearch/core/bulk/WriteOperation.java | 126 +- .../opensearch/core/explain/Explanation.java | 319 +- .../core/explain/ExplanationDetail.java | 323 +- .../core/field_caps/FieldCapability.java | 716 +- .../client/opensearch/core/get/GetResult.java | 723 +- .../core/get_script_context/Context.java | 273 +- .../get_script_context/ContextMethod.java | 315 +- .../ContextMethodParam.java | 167 +- .../get_script_languages/LanguageContext.java | 255 +- .../opensearch/core/mget/MultiGetError.java | 278 +- .../core/mget/MultiGetOperation.java | 569 +- .../core/mget/MultiGetResponseItem.java | 258 +- .../mget/MultiGetResponseItemBuilders.java | 35 +- .../core/msearch/MultiSearchItem.java | 185 +- .../core/msearch/MultiSearchResponseItem.java | 261 +- .../MultiSearchResponseItemBuilders.java | 35 +- .../core/msearch/MultiSearchResult.java | 275 +- .../core/msearch/MultisearchBody.java | 1214 ++- .../core/msearch/MultisearchHeader.java | 649 +- .../opensearch/core/msearch/RequestItem.java | 224 +- .../core/msearch_template/RequestItem.java | 226 +- .../core/msearch_template/TemplateConfig.java | 475 +- .../MultiTermVectorsOperation.java | 797 +- .../mtermvectors/MultiTermVectorsResult.java | 450 +- .../opensearch/core/pit/CreatePitRequest.java | 93 +- .../core/pit/CreatePitResponse.java | 17 +- .../opensearch/core/pit/DeletePitRecord.java | 12 +- .../opensearch/core/pit/DeletePitRequest.java | 54 +- .../core/pit/DeletePitResponse.java | 18 +- .../core/pit/ListAllPitRequest.java | 22 +- .../core/pit/ListAllPitResponse.java | 20 +- .../client/opensearch/core/pit/PitRecord.java | 12 +- .../core/rank_eval/DocumentRating.java | 291 +- .../core/rank_eval/RankEvalHit.java | 262 +- .../core/rank_eval/RankEvalHitItem.java | 243 +- .../core/rank_eval/RankEvalMetric.java | 497 +- .../core/rank_eval/RankEvalMetricBase.java | 109 +- .../core/rank_eval/RankEvalMetricDetail.java | 589 +- ...ankEvalMetricDiscountedCumulativeGain.java | 195 +- .../RankEvalMetricExpectedReciprocalRank.java | 183 +- .../RankEvalMetricMeanReciprocalRank.java | 109 +- .../rank_eval/RankEvalMetricPrecision.java | 199 +- .../RankEvalMetricRatingTreshold.java | 127 +- .../core/rank_eval/RankEvalMetricRecall.java | 107 +- .../core/rank_eval/RankEvalQuery.java | 246 +- .../core/rank_eval/RankEvalRequestItem.java | 555 +- .../core/rank_eval/UnratedDocument.java | 167 +- .../opensearch/core/reindex/Destination.java | 440 +- .../opensearch/core/reindex/RemoteSource.java | 367 +- .../opensearch/core/reindex/Source.java | 801 +- .../core/reindex_rethrottle/ReindexNode.java | 227 +- .../reindex_rethrottle/ReindexStatus.java | 654 +- .../core/reindex_rethrottle/ReindexTask.java | 670 +- .../PainlessContextSetup.java | 276 +- .../core/search/AggregationBreakdown.java | 719 +- .../core/search/AggregationProfile.java | 492 +- .../core/search/AggregationProfileDebug.java | 1442 +-- .../AggregationProfileDelegateDebug.java | 472 +- ...AggregationProfileDelegateDebugFilter.java | 304 +- .../core/search/BoundaryScanner.java | 25 +- .../core/search/BuiltinHighlighterType.java | 27 +- .../opensearch/core/search/Collector.java | 357 +- .../core/search/CompletionContext.java | 487 +- .../core/search/CompletionSuggest.java | 51 +- .../core/search/CompletionSuggestOption.java | 733 +- .../core/search/CompletionSuggester.java | 495 +- .../opensearch/core/search/Context.java | 245 +- .../core/search/ContextBuilders.java | 19 +- .../core/search/DirectGenerator.java | 751 +- .../opensearch/core/search/FetchProfile.java | 494 +- .../core/search/FetchProfileBreakdown.java | 471 +- .../core/search/FetchProfileDebug.java | 272 +- .../opensearch/core/search/FieldCollapse.java | 335 +- .../core/search/FieldSuggester.java | 546 +- .../core/search/FieldSuggesterBuilders.java | 47 +- .../core/search/FieldSuggesterVariant.java | 8 +- .../opensearch/core/search/Highlight.java | 1407 ++- .../core/search/HighlightField.java | 1446 ++- .../core/search/HighlighterEncoder.java | 23 +- .../core/search/HighlighterFragmenter.java | 25 +- .../core/search/HighlighterOrder.java | 21 +- .../core/search/HighlighterTagsSchema.java | 23 +- .../core/search/HighlighterType.java | 259 +- .../core/search/HighlighterTypeBuilders.java | 5 +- .../client/opensearch/core/search/Hit.java | 1431 ++- .../opensearch/core/search/HitsMetadata.java | 391 +- .../opensearch/core/search/InnerHits.java | 1311 ++- .../core/search/InnerHitsResult.java | 138 +- .../core/search/LaplaceSmoothingModel.java | 139 +- .../LinearInterpolationSmoothingModel.java | 281 +- .../core/search/NestedIdentity.java | 287 +- .../opensearch/core/search/PhraseSuggest.java | 13 +- .../core/search/PhraseSuggestCollate.java | 334 +- .../search/PhraseSuggestCollateQuery.java | 17 +- .../core/search/PhraseSuggestHighlight.java | 168 +- .../core/search/PhraseSuggestOption.java | 276 +- .../core/search/PhraseSuggester.java | 985 +- .../client/opensearch/core/search/Pit.java | 8 +- .../opensearch/core/search/Profile.java | 226 +- .../core/search/QueryBreakdown.java | 882 +- .../opensearch/core/search/QueryProfile.java | 411 +- .../opensearch/core/search/Rescore.java | 243 +- .../opensearch/core/search/RescoreQuery.java | 359 +- .../opensearch/core/search/ScoreMode.java | 30 +- .../opensearch/core/search/SearchProfile.java | 375 +- .../opensearch/core/search/SearchResult.java | 1159 ++- .../opensearch/core/search/ShardProfile.java | 440 +- .../core/search/SmoothingModel.java | 367 +- .../core/search/SmoothingModelBuilders.java | 45 +- .../core/search/SmoothingModelVariant.java | 8 +- .../opensearch/core/search/SourceConfig.java | 243 +- .../core/search/SourceConfigBuilders.java | 19 +- .../core/search/SourceConfigParam.java | 283 +- .../search/SourceConfigParamBuilders.java | 5 +- .../opensearch/core/search/SourceFilter.java | 306 +- .../core/search/StringDistance.java | 30 +- .../search/StupidBackoffSmoothingModel.java | 15 +- .../opensearch/core/search/Suggest.java | 307 +- .../opensearch/core/search/SuggestBase.java | 167 +- .../core/search/SuggestFuzziness.java | 337 +- .../core/search/SuggestOptionBuilders.java | 45 +- .../opensearch/core/search/SuggestSort.java | 24 +- .../core/search/SuggestVariant.java | 4 +- .../opensearch/core/search/Suggester.java | 310 +- .../opensearch/core/search/SuggesterBase.java | 235 +- .../opensearch/core/search/TermSuggest.java | 12 +- .../core/search/TermSuggestOption.java | 274 +- .../opensearch/core/search/TermSuggester.java | 827 +- .../opensearch/core/search/TotalHits.java | 213 +- .../core/search/TotalHitsRelation.java | 36 +- .../opensearch/core/search/TrackHits.java | 265 +- .../core/search/TrackHitsBuilders.java | 5 +- .../core/search_shards/ShardStoreIndex.java | 288 +- .../core/termvectors/FieldStatistics.java | 261 +- .../opensearch/core/termvectors/Filter.java | 528 +- .../opensearch/core/termvectors/Term.java | 444 +- .../core/termvectors/TermVector.java | 295 +- .../opensearch/core/termvectors/Token.java | 335 +- .../UpdateByQueryRethrottleNode.java | 231 +- .../DeleteDanglingIndexRequest.java | 494 +- .../DeleteDanglingIndexResponse.java | 108 +- .../ImportDanglingIndexRequest.java | 496 +- .../ImportDanglingIndexResponse.java | 108 +- .../ListDanglingIndicesRequest.java | 55 +- .../ListDanglingIndicesResponse.java | 231 +- .../OpenSearchDanglingIndicesAsyncClient.java | 203 +- .../OpenSearchDanglingIndicesClient.java | 200 +- .../list_dangling_indices/DanglingIndex.java | 335 +- .../client/opensearch/features/Feature.java | 167 +- .../features/GetFeaturesRequest.java | 54 +- .../features/GetFeaturesResponse.java | 226 +- .../OpenSearchFeaturesAsyncClient.java | 72 +- .../features/OpenSearchFeaturesClient.java | 65 +- .../features/ResetFeaturesRequest.java | 54 +- .../features/ResetFeaturesResponse.java | 226 +- .../opensearch/indices/AddBlockRequest.java | 729 +- .../opensearch/indices/AddBlockResponse.java | 277 +- .../client/opensearch/indices/Alias.java | 487 +- .../opensearch/indices/AliasDefinition.java | 429 +- .../opensearch/indices/AnalyzeRequest.java | 977 +- .../opensearch/indices/AnalyzeResponse.java | 307 +- .../opensearch/indices/ClearCacheRequest.java | 744 +- .../indices/ClearCacheResponse.java | 81 +- .../opensearch/indices/CloneIndexRequest.java | 847 +- .../indices/CloneIndexResponse.java | 214 +- .../opensearch/indices/CloseIndexRequest.java | 796 +- .../indices/CloseIndexResponse.java | 279 +- .../indices/CreateDataStreamRequest.java | 54 +- .../indices/CreateDataStreamResponse.java | 13 +- .../indices/CreateIndexRequest.java | 883 +- .../indices/CreateIndexResponse.java | 272 +- .../client/opensearch/indices/DataStream.java | 211 +- .../indices/DataStreamIndexInfo.java | 9 +- .../opensearch/indices/DataStreamInfo.java | 12 +- .../opensearch/indices/DataStreamStats.java | 11 +- .../indices/DataStreamTimestampField.java | 11 +- .../indices/DataStreamsStatsRequest.java | 95 +- .../indices/DataStreamsStatsResponse.java | 13 +- .../indices/DeleteAliasRequest.java | 591 +- .../indices/DeleteAliasResponse.java | 81 +- .../indices/DeleteDataStreamRequest.java | 58 +- .../indices/DeleteDataStreamResponse.java | 15 +- .../indices/DeleteIndexRequest.java | 697 +- .../indices/DeleteIndexResponse.java | 81 +- .../indices/DeleteIndexTemplateRequest.java | 196 +- .../indices/DeleteIndexTemplateResponse.java | 108 +- .../indices/DeleteTemplateRequest.java | 445 +- .../indices/DeleteTemplateResponse.java | 82 +- .../opensearch/indices/DiskUsageRequest.java | 847 +- .../opensearch/indices/DiskUsageResponse.java | 116 +- .../indices/ExistsAliasRequest.java | 624 +- .../indices/ExistsAliasResponse.java | 15 +- .../indices/ExistsIndexTemplateRequest.java | 385 +- .../indices/ExistsIndexTemplateResponse.java | 17 +- .../opensearch/indices/ExistsRequest.java | 633 +- .../opensearch/indices/ExistsResponse.java | 15 +- .../indices/ExistsTemplateRequest.java | 525 +- .../indices/ExistsTemplateResponse.java | 17 +- .../indices/FielddataFrequencyFilter.java | 261 +- .../opensearch/indices/FlushRequest.java | 618 +- .../opensearch/indices/FlushResponse.java | 81 +- .../opensearch/indices/ForcemergeRequest.java | 660 +- .../indices/ForcemergeResponse.java | 81 +- .../opensearch/indices/GetAliasRequest.java | 649 +- .../opensearch/indices/GetAliasResponse.java | 112 +- .../indices/GetDataStreamRequest.java | 78 +- .../indices/GetDataStreamResponse.java | 11 +- .../indices/GetFieldMappingRequest.java | 688 +- .../indices/GetFieldMappingResponse.java | 113 +- .../opensearch/indices/GetIndexRequest.java | 821 +- .../opensearch/indices/GetIndexResponse.java | 111 +- .../indices/GetIndexTemplateRequest.java | 524 +- .../indices/GetIndexTemplateResponse.java | 231 +- .../indices/GetIndicesSettingsRequest.java | 941 +- .../indices/GetIndicesSettingsResponse.java | 111 +- .../opensearch/indices/GetMappingRequest.java | 700 +- .../indices/GetMappingResponse.java | 116 +- .../indices/GetTemplateRequest.java | 536 +- .../indices/GetTemplateResponse.java | 110 +- .../opensearch/indices/GetUpgradeRequest.java | 218 +- .../indices/GetUpgradeResponse.java | 339 +- .../indices/IndexCheckOnStartup.java | 28 +- .../opensearch/indices/IndexRouting.java | 270 +- .../indices/IndexRoutingAllocation.java | 403 +- .../indices/IndexRoutingAllocationDisk.java | 138 +- .../IndexRoutingAllocationInclude.java | 240 +- ...IndexRoutingAllocationInitialRecovery.java | 144 +- .../IndexRoutingAllocationOptions.java | 30 +- .../indices/IndexRoutingRebalance.java | 126 +- .../indices/IndexRoutingRebalanceOptions.java | 30 +- .../opensearch/indices/IndexSegmentSort.java | 467 +- .../indices/IndexSettingBlocks.java | 413 +- .../opensearch/indices/IndexSettings.java | 3652 +++---- .../indices/IndexSettingsAnalysis.java | 676 +- .../indices/IndexSettingsMapping.java | 472 +- .../indices/IndexSettingsMappingLimit.java | 163 +- .../client/opensearch/indices/IndexState.java | 528 +- .../opensearch/indices/IndexVersioning.java | 125 +- .../indices/IndicesStatsRequest.java | 1157 ++- .../indices/IndicesStatsResponse.java | 359 +- .../opensearch/indices/NumericFielddata.java | 126 +- .../indices/NumericFielddataFormat.java | 25 +- .../opensearch/indices/OpenRequest.java | 778 +- .../opensearch/indices/OpenResponse.java | 127 +- .../indices/OpenSearchIndicesAsyncClient.java | 3740 +++---- .../indices/OpenSearchIndicesClient.java | 3613 +++---- .../indices/OverlappingIndexTemplate.java | 263 +- .../opensearch/indices/PutAliasRequest.java | 932 +- .../opensearch/indices/PutAliasResponse.java | 81 +- .../indices/PutIndexTemplateRequest.java | 794 +- .../indices/PutIndexTemplateResponse.java | 108 +- .../indices/PutIndicesSettingsRequest.java | 956 +- .../indices/PutIndicesSettingsResponse.java | 108 +- .../opensearch/indices/PutMappingRequest.java | 1823 ++-- .../indices/PutMappingResponse.java | 81 +- .../indices/PutTemplateRequest.java | 1193 +-- .../indices/PutTemplateResponse.java | 81 +- .../opensearch/indices/RecoveryRequest.java | 372 +- .../opensearch/indices/RecoveryResponse.java | 112 +- .../opensearch/indices/RefreshRequest.java | 476 +- .../opensearch/indices/RefreshResponse.java | 81 +- .../indices/ResolveIndexRequest.java | 327 +- .../indices/ResolveIndexResponse.java | 335 +- .../opensearch/indices/RolloverRequest.java | 1083 +- .../opensearch/indices/RolloverResponse.java | 423 +- .../indices/SegmentSortMissing.java | 24 +- .../opensearch/indices/SegmentSortMode.java | 24 +- .../opensearch/indices/SegmentSortOrder.java | 24 +- .../opensearch/indices/SegmentsRequest.java | 536 +- .../opensearch/indices/SegmentsResponse.java | 293 +- .../indices/ShardStoresRequest.java | 557 +- .../indices/ShardStoresResponse.java | 232 +- .../opensearch/indices/ShrinkRequest.java | 849 +- .../opensearch/indices/ShrinkResponse.java | 214 +- .../indices/SimulateIndexTemplateRequest.java | 1114 +- .../SimulateIndexTemplateResponse.java | 17 +- .../indices/SimulateTemplateRequest.java | 593 +- .../indices/SimulateTemplateResponse.java | 140 +- .../opensearch/indices/SoftDeletes.java | 125 +- .../opensearch/indices/SplitRequest.java | 847 +- .../opensearch/indices/SplitResponse.java | 214 +- .../opensearch/indices/TemplateMapping.java | 577 +- .../client/opensearch/indices/Translog.java | 12 +- .../indices/UpdateAliasesRequest.java | 545 +- .../indices/UpdateAliasesResponse.java | 81 +- .../opensearch/indices/UpgradeRequest.java | 578 +- .../opensearch/indices/UpgradeResponse.java | 81 +- .../indices/ValidateQueryRequest.java | 1175 +-- .../indices/ValidateQueryResponse.java | 403 +- .../add_block/IndicesBlockOptions.java | 29 +- .../indices/add_block/IndicesBlockStatus.java | 166 +- .../indices/analyze/AnalyzeDetail.java | 530 +- .../indices/analyze/AnalyzeToken.java | 397 +- .../indices/analyze/AnalyzerDetail.java | 275 +- .../indices/analyze/CharFilterDetail.java | 256 +- .../indices/analyze/ExplainAnalyzeToken.java | 551 +- .../indices/analyze/TokenDetail.java | 275 +- .../indices/close/CloseIndexResult.java | 281 +- .../indices/close/CloseShardResult.java | 228 +- .../indices/get_alias/IndexAliases.java | 230 +- .../get_field_mapping/TypeFieldMappings.java | 232 +- .../get_index_template/IndexTemplate.java | 726 +- .../get_index_template/IndexTemplateItem.java | 228 +- .../IndexTemplateSummary.java | 396 +- .../get_mapping/IndexMappingRecord.java | 257 +- .../IndexTemplateMapping.java | 382 +- .../indices/recovery/FileDetails.java | 261 +- .../indices/recovery/RecoveryBytes.java | 604 +- .../indices/recovery/RecoveryFiles.java | 400 +- .../indices/recovery/RecoveryIndexStatus.java | 693 +- .../indices/recovery/RecoveryOrigin.java | 819 +- .../indices/recovery/RecoveryStartStatus.java | 167 +- .../indices/recovery/RecoveryStatus.java | 227 +- .../indices/recovery/ShardRecovery.java | 1001 +- .../indices/recovery/TranslogStatus.java | 395 +- .../indices/recovery/VerifyIndex.java | 358 +- .../resolve_index/ResolveIndexAliasItem.java | 257 +- .../resolve_index/ResolveIndexItem.java | 390 +- .../rollover/IndexRolloverMapping.java | 261 +- .../IndexRolloverMappingBuilders.java | 19 +- .../indices/rollover/RolloverConditions.java | 371 +- .../indices/segments/IndexSegment.java | 231 +- .../opensearch/indices/segments/Segment.java | 632 +- .../indices/segments/ShardSegmentRouting.java | 261 +- .../indices/segments/ShardsSegment.java | 370 +- .../shard_stores/IndicesShardStores.java | 230 +- .../indices/shard_stores/ShardStore.java | 548 +- .../shard_stores/ShardStoreAllocation.java | 27 +- .../shard_stores/ShardStoreException.java | 167 +- .../shard_stores/ShardStoreStatus.java | 52 +- .../shard_stores/ShardStoreWrapper.java | 227 +- .../simulate_template/Overlapping.java | 257 +- .../indices/simulate_template/Template.java | 474 +- .../opensearch/indices/stats/IndexStats.java | 1648 +-- .../indices/stats/IndicesStats.java | 407 +- .../opensearch/indices/stats/ShardCommit.java | 338 +- .../indices/stats/ShardFileSizeInfo.java | 451 +- .../opensearch/indices/stats/ShardLease.java | 293 +- .../opensearch/indices/stats/ShardPath.java | 261 +- .../indices/stats/ShardQueryCache.java | 430 +- .../indices/stats/ShardRetentionLeases.java | 315 +- .../indices/stats/ShardRouting.java | 311 +- .../indices/stats/ShardRoutingState.java | 28 +- .../indices/stats/ShardSequenceNumber.java | 261 +- .../opensearch/indices/stats/ShardStats.java | 1415 ++- .../indices/stats/ShardsTotalStats.java | 125 +- .../indices/update_aliases/Action.java | 359 +- .../update_aliases/ActionBuilders.java | 47 +- .../indices/update_aliases/ActionVariant.java | 8 +- .../indices/update_aliases/AddAction.java | 799 +- .../indices/update_aliases/RemoveAction.java | 493 +- .../update_aliases/RemoveIndexAction.java | 288 +- .../IndicesValidationExplanation.java | 327 +- .../opensearch/ingest/AppendProcessor.java | 329 +- .../ingest/AttachmentProcessor.java | 566 +- .../opensearch/ingest/BytesProcessor.java | 301 +- .../opensearch/ingest/CircleProcessor.java | 351 +- .../opensearch/ingest/ConvertProcessor.java | 327 +- .../client/opensearch/ingest/ConvertType.java | 34 +- .../opensearch/ingest/CsvProcessor.java | 598 +- .../ingest/DateIndexNameProcessor.java | 533 +- .../opensearch/ingest/DateProcessor.java | 444 +- .../ingest/DeletePipelineRequest.java | 447 +- .../ingest/DeletePipelineResponse.java | 83 +- .../opensearch/ingest/DissectProcessor.java | 311 +- .../ingest/DotExpanderProcessor.java | 243 +- .../opensearch/ingest/DropProcessor.java | 118 +- .../opensearch/ingest/FailProcessor.java | 179 +- .../opensearch/ingest/ForeachProcessor.java | 303 +- .../opensearch/ingest/GeoIpProcessor.java | 444 +- .../opensearch/ingest/GeoIpStatsRequest.java | 54 +- .../opensearch/ingest/GeoIpStatsResponse.java | 324 +- .../opensearch/ingest/GetPipelineRequest.java | 448 +- .../ingest/GetPipelineResponse.java | 110 +- .../opensearch/ingest/GrokProcessor.java | 484 +- .../opensearch/ingest/GsubProcessor.java | 375 +- .../opensearch/ingest/InferenceConfig.java | 151 +- .../ingest/InferenceConfigRegression.java | 126 +- .../opensearch/ingest/InferenceProcessor.java | 383 +- .../opensearch/ingest/JoinProcessor.java | 285 +- .../opensearch/ingest/JsonProcessor.java | 271 +- .../opensearch/ingest/KeyValueProcessor.java | 806 +- .../opensearch/ingest/LowercaseProcessor.java | 301 +- .../ingest/OpenSearchIngestAsyncClient.java | 389 +- .../ingest/OpenSearchIngestClient.java | 375 +- .../client/opensearch/ingest/Pipeline.java | 451 +- .../opensearch/ingest/PipelineProcessor.java | 181 +- .../client/opensearch/ingest/Processor.java | 2080 ++-- .../opensearch/ingest/ProcessorBase.java | 355 +- .../opensearch/ingest/ProcessorBuilders.java | 525 +- .../ingest/ProcessorGrokRequest.java | 54 +- .../ingest/ProcessorGrokResponse.java | 211 +- .../opensearch/ingest/ProcessorVariant.java | 8 +- .../opensearch/ingest/PutPipelineRequest.java | 968 +- .../ingest/PutPipelineResponse.java | 81 +- .../opensearch/ingest/RemoveProcessor.java | 283 +- .../opensearch/ingest/RenameProcessor.java | 289 +- .../opensearch/ingest/SetProcessor.java | 287 +- .../ingest/SetSecurityUserProcessor.java | 277 +- .../client/opensearch/ingest/ShapeType.java | 24 +- .../opensearch/ingest/SimulateRequest.java | 529 +- .../opensearch/ingest/SimulateResponse.java | 228 +- .../opensearch/ingest/SortProcessor.java | 275 +- .../opensearch/ingest/SplitProcessor.java | 405 +- .../opensearch/ingest/TrimProcessor.java | 299 +- .../opensearch/ingest/UppercaseProcessor.java | 301 +- .../opensearch/ingest/UrlDecodeProcessor.java | 301 +- .../opensearch/ingest/UserAgentProcessor.java | 397 +- .../opensearch/ingest/UserAgentProperty.java | 40 +- .../geo_ip_stats/GeoIpDownloadStatistics.java | 393 +- .../geo_ip_stats/GeoIpNodeDatabaseName.java | 133 +- .../geo_ip_stats/GeoIpNodeDatabases.java | 355 +- .../opensearch/ingest/simulate/Document.java | 284 +- .../ingest/simulate/DocumentSimulation.java | 544 +- .../opensearch/ingest/simulate/Ingest.java | 228 +- .../ingest/simulate/PipelineSimulation.java | 478 +- .../opensearch/nodes/AdaptiveSelection.java | 337 +- .../client/opensearch/nodes/Breaker.java | 379 +- .../client/opensearch/nodes/Cpu.java | 608 +- .../opensearch/nodes/DataPathStats.java | 379 +- .../opensearch/nodes/ExtendedMemoryStats.java | 212 +- .../client/opensearch/nodes/FileSystem.java | 335 +- .../opensearch/nodes/FileSystemTotal.java | 219 +- .../opensearch/nodes/GarbageCollector.java | 231 +- .../nodes/GarbageCollectorTotal.java | 168 +- .../opensearch/nodes/HotThreadsRequest.java | 930 +- .../opensearch/nodes/HotThreadsResponse.java | 229 +- .../client/opensearch/nodes/Http.java | 160 +- .../client/opensearch/nodes/Ingest.java | 289 +- .../client/opensearch/nodes/IngestTotal.java | 293 +- .../client/opensearch/nodes/Jvm.java | 556 +- .../client/opensearch/nodes/JvmClasses.java | 260 +- .../client/opensearch/nodes/JvmThreads.java | 167 +- .../opensearch/nodes/KeyedProcessor.java | 229 +- .../client/opensearch/nodes/MemoryStats.java | 654 +- .../opensearch/nodes/NodeBufferPool.java | 262 +- .../opensearch/nodes/NodesInfoRequest.java | 691 +- .../opensearch/nodes/NodesInfoResponse.java | 278 +- .../opensearch/nodes/NodesResponseBase.java | 150 +- .../opensearch/nodes/NodesStatsRequest.java | 1379 ++- .../opensearch/nodes/NodesStatsResponse.java | 275 +- .../opensearch/nodes/NodesUsageRequest.java | 461 +- .../opensearch/nodes/NodesUsageResponse.java | 278 +- .../nodes/OpenSearchNodesAsyncClient.java | 475 +- .../nodes/OpenSearchNodesClient.java | 448 +- .../opensearch/nodes/OperatingSystem.java | 335 +- .../client/opensearch/nodes/Process.java | 326 +- .../nodes/ReloadSecureSettingsRequest.java | 457 +- .../nodes/ReloadSecureSettingsResponse.java | 278 +- .../client/opensearch/nodes/Scripting.java | 167 +- .../client/opensearch/nodes/Stats.java | 1378 ++- .../client/opensearch/nodes/ThreadCount.java | 379 +- .../client/opensearch/nodes/Transport.java | 337 +- .../nodes/hot_threads/HotThread.java | 374 +- .../opensearch/nodes/info/NodeInfo.java | 1782 ++-- .../opensearch/nodes/info/NodeInfoAction.java | 125 +- .../nodes/info/NodeInfoAggregation.java | 208 +- .../nodes/info/NodeInfoBootstrap.java | 124 +- .../opensearch/nodes/info/NodeInfoClient.java | 124 +- .../nodes/info/NodeInfoDiscover.java | 174 +- .../opensearch/nodes/info/NodeInfoHttp.java | 354 +- .../opensearch/nodes/info/NodeInfoIngest.java | 228 +- .../nodes/info/NodeInfoIngestDownloader.java | 125 +- .../nodes/info/NodeInfoIngestInfo.java | 138 +- .../nodes/info/NodeInfoIngestProcessor.java | 125 +- .../nodes/info/NodeInfoJvmMemory.java | 650 +- .../opensearch/nodes/info/NodeInfoMemory.java | 166 +- .../nodes/info/NodeInfoNetwork.java | 229 +- .../nodes/info/NodeInfoNetworkInterface.java | 261 +- .../opensearch/nodes/info/NodeInfoOSCPU.java | 480 +- .../opensearch/nodes/info/NodeInfoPath.java | 378 +- .../nodes/info/NodeInfoRepositories.java | 137 +- .../nodes/info/NodeInfoRepositoriesUrl.java | 125 +- .../opensearch/nodes/info/NodeInfoScript.java | 229 +- .../opensearch/nodes/info/NodeInfoSearch.java | 137 +- .../nodes/info/NodeInfoSearchRemote.java | 124 +- .../nodes/info/NodeInfoSettings.java | 1076 +- .../nodes/info/NodeInfoSettingsCluster.java | 453 +- .../info/NodeInfoSettingsClusterElection.java | 126 +- .../nodes/info/NodeInfoSettingsHttp.java | 349 +- .../nodes/info/NodeInfoSettingsHttpType.java | 127 +- .../nodes/info/NodeInfoSettingsIngest.java | 2381 +++-- .../nodes/info/NodeInfoSettingsNetwork.java | 125 +- .../nodes/info/NodeInfoSettingsNode.java | 322 +- .../nodes/info/NodeInfoSettingsTransport.java | 244 +- .../info/NodeInfoSettingsTransportType.java | 127 +- .../nodes/info/NodeInfoTransport.java | 342 +- .../opensearch/nodes/info/NodeJvmInfo.java | 892 +- .../nodes/info/NodeOperatingSystemInfo.java | 743 +- .../nodes/info/NodeProcessInfo.java | 291 +- .../nodes/info/NodeThreadPoolInfo.java | 448 +- .../NodeReloadError.java | 244 +- .../NodeReloadResult.java | 240 +- .../NodeReloadResultBuilders.java | 35 +- .../opensearch/nodes/usage/NodeUsage.java | 377 +- .../shutdown/DeleteNodeRequest.java | 197 +- .../shutdown/DeleteNodeResponse.java | 81 +- .../opensearch/shutdown/GetNodeRequest.java | 247 +- .../opensearch/shutdown/GetNodeResponse.java | 229 +- .../OpenSearchShutdownAsyncClient.java | 276 +- .../shutdown/OpenSearchShutdownClient.java | 261 +- .../opensearch/shutdown/PutNodeRequest.java | 197 +- .../opensearch/shutdown/PutNodeResponse.java | 81 +- .../shutdown/get_node/NodeShutdownStatus.java | 533 +- .../get_node/PersistentTaskStatus.java | 125 +- .../shutdown/get_node/PluginsStatus.java | 125 +- .../get_node/ShardMigrationStatus.java | 125 +- .../shutdown/get_node/ShutdownStatus.java | 27 +- .../shutdown/get_node/ShutdownType.java | 23 +- .../snapshot/CleanupRepositoryRequest.java | 447 +- .../snapshot/CleanupRepositoryResponse.java | 141 +- .../snapshot/CloneSnapshotRequest.java | 652 +- .../snapshot/CloneSnapshotResponse.java | 81 +- .../snapshot/CreateRepositoryRequest.java | 749 +- .../snapshot/CreateRepositoryResponse.java | 108 +- .../snapshot/CreateSnapshotRequest.java | 1156 +-- .../snapshot/CreateSnapshotResponse.java | 241 +- .../snapshot/DeleteRepositoryRequest.java | 481 +- .../snapshot/DeleteRepositoryResponse.java | 108 +- .../snapshot/DeleteSnapshotRequest.java | 417 +- .../snapshot/DeleteSnapshotResponse.java | 82 +- .../snapshot/FileCountSnapshotStats.java | 167 +- .../snapshot/GetRepositoryRequest.java | 474 +- .../snapshot/GetRepositoryResponse.java | 110 +- .../snapshot/GetSnapshotRequest.java | 832 +- .../snapshot/GetSnapshotResponse.java | 463 +- .../opensearch/snapshot/IndexDetails.java | 311 +- .../opensearch/snapshot/InfoFeatureState.java | 257 +- .../OpenSearchSnapshotAsyncClient.java | 822 +- .../snapshot/OpenSearchSnapshotClient.java | 795 +- .../opensearch/snapshot/Repository.java | 288 +- .../snapshot/RepositorySettings.java | 402 +- .../opensearch/snapshot/RestoreRequest.java | 1154 +-- .../opensearch/snapshot/RestoreResponse.java | 139 +- .../opensearch/snapshot/ShardsStats.java | 378 +- .../opensearch/snapshot/ShardsStatsStage.java | 69 +- .../snapshot/ShardsStatsSummary.java | 321 +- .../snapshot/ShardsStatsSummaryItem.java | 167 +- .../snapshot/SnapshotIndexStats.java | 351 +- .../opensearch/snapshot/SnapshotInfo.java | 1591 ++- .../snapshot/SnapshotShardFailure.java | 336 +- .../snapshot/SnapshotShardsStatus.java | 227 +- .../opensearch/snapshot/SnapshotStats.java | 322 +- .../snapshot/SnapshotStatusRequest.java | 560 +- .../snapshot/SnapshotStatusResponse.java | 227 +- .../client/opensearch/snapshot/Status.java | 580 +- .../snapshot/VerifyRepositoryRequest.java | 445 +- .../snapshot/VerifyRepositoryResponse.java | 231 +- .../CleanupRepositoryResults.java | 167 +- .../snapshot/get/SnapshotResponseItem.java | 353 +- .../snapshot/restore/SnapshotRestore.java | 319 +- .../verify_repository/CompactNodeInfo.java | 124 +- .../opensearch/tasks/CancelRequest.java | 538 +- .../opensearch/tasks/CancelResponse.java | 343 +- .../opensearch/tasks/GetTasksRequest.java | 337 +- .../opensearch/tasks/GetTasksResponse.java | 366 +- .../client/opensearch/tasks/GroupBy.java | 25 +- .../client/opensearch/tasks/Info.java | 861 +- .../client/opensearch/tasks/ListRequest.java | 637 +- .../client/opensearch/tasks/ListResponse.java | 478 +- .../tasks/OpenSearchTasksAsyncClient.java | 268 +- .../tasks/OpenSearchTasksClient.java | 262 +- .../client/opensearch/tasks/State.java | 756 +- .../client/opensearch/tasks/Status.java | 1044 +- .../opensearch/tasks/TaskExecutingNode.java | 228 +- .../opensearch/watcher/HourAndMinute.java | 295 +- .../client/opensearch/watcher/TimeOfDay.java | 244 +- .../opensearch/watcher/TimeOfDayBuilders.java | 19 +- .../opensearch/client/transport/Endpoint.java | 67 +- .../client/transport/Transport.java | 7 +- .../client/transport/TransportException.java | 1 - .../client/transport/TransportHeaders.java | 3 +- .../client/transport/TransportOptions.java | 14 +- .../opensearch/client/transport/Version.java | 16 +- .../aws/AsyncByteArrayContentPublisher.java | 7 +- .../aws/AsyncCapturingResponseHandler.java | 7 +- .../aws/AsyncCapturingSubscriber.java | 5 +- .../transport/aws/AwsSdk2Transport.java | 236 +- .../aws/AwsSdk2TransportOptions.java | 8 +- .../transport/endpoints/BooleanEndpoint.java | 6 +- .../endpoints/DelegatingJsonEndpoint.java | 5 +- .../endpoints/DictionaryResponse.java | 29 +- .../EndpointWithResponseMapperAttr.java | 5 +- .../transport/endpoints/SimpleEndpoint.java | 26 +- .../httpclient5/ApacheHttpClient5Options.java | 50 +- .../ApacheHttpClient5Transport.java | 157 +- .../ApacheHttpClient5TransportBuilder.java | 29 +- .../HttpAsyncResponseConsumerFactory.java | 3 +- .../transport/httpclient5/Response.java | 11 +- .../httpclient5/ResponseException.java | 5 +- .../HeapBufferedAsyncEntityConsumer.java | 7 +- .../HeapBufferedAsyncResponseConsumer.java | 3 +- .../HttpEntityAsyncEntityProducer.java | 13 +- .../transport/httpclient5/internal/Node.java | 3 +- .../rest_client/RestClientOptions.java | 28 +- .../rest_client/RestClientTransport.java | 87 +- .../client/util/ActionStatusOptions.java | 6 +- .../opensearch/client/util/ApiTypeHelper.java | 13 +- .../opensearch/client/util/ListBuilder.java | 2 +- .../opensearch/client/util/MapBuilder.java | 10 +- .../MissingRequiredPropertyException.java | 1 + .../opensearch/client/util/ObjectBuilder.java | 2 +- .../client/util/ObjectBuilderBase.java | 10 +- .../util/OpenSearchRequestBodyBuffer.java | 14 +- .../client/util/TaggedUnionUtils.java | 3 +- .../documentation/ApiConventionsTest.java | 17 +- .../client/documentation/ConnectingTest.java | 12 +- .../documentation/FailingTransport.java | 25 +- .../client/documentation/MigrateHlrcTest.java | 13 +- .../_types/mapping/KnnVectorMethodTest.java | 26 +- .../_types/mapping/KnnVectorPropertyTest.java | 27 +- .../core/DeleteByQueryRequestTest.java | 11 +- .../opensearch/core/ReindexRequestTest.java | 9 +- .../core/UpdateByQueryRequestTest.java | 11 +- .../opensearch/experiments/ClientTests.java | 115 +- .../opensearch/experiments/ParsingTests.java | 263 +- .../opensearch/experiments/api/Bar.java | 75 +- .../experiments/api/FooOptRequest.java | 418 +- .../experiments/api/FooRequest.java | 468 +- .../experiments/api/FooResponse.java | 2 +- .../experiments/api/query2/BoolQuery.java | 31 +- .../experiments/api/query2/Query.java | 14 +- .../experiments/api/query2/QueryTest.java | 3 +- .../experiments/api/query2/TermsQuery.java | 2 +- .../experiments/api/query2/Union2.java | 205 +- .../opensearch/experiments/base/Client.java | 28 +- .../experiments/base/PrimitiveUtils.java | 24 +- .../opensearch/experiments/base/Variants.java | 191 +- .../experiments/containers/SomeUnion.java | 14 +- .../experiments/containers/SomeUnionTest.java | 9 +- .../containers/SomeUnionVariant.java | 3 +- .../experiments/containers/UVariantA.java | 5 +- .../experiments/containers/UVariantB.java | 7 +- .../experiments/generics/GenericClass.java | 8 +- .../inheritance/InheritanceTest.java | 1 - .../inheritance/base/BaseClass.java | 9 +- .../inheritance/child/ChildClass.java | 14 +- .../inheritance/final_/FinalClass.java | 18 +- .../AbstractAggregationRequestIT.java | 457 +- .../integTest/AbstractCatClientIT.java | 92 +- .../integTest/AbstractClusterClientIT.java | 135 +- .../opensearch/integTest/AbstractCrudIT.java | 249 +- .../integTest/AbstractHighlightIT.java | 81 +- .../integTest/AbstractIndicesClientIT.java | 51 +- .../opensearch/integTest/AbstractKnnIT.java | 77 +- .../AbstractMultiSearchRequestIT.java | 708 +- .../opensearch/integTest/AbstractNodesIT.java | 1 - .../integTest/AbstractPingAndInfoIT.java | 7 +- .../integTest/AbstractRequestIT.java | 738 +- .../AbstractSearchTemplateRequestIT.java | 363 +- .../OpenSearchJavaClientTestCase.java | 48 +- .../integTest/OpenSearchTransportSupport.java | 5 +- .../integTest/aws/AwsSdk2BulkRequestIT.java | 37 +- .../integTest/aws/AwsSdk2SearchIT.java | 37 +- .../integTest/aws/AwsSdk2SecurityIT.java | 14 +- .../aws/AwsSdk2TransportTestCase.java | 142 +- .../httpclient5/AggregationRequestIT.java | 3 +- .../integTest/httpclient5/CatIT.java | 5 +- .../httpclient5/ClusterClientIT.java | 1 - .../integTest/httpclient5/CrudIT.java | 3 +- .../integTest/httpclient5/HighlightIT.java | 3 +- .../HttpClient5TransportSupport.java | 24 +- .../httpclient5/IndicesClientIT.java | 3 +- .../integTest/httpclient5/KnnIT.java | 3 +- .../httpclient5/MultiSearchRequestIT.java | 3 +- .../integTest/httpclient5/NodesIT.java | 3 +- .../integTest/httpclient5/PingAndInfoIT.java | 4 +- .../integTest/httpclient5/RequestIT.java | 3 +- .../httpclient5/SearchTemplateRequestIT.java | 3 +- .../restclient/AggregationRequestIT.java | 3 +- .../integTest/restclient/CatIT.java | 3 +- .../integTest/restclient/ClusterClientIT.java | 1 - .../integTest/restclient/CrudIT.java | 1 - .../integTest/restclient/HighlightIT.java | 3 +- .../integTest/restclient/IndicesClientIT.java | 1 - .../restclient/MultiSearchRequestIT.java | 11 +- .../integTest/restclient/NodesIT.java | 1 - .../integTest/restclient/PingAndInfoIT.java | 1 - .../integTest/restclient/RequestIT.java | 59 +- .../restclient/SearchTemplateRequestIT.java | 3 +- .../client/opensearch/json/JsonDataTest.java | 14 +- .../opensearch/json/JsonpMapperTest.java | 35 +- .../json/jackson/JacksonJsonpParserTest.java | 140 +- .../opensearch/model/BehaviorsTest.java | 58 +- .../opensearch/model/BuiltinTypesTest.java | 85 +- .../opensearch/model/ClassStructureTest.java | 105 +- .../client/opensearch/model/EndpointTest.java | 4 +- .../client/opensearch/model/EnumTest.java | 3 +- .../opensearch/model/ModelTestCase.java | 13 +- .../opensearch/model/RequestEncodingTest.java | 17 +- .../opensearch/model/SerializationTest.java | 44 +- .../opensearch/model/TypedKeysTest.java | 70 +- .../client/opensearch/model/UnionTests.java | 17 +- .../client/opensearch/model/VariantsTest.java | 154 +- .../client/transport/RequestOptionsTest.java | 42 +- .../HeapBufferedAsyncEntityConsumerTest.java | 15 +- samples/build.gradle.kts | 22 +- .../org/opensearch/client/samples/Bulk.java | 52 +- .../client/samples/DataStreamBasics.java | 13 +- .../client/samples/IndexingBasics.java | 40 +- .../client/samples/PointInTime.java | 33 +- .../client/samples/SampleClient.java | 47 +- .../org/opensearch/client/samples/Search.java | 175 +- .../client/samples/knn/KnnBasics.java | 34 +- .../client/samples/knn/KnnBooleanFilter.java | 58 +- .../samples/knn/KnnEfficientFilter.java | 131 +- .../client/samples/knn/KnnPainlessScript.java | 49 +- .../client/samples/knn/KnnScriptScore.java | 53 +- .../client/samples/util/IndexData.java | 3 +- .../client/samples/util/RandUtil.java | 2 +- 1660 files changed, 272379 insertions(+), 272548 deletions(-) delete mode 100644 .github/workflows/checkstyle.yml create mode 100644 buildSrc/formatterConfig.xml delete mode 100644 config/checkstyle/checkstyle.xml delete mode 100644 config/checkstyle/checkstyle_suppressions.xml delete mode 100644 config/checkstyle/header.java.txt diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml deleted file mode 100644 index eb0ea0b887..0000000000 --- a/.github/workflows/checkstyle.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Checkstyle - -on: [push, pull_request] - -jobs: - checkstyle: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ 11 ] - steps: - - name: Checkout Java Client - uses: actions/checkout@v3 - - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: 'gradle' - - - name: Check style and license headers - run: | - ./gradlew checkstyleMain checkstyleTest diff --git a/CHANGELOG.md b/CHANGELOG.md index cb61a63a40..fda0392554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed - Moved "software.amazon.awssdk" dependencies to the compileOnly scope. ([#628](https://github.com/opensearch-project/opensearch-java/pull/628)) +- Migrated from checkstyle to spotless ([#648](https://github.com/opensearch-project/opensearch-java/pull/648)) ### Deprecated diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index c90e138b40..6969aba856 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -97,11 +97,28 @@ Follow links in the [Java Tutorial](https://code.visualstudio.com/docs/java/java ## Java Language Formatting Guidelines -Java files in the opensearch-java codebase are formatted with the [checkstyle plugin](https://docs.gradle.org/current/userguide/checkstyle_plugin.html). This plugin is configured using [checkstyle.xml](config/checkstyle/checkstyle.xml). To run the formatting checks: +Java files in the OpenSearch codebase are formatted with the Eclipse JDT formatter, using the [Spotless Gradle](https://github.com/diffplug/spotless/tree/master/plugin-gradle) plugin. This plugin is configured on a project-by-project basis, via `build.gradle.kts`. So long as at least one project is configured, the formatting check can be run explicitly with: -``` -./gradlew checkstyleMain checkstyleTest -``` + ./gradlew spotlessJavaCheck + +The code can be formatted with: + + ./gradlew spotlessApply + +These tasks can also be run for specific subprojects, e.g. + + ./gradlew :java-client:spotlessJavaCheck + ./gradlew :samples:spotlessJavaCheck + +Please follow these formatting guidelines: + +* Java indent is 4 spaces +* Line width is 140 characters +* Lines of code surrounded by `// tag::NAME` and `// end::NAME` comments are included in the documentation and should only be 76 characters wide not counting leading indentation. Such regions of code are not formatted automatically as it is not possible to change the line length rule of the formatter for part of a file. Please format such sections sympathetically with the rest of the code, while keeping lines to maximum length of 76 characters. +* Wildcard imports (`import foo.bar.baz.*`) are forbidden and will cause the build to fail. +* If *absolutely* necessary, you can disable formatting for regions of code with the `// tag::NAME` and `// end::NAME` directives, but note that these are intended for use in documentation, so please make it clear what you have done, and only do this where the benefit clearly outweighs the decrease in consistency. +* Note that JavaDoc and block comments i.e. `/* ... */` are not formatted, but line comments i.e `// ...` are. +* There is an implicit rule that negative boolean expressions should use the form `foo == false` instead of `!foo` for better readability of the code. While this isn't strictly enforced, if might get called out in PR reviews as something to change. ## Submitting Changes diff --git a/README.md b/README.md index 1c73fe5a95..84206a71d5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -[![Checkstyle](https://github.com/opensearch-project/opensearch-java/actions/workflows/checkstyle.yml/badge.svg?branch=main)](https://github.com/opensearch-project/opensearch-java/actions/workflows/checkstyle.yml) [![Build](https://github.com/opensearch-project/opensearch-java/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/opensearch-project/opensearch-java/actions/workflows/build.yml) [![Integration Tests](https://github.com/opensearch-project/opensearch-java/actions/workflows/test-integration.yml/badge.svg?branch=main)](https://github.com/opensearch-project/opensearch-java/actions/workflows/test-integration.yml) ![Maven Central](https://img.shields.io/maven-central/v/org.opensearch.client/opensearch-java) diff --git a/build.gradle.kts b/build.gradle.kts index df7f0dc13b..7779a42fd3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,8 +42,6 @@ allprojects { mavenCentral() maven(url = "https://plugins.gradle.org/m2/") } - - apply(plugin = "checkstyle") } // Find git information. diff --git a/buildSrc/formatterConfig.xml b/buildSrc/formatterConfig.xml new file mode 100644 index 0000000000..425f9acfea --- /dev/null +++ b/buildSrc/formatterConfig.xml @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml deleted file mode 100644 index 7739883f14..0000000000 --- a/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/checkstyle/checkstyle_suppressions.xml b/config/checkstyle/checkstyle_suppressions.xml deleted file mode 100644 index edfa8870aa..0000000000 --- a/config/checkstyle/checkstyle_suppressions.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/config/checkstyle/header.java.txt b/config/checkstyle/header.java.txt deleted file mode 100644 index b5b39ea4ed..0000000000 --- a/config/checkstyle/header.java.txt +++ /dev/null @@ -1,7 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index ba555bf000..8f85f84a8d 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -46,10 +46,10 @@ buildscript { plugins { java `java-library` - checkstyle `maven-publish` id("com.github.jk1.dependency-license-report") version "2.5" id("org.owasp.dependencycheck") version "8.4.0" + id("com.diffplug.spotless") version "6.22.0" } apply(plugin = "org.owasp.dependencycheck") @@ -60,10 +60,6 @@ configurations { } } -checkstyle { - toolVersion = "10.12.3" -} - java { targetCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_11 @@ -113,6 +109,10 @@ tasks.withType { } } +tasks.build { + dependsOn("spotlessJavaCheck") +} + tasks.test { systemProperty("tests.security.manager", "false") @@ -265,6 +265,22 @@ tasks.withType { } } +spotless { + java { + + target("**/*.java") + + // Use the default importOrder configuration + importOrder() + removeUnusedImports() + + eclipse().configFile("../buildSrc/formatterConfig.xml") + + trimTrailingWhitespace() + endWithNewline() + } +} + publishing { repositories{ if (version.toString().endsWith("SNAPSHOT")) { diff --git a/java-client/src/main/java/org/opensearch/client/ApiClient.java b/java-client/src/main/java/org/opensearch/client/ApiClient.java index 1938dea4bb..327fc235ec 100644 --- a/java-client/src/main/java/org/opensearch/client/ApiClient.java +++ b/java-client/src/main/java/org/opensearch/client/ApiClient.java @@ -32,12 +32,11 @@ package org.opensearch.client; -import org.opensearch.client.transport.TransportOptions; -import org.opensearch.client.transport.Transport; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapperBase; - -import javax.annotation.Nullable; +import org.opensearch.client.transport.Transport; +import org.opensearch.client.transport.TransportOptions; public abstract class ApiClient> { diff --git a/java-client/src/main/java/org/opensearch/client/json/AttributedJsonpMapper.java b/java-client/src/main/java/org/opensearch/client/json/AttributedJsonpMapper.java index 92eb9d0b8f..baf834324a 100644 --- a/java-client/src/main/java/org/opensearch/client/json/AttributedJsonpMapper.java +++ b/java-client/src/main/java/org/opensearch/client/json/AttributedJsonpMapper.java @@ -72,7 +72,7 @@ public boolean ignoreUnknownFields() { @SuppressWarnings("unchecked") public T attribute(String name) { if (this.name.equals(name)) { - return (T)this.value; + return (T) this.value; } else { return mapper.attribute(name); } diff --git a/java-client/src/main/java/org/opensearch/client/json/BuildFunctionDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/BuildFunctionDeserializer.java index 677fb94098..aeb22671c2 100644 --- a/java-client/src/main/java/org/opensearch/client/json/BuildFunctionDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/BuildFunctionDeserializer.java @@ -33,7 +33,6 @@ package org.opensearch.client.json; import jakarta.json.stream.JsonParser; - import java.util.function.Function; /** diff --git a/java-client/src/main/java/org/opensearch/client/json/DelegatingDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/DelegatingDeserializer.java index 84e96ef5dd..1cf864be7b 100644 --- a/java-client/src/main/java/org/opensearch/client/json/DelegatingDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/DelegatingDeserializer.java @@ -33,7 +33,6 @@ package org.opensearch.client.json; import jakarta.json.stream.JsonParser; - import java.util.EnumSet; public abstract class DelegatingDeserializer implements JsonpDeserializer { @@ -68,7 +67,7 @@ public T deserialize(JsonParser parser, JsonpMapper mapper, JsonParser.Event eve */ public static JsonpDeserializer unwrap(JsonpDeserializer deserializer) { while (deserializer instanceof DelegatingDeserializer) { - deserializer = ((DelegatingDeserializer) deserializer).unwrap(); + deserializer = ((DelegatingDeserializer) deserializer).unwrap(); } return deserializer; } diff --git a/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java b/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java index b34606e20a..c1b5b5c303 100644 --- a/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java +++ b/java-client/src/main/java/org/opensearch/client/json/DelegatingJsonParser.java @@ -37,7 +37,6 @@ import jakarta.json.JsonValue; import jakarta.json.stream.JsonLocation; import jakarta.json.stream.JsonParser; - import java.math.BigDecimal; import java.util.Map; import java.util.stream.Stream; @@ -134,4 +133,4 @@ public void skipObject() { public void close() { parser.close(); } -} \ No newline at end of file +} diff --git a/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java b/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java index 94627156e8..2878c7e127 100644 --- a/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java +++ b/java-client/src/main/java/org/opensearch/client/json/ExternallyTaggedUnion.java @@ -32,13 +32,11 @@ package org.opensearch.client.json; -import org.opensearch.client.util.TaggedUnion; - +import static jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; - import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; @@ -46,10 +44,8 @@ import java.util.Map; import java.util.function.BiFunction; import java.util.function.Function; - import javax.annotation.Nullable; - -import static jakarta.json.stream.JsonParser.Event; +import org.opensearch.client.util.TaggedUnion; /** * Utilities for union types whose discriminant is not directly part of the structure, either as an enclosing property name or as @@ -71,15 +67,17 @@ public static class Deserializer, Member> { @Nullable private final BiFunction unKnownUnionCtor; - public Deserializer(Map> deserializers, - Function unionCtor) { + public Deserializer(Map> deserializers, Function unionCtor) { this.deserializers = deserializers; this.unionCtor = unionCtor; this.unKnownUnionCtor = null; } - - public Deserializer(Map> deserializers, - Function unionCtor, BiFunction unKnownUnionCtor) { + + public Deserializer( + Map> deserializers, + Function unionCtor, + BiFunction unKnownUnionCtor + ) { this.deserializers = deserializers; this.unionCtor = unionCtor; this.unKnownUnionCtor = unKnownUnionCtor; @@ -127,9 +125,9 @@ public void deserializeEntry(String key, JsonParser parser, JsonpMapper mapper, int hashPos = key.indexOf('#'); if (hashPos == -1) { throw new JsonParsingException( - "Property name '" + key - + "' is not in the 'type#name' format. Make sure the request has 'typed_keys' set.", - parser.getLocation()); + "Property name '" + key + "' is not in the 'type#name' format. Make sure the request has 'typed_keys' set.", + parser.getLocation() + ); } String type = key.substring(0, hashPos); @@ -138,43 +136,44 @@ public void deserializeEntry(String key, JsonParser parser, JsonpMapper mapper, targetMap.put(name, deserializer.deserialize(type, parser, mapper, parser.next())); } } - + public static > JsonpDeserializer>> arrayDeserializer( - TypedKeysDeserializer deserializer) { - return JsonpDeserializer.of( - EnumSet.of(Event.START_OBJECT), - (parser, mapper, event) -> { - Map> result = new HashMap<>(); - String key = null; - while ((event = parser.next()) != Event.END_OBJECT) { - JsonpUtils.expectEvent(parser, event, Event.KEY_NAME); - // Split key and type - key = parser.getString(); - int hashPos = key.indexOf('#'); - - String type = key.substring(0, hashPos); - String name = key.substring(hashPos + 1); - - List list = new ArrayList<>(); - JsonpUtils.expectNextEvent(parser, Event.START_ARRAY); - try { - while ((event = parser.next()) != Event.END_ARRAY) { - list.add(deserializer.deserializer.deserialize(type, parser, mapper, event)); - } - } catch (Exception e) { - throw e; - } - result.put(name, list); - } - return result; - }); + TypedKeysDeserializer deserializer + ) { + return JsonpDeserializer.of(EnumSet.of(Event.START_OBJECT), (parser, mapper, event) -> { + Map> result = new HashMap<>(); + String key = null; + while ((event = parser.next()) != Event.END_OBJECT) { + JsonpUtils.expectEvent(parser, event, Event.KEY_NAME); + // Split key and type + key = parser.getString(); + int hashPos = key.indexOf('#'); + + String type = key.substring(0, hashPos); + String name = key.substring(hashPos + 1); + + List list = new ArrayList<>(); + JsonpUtils.expectNextEvent(parser, Event.START_ARRAY); + try { + while ((event = parser.next()) != Event.END_ARRAY) { + list.add(deserializer.deserializer.deserialize(type, parser, mapper, event)); + } + } catch (Exception e) { + throw e; + } + result.put(name, list); + } + return result; + }); } /** * Serialize an externally tagged union using the typed keys encoding. */ public static > void serializeTypedKeys( - Map map, JsonGenerator generator, JsonpMapper mapper + Map map, + JsonGenerator generator, + JsonpMapper mapper ) { generator.writeStartObject(); serializeTypedKeysInner(map, generator, mapper); @@ -185,9 +184,11 @@ public void deserializeEntry(String key, JsonParser parser, JsonpMapper mapper, * Serialize an externally tagged union using the typed keys encoding, without the enclosing start/end object. */ public static > void serializeTypedKeysInner( - Map map, JsonGenerator generator, JsonpMapper mapper + Map map, + JsonGenerator generator, + JsonpMapper mapper ) { - for (Map.Entry entry: map.entrySet()) { + for (Map.Entry entry : map.entrySet()) { T value = entry.getValue(); generator.writeKey(value._kind().jsonValue() + "#" + entry.getKey()); value.serialize(generator, mapper); diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonData.java b/java-client/src/main/java/org/opensearch/client/json/JsonData.java index 3e2e95748e..ad907650bb 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonData.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonData.java @@ -34,7 +34,6 @@ import jakarta.json.JsonValue; import jakarta.json.stream.JsonParser; - import java.util.EnumSet; /** @@ -71,19 +70,19 @@ public interface JsonData extends JsonpSerializable { /** * Converts this object to a target class. */ - T to(Class clazz, JsonpMapper mapper); + T to(Class clazz, JsonpMapper mapper); /** * Converts this object using a deserializer. A mapper must have been provided at creation time. * * @throws IllegalStateException if no mapper was provided at creation time. */ - T deserialize(JsonpDeserializer deserializer); + T deserialize(JsonpDeserializer deserializer); /** * Converts this object using a deserializer. */ - T deserialize(JsonpDeserializer deserializer, JsonpMapper mapper); + T deserialize(JsonpDeserializer deserializer, JsonpMapper mapper); /** * Creates a raw JSON value from an existing object. A mapper will be needed to convert the result. @@ -109,7 +108,5 @@ static JsonData from(JsonParser parser, JsonpMapper mapper) { return of(parser.getValue(), mapper); } - JsonpDeserializer _DESERIALIZER = JsonpDeserializer.of( - EnumSet.allOf(JsonParser.Event.class), JsonData::from - ); + JsonpDeserializer _DESERIALIZER = JsonpDeserializer.of(EnumSet.allOf(JsonParser.Event.class), JsonData::from); } diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonDataImpl.java b/java-client/src/main/java/org/opensearch/client/json/JsonDataImpl.java index 56c7c8d0d3..72c9e0235b 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonDataImpl.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonDataImpl.java @@ -35,7 +35,6 @@ import jakarta.json.JsonValue; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; - import java.io.StringReader; import java.io.StringWriter; @@ -67,8 +66,9 @@ public JsonValue toJson(JsonpMapper mapper) { // Provided mapper has precedence over the one that was optionally set at creation time mapper = mapper != null ? mapper : this.mapper; if (mapper == null) { - throw new IllegalStateException("Contains a '" + value.getClass().getName() + - "' that cannot be converted to a JsonValue without a mapper"); + throw new IllegalStateException( + "Contains a '" + value.getClass().getName() + "' that cannot be converted to a JsonValue without a mapper" + ); } final JsonParser parser = getParser(mapper); diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java b/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java index ab63641594..0965041d7e 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonEnum.java @@ -35,12 +35,11 @@ import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; - -import javax.annotation.Nullable; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.NoSuchElementException; +import javax.annotation.Nullable; /** * Base interface for enumerations in API types. Members have a JSON representation and also accept diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializable.java b/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializable.java index 5616c31a8b..dc05f477ca 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializable.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializable.java @@ -41,7 +41,7 @@ /** * Indicates that a class has a {@link JsonpDeserializer} as a static field. */ -@Target({ElementType.TYPE}) +@Target({ ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface JsonpDeserializable { diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializer.java index 3c12aa2884..e35079ffd7 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializer.java @@ -32,16 +32,15 @@ package org.opensearch.client.json; -import org.opensearch.client.util.TriFunction; import jakarta.json.JsonValue; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; - import java.util.EnumSet; import java.util.List; import java.util.Map; import java.util.function.BiFunction; import java.util.function.Supplier; +import org.opensearch.client.util.TriFunction; public interface JsonpDeserializer { @@ -98,13 +97,13 @@ default V deserialize(JsonParser parser, JsonpMapper mapper) { */ V deserialize(JsonParser parser, JsonpMapper mapper, Event event); - //--------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- /** * Creates a deserializer for a class that delegates to the mapper provided to * {@link #deserialize(JsonParser, JsonpMapper)}. */ - static JsonpDeserializer of (Class clazz) { + static JsonpDeserializer of(Class clazz) { return new JsonpDeserializerBase(EnumSet.allOf(JsonParser.Event.class)) { @Override public T deserialize(JsonParser parser, JsonpMapper mapper) { @@ -145,7 +144,7 @@ static JsonpDeserializer lazy(Supplier> ctor) { return new LazyDeserializer<>(ctor); } - //----- Builtin types + // ----- Builtin types static JsonpDeserializer fixedValue(T value) { return new JsonpDeserializerBase(EnumSet.noneOf(Event.class)) { @@ -229,7 +228,8 @@ static JsonpDeserializer> stringMapDeserializer(JsonpDeserial } static JsonpDeserializer> enumMapDeserializer( - JsonpDeserializer keyDeserializer, JsonpDeserializer valueDeserializer + JsonpDeserializer keyDeserializer, + JsonpDeserializer valueDeserializer ) { return new JsonpDeserializerBase.EnumMapDeserializer(keyDeserializer, valueDeserializer); } diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializerBase.java b/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializerBase.java index d706f8ec72..df405110eb 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializerBase.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpDeserializerBase.java @@ -37,7 +37,6 @@ import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; - import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; @@ -65,14 +64,9 @@ protected JsonpDeserializerBase(EnumSet acceptedEvents, EnumSet na /** Combines accepted events from a number of deserializers */ protected static EnumSet allAcceptedEvents(JsonpDeserializer... deserializers) { EnumSet result = EnumSet.noneOf(Event.class); - for (JsonpDeserializer deserializer: deserializers) { + for (JsonpDeserializer deserializer : deserializers) { EnumSet set = deserializer.acceptedEvents(); - // Disabled for now. Only happens with the experimental Union2 and is caused by string and number - // parsers leniency. Need to be replaced with a check on a preferred event type. - //if (!Collections.disjoint(result, set)) { - // throw new IllegalArgumentException("Deserializer accepted events are not disjoint"); - //} result.addAll(set); } @@ -98,16 +92,14 @@ public final boolean accepts(Event event) { return acceptedEvents.contains(event); } - //--------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - //----- Builtin types + // ----- Builtin types static final JsonpDeserializer STRING = // String parsing is lenient and accepts any other primitive type - new JsonpDeserializerBase(EnumSet.of( - Event.KEY_NAME, Event.VALUE_STRING, Event.VALUE_NUMBER, - Event.VALUE_FALSE, Event.VALUE_TRUE - ), + new JsonpDeserializerBase( + EnumSet.of(Event.KEY_NAME, Event.VALUE_STRING, Event.VALUE_NUMBER, Event.VALUE_FALSE, Event.VALUE_TRUE), EnumSet.of(Event.VALUE_STRING) ) { @Override @@ -122,77 +114,72 @@ public String deserialize(JsonParser parser, JsonpMapper mapper, Event event) { } }; - static final JsonpDeserializer INTEGER = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), - EnumSet.of(Event.VALUE_NUMBER) - ) { - @Override - public Integer deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_STRING) { - return Integer.valueOf(parser.getString()); - } - return parser.getInt(); + static final JsonpDeserializer INTEGER = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), + EnumSet.of(Event.VALUE_NUMBER) + ) { + @Override + public Integer deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_STRING) { + return Integer.valueOf(parser.getString()); } - }; + return parser.getInt(); + } + }; - static final JsonpDeserializer BOOLEAN = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_FALSE, Event.VALUE_TRUE, Event.VALUE_STRING), - EnumSet.of(Event.VALUE_FALSE, Event.VALUE_TRUE) - ) { - @Override - public Boolean deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_STRING) { - return Boolean.parseBoolean(parser.getString()); - } else { - return event == Event.VALUE_TRUE; - } + static final JsonpDeserializer BOOLEAN = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_FALSE, Event.VALUE_TRUE, Event.VALUE_STRING), + EnumSet.of(Event.VALUE_FALSE, Event.VALUE_TRUE) + ) { + @Override + public Boolean deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_STRING) { + return Boolean.parseBoolean(parser.getString()); + } else { + return event == Event.VALUE_TRUE; } - }; + } + }; - static final JsonpDeserializer LONG = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), - EnumSet.of(Event.VALUE_NUMBER) - ) { - @Override - public Long deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_STRING) { - return Long.valueOf(parser.getString()); - } - return parser.getLong(); + static final JsonpDeserializer LONG = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), + EnumSet.of(Event.VALUE_NUMBER) + ) { + @Override + public Long deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_STRING) { + return Long.valueOf(parser.getString()); } - }; + return parser.getLong(); + } + }; - static final JsonpDeserializer FLOAT = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), - EnumSet.of(Event.VALUE_NUMBER) + static final JsonpDeserializer FLOAT = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), + EnumSet.of(Event.VALUE_NUMBER) - ) { - @Override - public Float deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_STRING) { - return Float.valueOf(parser.getString()); - } - return parser.getBigDecimal().floatValue(); + ) { + @Override + public Float deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_STRING) { + return Float.valueOf(parser.getString()); } - }; + return parser.getBigDecimal().floatValue(); + } + }; - static final JsonpDeserializer DOUBLE = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), - EnumSet.of(Event.VALUE_NUMBER) - ) { - @Override - public Double deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_STRING) { - return Double.valueOf(parser.getString()); - } - return parser.getBigDecimal().doubleValue(); + static final JsonpDeserializer DOUBLE = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), + EnumSet.of(Event.VALUE_NUMBER) + ) { + @Override + public Double deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_STRING) { + return Double.valueOf(parser.getString()); } - }; + return parser.getBigDecimal().doubleValue(); + } + }; static final class DoubleOrNullDeserializer extends JsonpDeserializerBase { static final EnumSet nativeEvents = EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_NULL); @@ -240,8 +227,14 @@ public Integer deserialize(JsonParser parser, JsonpMapper mapper, Event event) { static final class StringOrNullDeserializer extends JsonpDeserializerBase { static final EnumSet nativeEvents = EnumSet.of(Event.VALUE_STRING, Event.VALUE_NULL); - static final EnumSet acceptedEvents = EnumSet.of(Event.KEY_NAME, Event.VALUE_STRING, - Event.VALUE_NUMBER, Event.VALUE_FALSE, Event.VALUE_TRUE, Event.VALUE_NULL); + static final EnumSet acceptedEvents = EnumSet.of( + Event.KEY_NAME, + Event.VALUE_STRING, + Event.VALUE_NUMBER, + Event.VALUE_FALSE, + Event.VALUE_TRUE, + Event.VALUE_NULL + ); StringOrNullDeserializer() { super(acceptedEvents, nativeEvents); @@ -262,50 +255,43 @@ public String deserialize(JsonParser parser, JsonpMapper mapper, Event event) { } } - static final JsonpDeserializer DOUBLE_OR_NAN = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING, Event.VALUE_NULL), - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_NULL) - ) { - @Override - public Double deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_NULL) { - return Double.NaN; - } - if (event == Event.VALUE_STRING) { - return Double.valueOf(parser.getString()); - } - return parser.getBigDecimal().doubleValue(); + static final JsonpDeserializer DOUBLE_OR_NAN = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING, Event.VALUE_NULL), + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_NULL) + ) { + @Override + public Double deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_NULL) { + return Double.NaN; } - }; - - static final JsonpDeserializer NUMBER = - new JsonpDeserializerBase( - EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), - EnumSet.of(Event.VALUE_NUMBER) - ) { - @Override - public Number deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - if (event == Event.VALUE_STRING) { - return Double.valueOf(parser.getString()); - } - return ((JsonNumber)parser.getValue()).numberValue(); + if (event == Event.VALUE_STRING) { + return Double.valueOf(parser.getString()); } - }; + return parser.getBigDecimal().doubleValue(); + } + }; - static final JsonpDeserializer JSON_VALUE = - new JsonpDeserializerBase( - EnumSet.allOf(Event.class) - ) { - @Override - public JsonValue deserialize(JsonParser parser, JsonpMapper mapper, Event event) { - return parser.getValue(); + static final JsonpDeserializer NUMBER = new JsonpDeserializerBase( + EnumSet.of(Event.VALUE_NUMBER, Event.VALUE_STRING), + EnumSet.of(Event.VALUE_NUMBER) + ) { + @Override + public Number deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + if (event == Event.VALUE_STRING) { + return Double.valueOf(parser.getString()); } - }; + return ((JsonNumber) parser.getValue()).numberValue(); + } + }; - static final JsonpDeserializer VOID = new JsonpDeserializerBase( - EnumSet.noneOf(Event.class) - ) { + static final JsonpDeserializer JSON_VALUE = new JsonpDeserializerBase(EnumSet.allOf(Event.class)) { + @Override + public JsonValue deserialize(JsonParser parser, JsonpMapper mapper, Event event) { + return parser.getValue(); + } + }; + + static final JsonpDeserializer VOID = new JsonpDeserializerBase(EnumSet.noneOf(Event.class)) { @Override public Void deserialize(JsonParser parser, JsonpMapper mapper) { throw new JsonParsingException("Void types should not have any value", parser.getLocation()); @@ -317,7 +303,7 @@ public Void deserialize(JsonParser parser, JsonpMapper mapper, Event event) { } }; - //----- Collections + // ----- Collections static class ArrayDeserializer implements JsonpDeserializer> { private final JsonpDeserializer itemDeserializer; diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpMapperBase.java b/java-client/src/main/java/org/opensearch/client/json/JsonpMapperBase.java index 2ce6e7f788..9e3295f984 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpMapperBase.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpMapperBase.java @@ -35,9 +35,8 @@ import jakarta.json.JsonValue; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; - -import javax.annotation.Nullable; import java.lang.reflect.Field; +import javax.annotation.Nullable; public abstract class JsonpMapperBase implements JsonpMapper { @@ -61,7 +60,7 @@ public static JsonpDeserializer findDeserializer(Class clazz) { if (annotation != null) { try { Field field = clazz.getDeclaredField(annotation.field()); - return (JsonpDeserializer)field.get(null); + return (JsonpDeserializer) field.get(null); } catch (Exception e) { throw new RuntimeException("No deserializer found in '" + clazz.getName() + "." + annotation.field() + "'"); } diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java b/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java index c6e1938999..604bf2791e 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java @@ -32,7 +32,6 @@ package org.opensearch.client.json; -import org.opensearch.client.util.ObjectBuilder; import jakarta.json.JsonObject; import jakarta.json.JsonString; import jakarta.json.JsonValue; @@ -41,12 +40,12 @@ import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; - -import javax.annotation.Nullable; import java.io.StringReader; import java.util.AbstractMap; import java.util.Map; import java.util.stream.Collectors; +import javax.annotation.Nullable; +import org.opensearch.client.util.ObjectBuilder; public class JsonpUtils { @@ -94,7 +93,7 @@ public static void skipValue(JsonParser parser) { * Skip the value at the current position of the parser. */ public static void skipValue(JsonParser parser, Event event) { - switch(event) { + switch (event) { case START_OBJECT: parser.skipObject(); break; @@ -111,7 +110,7 @@ public static void skipValue(JsonParser parser, Event event) { public static T buildVariant(JsonParser parser, ObjectBuilder builder) { if (builder == null) { - throw new JsonParsingException("No variant found" , parser.getLocation()); + throw new JsonParsingException("No variant found", parser.getLocation()); } return builder.build(); } @@ -134,7 +133,10 @@ public static void serialize(T value, JsonGenerator generator, @Nullable Jso * (the object has been consumed from the original one). */ public static Map.Entry lookAheadFieldValue( - String name, String defaultValue, JsonParser parser, JsonpMapper mapper + String name, + String defaultValue, + JsonParser parser, + JsonpMapper mapper ) { JsonLocation location = parser.getLocation(); @@ -192,17 +194,15 @@ public static JsonParser objectParser(JsonObject object, JsonpMapper mapper) { } public static String toString(JsonValue value) { - switch(value.getValueType()) { + switch (value.getValueType()) { case OBJECT: throw new IllegalArgumentException("Json objects cannot be used as string"); case ARRAY: - return value.asJsonArray().stream() - .map(JsonpUtils::toString) - .collect(Collectors.joining(",")); + return value.asJsonArray().stream().map(JsonpUtils::toString).collect(Collectors.joining(",")); case STRING: - return ((JsonString)value).getString(); + return ((JsonString) value).getString(); case TRUE: return "true"; diff --git a/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java b/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java index b4a4231d14..63e9a9f318 100644 --- a/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java +++ b/java-client/src/main/java/org/opensearch/client/json/LookAheadJsonParser.java @@ -33,7 +33,6 @@ package org.opensearch.client.json; import jakarta.json.stream.JsonParser; - import java.util.Map; public interface LookAheadJsonParser extends JsonParser { diff --git a/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java index 309295e313..e162d2a783 100644 --- a/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/NamedDeserializer.java @@ -35,7 +35,6 @@ import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; - import java.util.EnumSet; /** diff --git a/java-client/src/main/java/org/opensearch/client/json/ObjectBuilderDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/ObjectBuilderDeserializer.java index 112686f7c9..4943e83eb3 100644 --- a/java-client/src/main/java/org/opensearch/client/json/ObjectBuilderDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/ObjectBuilderDeserializer.java @@ -32,12 +32,11 @@ package org.opensearch.client.json; -import org.opensearch.client.util.ObjectBuilder; import jakarta.json.stream.JsonParser; - import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; +import org.opensearch.client.util.ObjectBuilder; /** * An object deserializer based on an {@link ObjectBuilder}. @@ -63,10 +62,10 @@ public static JsonpDeserializer lazy( Function buildFn ) { return new LazyDeserializer<>(() -> { - ObjectDeserializer builderDeser = new ObjectDeserializer(builderCtor); - builderDeserializerSetup.accept(builderDeser); - return new BuildFunctionDeserializer<>(builderDeser, buildFn); - }); + ObjectDeserializer builderDeser = new ObjectDeserializer(builderCtor); + builderDeserializerSetup.accept(builderDeser); + return new BuildFunctionDeserializer<>(builderDeser, buildFn); + }); } public static > JsonpDeserializer createForObject( diff --git a/java-client/src/main/java/org/opensearch/client/json/ObjectDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/ObjectDeserializer.java index d7e3c59317..316b0239e3 100644 --- a/java-client/src/main/java/org/opensearch/client/json/ObjectDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/ObjectDeserializer.java @@ -32,12 +32,9 @@ package org.opensearch.client.json; -import org.opensearch.client.util.QuadConsumer; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; - -import javax.annotation.Nullable; import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; @@ -47,6 +44,8 @@ import java.util.function.BiConsumer; import java.util.function.ObjIntConsumer; import java.util.function.Supplier; +import javax.annotation.Nullable; +import org.opensearch.client.util.QuadConsumer; public class ObjectDeserializer implements JsonpDeserializer { @@ -68,10 +67,7 @@ public static class FieldObjectDeserializer extends Field private final BiConsumer setter; private final JsonpDeserializer deserializer; - public FieldObjectDeserializer( - BiConsumer setter, JsonpDeserializer deserializer, - String name - ) { + public FieldObjectDeserializer(BiConsumer setter, JsonpDeserializer deserializer, String name) { super(name); this.setter = setter; this.deserializer = deserializer; @@ -106,7 +102,7 @@ public void deserialize(JsonParser parser, JsonpMapper mapper, String fieldName, } }; - //--------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- private static final EnumSet EventSetObject = EnumSet.of(Event.START_OBJECT, Event.KEY_NAME); private static final EnumSet EventSetObjectAndString = EnumSet.of(Event.START_OBJECT, Event.VALUE_STRING, Event.KEY_NAME); @@ -222,7 +218,7 @@ protected void parseUnknownField(JsonParser parser, JsonpMapper mapper, String f } else { throw new JsonParsingException( - "Unknown field '" + fieldName + "' for type '" + object.getClass().getName() +"'", + "Unknown field '" + fieldName + "' for type '" + object.getClass().getName() + "'", parser.getLocation() ); } @@ -246,27 +242,22 @@ public void shortcutProperty(String name) { acceptedEvents = EventSetObjectAndString; } - //----- Object types + // ----- Object types - public void add( - BiConsumer setter, - JsonpDeserializer deserializer, - String name - ) { - FieldObjectDeserializer fieldDeserializer = - new FieldObjectDeserializer<>(setter, deserializer, name); + public void add(BiConsumer setter, JsonpDeserializer deserializer, String name) { + FieldObjectDeserializer fieldDeserializer = new FieldObjectDeserializer<>(setter, deserializer, name); this.fieldDeserializers.put(name, fieldDeserializer); } public void add( BiConsumer setter, JsonpDeserializer deserializer, - String name, String... aliases + String name, + String... aliases ) { - FieldObjectDeserializer fieldDeserializer = - new FieldObjectDeserializer<>(setter, deserializer, name); + FieldObjectDeserializer fieldDeserializer = new FieldObjectDeserializer<>(setter, deserializer, name); this.fieldDeserializers.put(name, fieldDeserializer); - for (String alias: aliases) { + for (String alias : aliases) { this.fieldDeserializers.put(alias, fieldDeserializer); } } @@ -280,33 +271,11 @@ public void setTypeProperty(String name, String defaultType) { this.defaultType = defaultType; } - //----- Primitive types + // ----- Primitive types public void add(ObjIntConsumer setter, String name, String... deprecatedNames) { // FIXME (perf): add specialized deserializer to avoid intermediate boxing add(setter::accept, JsonpDeserializer.integerDeserializer(), name, deprecatedNames); } -// Experiment: avoid boxing, allow multiple primitive parsers (e.g. int as number & string) -// public void add( -// ObjIntConsumer setter, -// JsonpIntParser vp, -// String name, String... deprecatedNames -// ) { -// this.fieldDeserializers.put(name, new FieldDeserializer(name, deprecatedNames) { -// @Override -// public void deserialize(JsonParser parser, JsonpMapper mapper, String fieldName, ObjectType object) { -// JsonpUtils.expectNextEvent(parser, Event.VALUE_NUMBER); -// setter.accept(object, vp.parse(parser)); -// } -// }); -// } -// -// public static class JsonpIntParser { -// public int parse(JsonParser parser) { -// JsonpUtils.expectNextEvent(parser, Event.VALUE_NUMBER); -// return parser.getInt(); -// } -// } - } diff --git a/java-client/src/main/java/org/opensearch/client/json/UnexpectedJsonEventException.java b/java-client/src/main/java/org/opensearch/client/json/UnexpectedJsonEventException.java index e717f73a9e..c7aa821133 100644 --- a/java-client/src/main/java/org/opensearch/client/json/UnexpectedJsonEventException.java +++ b/java-client/src/main/java/org/opensearch/client/json/UnexpectedJsonEventException.java @@ -35,7 +35,6 @@ import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; - import java.util.EnumSet; public class UnexpectedJsonEventException extends JsonParsingException { diff --git a/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java b/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java index 0e77419d46..55527cefc0 100644 --- a/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java +++ b/java-client/src/main/java/org/opensearch/client/json/UnionDeserializer.java @@ -32,13 +32,11 @@ package org.opensearch.client.json; -import org.opensearch.client.util.ObjectBuilder; import jakarta.json.JsonObject; import jakarta.json.stream.JsonLocation; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; - import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -51,6 +49,7 @@ import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; +import org.opensearch.client.util.ObjectBuilder; public class UnionDeserializer implements JsonpDeserializer { @@ -62,6 +61,7 @@ public AmbiguousUnionException(String message) { private abstract static class EventHandler { abstract Union deserialize(JsonParser parser, JsonpMapper mapper, Event event, BiFunction buildFn); + abstract EnumSet nativeEvents(); } @@ -102,7 +102,7 @@ private static class MultiMemberHandler extends EventHandle @Override EnumSet nativeEvents() { EnumSet result = EnumSet.noneOf(Event.class); - for (SingleMemberHandler smh: handlers) { + for (SingleMemberHandler smh : handlers) { result.addAll(smh.deserializer.nativeEvents()); } return result; @@ -111,10 +111,10 @@ EnumSet nativeEvents() { @Override Union deserialize(JsonParser parser, JsonpMapper mapper, Event event, BiFunction buildFn) { RuntimeException exception = null; - for (EventHandler d: handlers) { + for (EventHandler d : handlers) { try { return d.deserialize(parser, mapper, event, buildFn); - } catch(RuntimeException ex) { + } catch (RuntimeException ex) { exception = ex; } } @@ -172,8 +172,11 @@ public Builder addMember(Kind tag, JsonpDeserializer unwrapped = DelegatingDeserializer.unwrap(deserializer); if (unwrapped instanceof ObjectDeserializer) { ObjectDeserializer od = (ObjectDeserializer) unwrapped; - UnionDeserializer.SingleMemberHandler member = - new SingleMemberHandler<>(tag, deserializer, new HashSet<>(od.fieldNames())); + UnionDeserializer.SingleMemberHandler member = new SingleMemberHandler<>( + tag, + deserializer, + new HashSet<>(od.fieldNames()) + ); objectMembers.add(member); if (od.shortcutProperty() != null) { // also add it as a string @@ -181,7 +184,7 @@ public Builder addMember(Kind tag, JsonpDeserializer member = new SingleMemberHandler<>(tag, deserializer); - for (Event e: deserializer.nativeEvents()) { + for (Event e : deserializer.nativeEvents()) { addMember(e, tag, member); } } @@ -191,18 +194,20 @@ public Builder addMember(Kind tag, JsonpDeserializer build() { - Map fieldFrequencies = objectMembers.stream().flatMap(m -> m.fields.stream()) - .collect( Collectors.groupingBy(Function.identity(), Collectors.counting())); - Set duplicateFields = fieldFrequencies.entrySet().stream() - .filter(entry -> entry.getValue() > 1) - .map(Map.Entry::getKey) - .collect(Collectors.toSet()); - for (UnionDeserializer.SingleMemberHandler member: objectMembers) { + Map fieldFrequencies = objectMembers.stream() + .flatMap(m -> m.fields.stream()) + .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())); + Set duplicateFields = fieldFrequencies.entrySet() + .stream() + .filter(entry -> entry.getValue() > 1) + .map(Map.Entry::getKey) + .collect(Collectors.toSet()); + for (UnionDeserializer.SingleMemberHandler member : objectMembers) { member.fields.removeAll(duplicateFields); } // Check that no object member had all its fields removed - for (UnionDeserializer.SingleMemberHandler member: objectMembers) { + for (UnionDeserializer.SingleMemberHandler member : objectMembers) { if (member.fields.isEmpty()) { throw new AmbiguousUnionException("All properties of '" + member.tag + "' also exist in other object members"); } @@ -213,10 +218,6 @@ public JsonpDeserializer build() { otherMembers.put(Event.START_OBJECT, objectMembers.remove(0)); } -// if (objectMembers.size() > 1) { -// System.out.println("multiple objects in " + buildFn); -// } - return new UnionDeserializer<>(objectMembers, otherMembers, buildFn); } } @@ -239,8 +240,8 @@ public UnionDeserializer( this.objectMembers = Collections.emptyMap(); } else { this.objectMembers = new HashMap<>(); - for (SingleMemberHandler member: objectMembers) { - for (String field: member.fields) { + for (SingleMemberHandler member : objectMembers) { + for (String field : member.fields) { this.objectMembers.put(field, member); } } @@ -249,7 +250,7 @@ public UnionDeserializer( this.nonObjectMembers = nonObjectMembers; this.nativeEvents = EnumSet.noneOf(Event.class); - for (EventHandler member: nonObjectMembers.values()) { + for (EventHandler member : nonObjectMembers.values()) { this.nativeEvents.addAll(member.nativeEvents()); } @@ -286,8 +287,9 @@ public Union deserialize(JsonParser parser, JsonpMapper mapper, Event event) { if (member == null && event == Event.START_OBJECT && !objectMembers.isEmpty()) { if (parser instanceof LookAheadJsonParser) { - Map.Entry, JsonParser> memberAndParser = - ((LookAheadJsonParser) parser).findVariant(objectMembers); + Map.Entry, JsonParser> memberAndParser = ((LookAheadJsonParser) parser).findVariant( + objectMembers + ); member = memberAndParser.getKey(); // Parse the buffered parser @@ -297,7 +299,7 @@ public Union deserialize(JsonParser parser, JsonpMapper mapper, Event event) { // Parse as an object to find matching field names JsonObject object = parser.getObject(); - for (String field: object.keySet()) { + for (String field : object.keySet()) { member = objectMembers.get(field); if (member != null) { break; diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonProvider.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonProvider.java index 56045e4e51..bc14bf1537 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonProvider.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonProvider.java @@ -47,7 +47,6 @@ import jakarta.json.stream.JsonGeneratorFactory; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParserFactory; - import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -81,7 +80,7 @@ public JsonFactory jacksonJsonFactory() { return this.jsonFactory; } - //--------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- // Parser private final ParserFactory defaultParserFactory = new ParserFactory(null); @@ -166,7 +165,7 @@ public JsonParser createParser(JsonArray array) { } } - //--------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- // Generator private final JsonGeneratorFactory defaultGeneratorFactory = new GeneratorFactory(null); @@ -233,7 +232,7 @@ public JsonGenerator createGenerator(OutputStream out, Charset charset) { } } - //--------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- // Unsupported operations /** diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java index 5b6e5efdff..50dc7f2f8f 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpGenerator.java @@ -38,7 +38,6 @@ import jakarta.json.JsonValue; import jakarta.json.stream.JsonGenerationException; import jakarta.json.stream.JsonGenerator; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -339,10 +338,10 @@ public void flush() { } private void writeValue(JsonValue value) throws IOException { - switch(value.getValueType()) { + switch (value.getValueType()) { case OBJECT: generator.writeStartObject(); - for (Map.Entry entry: value.asJsonObject().entrySet()) { + for (Map.Entry entry : value.asJsonObject().entrySet()) { generator.writeFieldName(entry.getKey()); writeValue(entry.getValue()); } @@ -351,14 +350,14 @@ private void writeValue(JsonValue value) throws IOException { case ARRAY: generator.writeStartArray(); - for (JsonValue item: value.asJsonArray()) { + for (JsonValue item : value.asJsonArray()) { writeValue(item); } generator.writeEndArray(); break; case STRING: - generator.writeString(((JsonString)value).getString()); + generator.writeString(((JsonString) value).getString()); break; case FALSE: diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java index 3a92266ca0..186018a0d2 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpMapper.java @@ -32,11 +32,6 @@ package org.opensearch.client.json.jackson; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpDeserializerBase; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.JsonpMapperBase; -import org.opensearch.client.json.JsonpSerializer; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.databind.ObjectMapper; @@ -44,9 +39,13 @@ import jakarta.json.spi.JsonProvider; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; - import java.io.IOException; import java.util.EnumSet; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpDeserializerBase; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpMapperBase; +import org.opensearch.client.json.JsonpSerializer; public class JacksonJsonpMapper extends JsonpMapperBase { @@ -64,9 +63,8 @@ public JacksonJsonpMapper(ObjectMapper objectMapper, JsonFactory jsonFactory) { } public JacksonJsonpMapper() { - this(new ObjectMapper() - .configure(SerializationFeature.INDENT_OUTPUT, false) - .setSerializationInclusion(JsonInclude.Include.NON_NULL) + this( + new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, false).setSerializationInclusion(JsonInclude.Include.NON_NULL) ); } @@ -83,7 +81,7 @@ public JsonProvider jsonProvider() { } @Override - protected JsonpDeserializer getDefaultDeserializer(Class clazz) { + protected JsonpDeserializer getDefaultDeserializer(Class clazz) { return new JacksonValueParser<>(clazz); } @@ -100,7 +98,7 @@ public void serialize(T value, JsonGenerator generator) { return; } - com.fasterxml.jackson.core.JsonGenerator jkGenerator = ((JacksonJsonpGenerator)generator).jacksonGenerator(); + com.fasterxml.jackson.core.JsonGenerator jkGenerator = ((JacksonJsonpGenerator) generator).jacksonGenerator(); try { objectMapper.writeValue(jkGenerator, value); } catch (IOException ioe) { @@ -124,11 +122,11 @@ public T deserialize(JsonParser parser, JsonpMapper mapper, JsonParser.Event eve throw new IllegalArgumentException("Jackson's ObjectMapper can only be used with the JacksonJsonpProvider"); } - com.fasterxml.jackson.core.JsonParser jkParser = ((JacksonJsonpParser)parser).jacksonParser(); + com.fasterxml.jackson.core.JsonParser jkParser = ((JacksonJsonpParser) parser).jacksonParser(); try { return objectMapper.readValue(jkParser, clazz); - } catch(IOException ioe) { + } catch (IOException ioe) { throw JacksonUtils.convertException(ioe); } } diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java index eb75a2bb63..8597b81604 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonJsonpParser.java @@ -41,9 +41,6 @@ import jakarta.json.stream.JsonLocation; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParsingException; -import org.opensearch.client.json.LookAheadJsonParser; -import org.opensearch.client.json.UnexpectedJsonEventException; - import java.io.IOException; import java.math.BigDecimal; import java.util.AbstractMap; @@ -51,6 +48,8 @@ import java.util.Map; import java.util.NoSuchElementException; import java.util.stream.Stream; +import org.opensearch.client.json.LookAheadJsonParser; +import org.opensearch.client.json.UnexpectedJsonEventException; /** * A JSONP parser implementation on top of Jackson. @@ -105,7 +104,7 @@ private JsonParsingException convertException(IOException ioe) { private JsonToken fetchNextToken() { try { return parser.nextToken(); - } catch(IOException e) { + } catch (IOException e) { throw convertException(e); } } @@ -142,7 +141,7 @@ public Event next() { Event result = tokenToEvent.get(token); if (result == null) { - throw new JsonParsingException("Unsupported Jackson event type '"+ token + "'", getLocation()); + throw new JsonParsingException("Unsupported Jackson event type '" + token + "'", getLocation()); } return result; @@ -214,8 +213,7 @@ public void close() { public JsonObject getObject() { ensureTokenIsCurrent(); if (parser.currentToken() != JsonToken.START_OBJECT) { - throw new IllegalStateException("Unexpected event '" + parser.currentToken() + - "' at " + parser.getTokenLocation()); + throw new IllegalStateException("Unexpected event '" + parser.currentToken() + "' at " + parser.getTokenLocation()); } if (valueParser == null) { valueParser = new JsonValueParser(); @@ -234,8 +232,7 @@ public JsonArray getArray() { valueParser = new JsonValueParser(); } if (parser.currentToken() != JsonToken.START_ARRAY) { - throw new IllegalStateException("Unexpected event '" + parser.currentToken() + - "' at " + parser.getTokenLocation()); + throw new IllegalStateException("Unexpected event '" + parser.currentToken() + "' at " + parser.getTokenLocation()); } try { return valueParser.parseArray(parser); @@ -277,7 +274,7 @@ public void skipObject() { depth--; break; } - } while(!(token == JsonToken.END_OBJECT && depth == 0)); + } while (!(token == JsonToken.END_OBJECT && depth == 0)); } catch (IOException e) { throw convertException(e); } @@ -303,7 +300,7 @@ public void skipArray() { depth--; break; } - } while(!(token == JsonToken.END_ARRAY && depth == 0)); + } while (!(token == JsonToken.END_ARRAY && depth == 0)); } catch (IOException e) { throw convertException(e); } @@ -327,7 +324,7 @@ public Stream getValueStream() { return LookAheadJsonParser.super.getValueStream(); } - //----- Look ahead methods + // ----- Look ahead methods public Map.Entry lookAheadFieldValue(String name, String defaultValue) { @@ -349,8 +346,8 @@ public Map.Entry lookAheadFieldValue(String name, String def tb.copyCurrentEvent(parser); return new AbstractMap.SimpleImmutableEntry<>( - parser.getText(), - new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + parser.getText(), + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) ); } else { tb.copyCurrentStructure(parser); @@ -364,8 +361,8 @@ public Map.Entry lookAheadFieldValue(String name, String def // Field not found return new AbstractMap.SimpleImmutableEntry<>( - defaultValue, - new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + defaultValue, + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) ); } @@ -386,8 +383,8 @@ public Map.Entry findVariant(Map if (variant != null) { tb.copyCurrentEvent(parser); return new AbstractMap.SimpleImmutableEntry<>( - variant, - new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + variant, + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) ); } else { tb.copyCurrentStructure(parser); @@ -401,8 +398,8 @@ public Map.Entry findVariant(Map // No variant found: return the buffered parser and let the caller decide what to do. return new AbstractMap.SimpleImmutableEntry<>( - null, - new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) + null, + new JacksonJsonpParser(JsonParserSequence.createFlattened(false, tb.asParser(), parser)) ); } @@ -420,4 +417,3 @@ private void expectEvent(JsonToken expected) { } } } - diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonUtils.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonUtils.java index 988474f7ce..7c1894ea95 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonUtils.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JacksonUtils.java @@ -36,7 +36,6 @@ import jakarta.json.JsonException; import jakarta.json.stream.JsonGenerationException; import jakarta.json.stream.JsonParsingException; - import java.io.IOException; class JacksonUtils { diff --git a/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java b/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java index 565e38e35d..3b4b9dd0d1 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java +++ b/java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java @@ -41,7 +41,6 @@ import jakarta.json.JsonValue; import jakarta.json.spi.JsonProvider; import jakarta.json.stream.JsonParsingException; - import java.io.IOException; /** @@ -58,7 +57,7 @@ public JsonObject parseObject(JsonParser parser) throws IOException { JsonObjectBuilder ob = DefaultJsonProvider.INSTANCE.createObjectBuilder(); JsonToken token; - while((token = parser.nextToken()) != JsonToken.END_OBJECT) { + while ((token = parser.nextToken()) != JsonToken.END_OBJECT) { if (token != JsonToken.FIELD_NAME) { throw new JsonParsingException("Expected a property name", new JacksonJsonpLocation(parser)); } @@ -72,7 +71,7 @@ public JsonObject parseObject(JsonParser parser) throws IOException { public JsonArray parseArray(JsonParser parser) throws IOException { JsonArrayBuilder ab = DefaultJsonProvider.INSTANCE.createArrayBuilder(); - while(parser.nextToken() != JsonToken.END_ARRAY) { + while (parser.nextToken() != JsonToken.END_ARRAY) { ab.add(parseValue(parser)); } return ab.build(); @@ -100,7 +99,7 @@ public JsonValue parseValue(JsonParser parser) throws IOException { case VALUE_NUMBER_FLOAT: case VALUE_NUMBER_INT: - switch(parser.getNumberType()) { + switch (parser.getNumberType()) { case INT: return DefaultJsonProvider.INSTANCE.createValue(parser.getIntValue()); case LONG: diff --git a/java-client/src/main/java/org/opensearch/client/json/jsonb/JsonbJsonpMapper.java b/java-client/src/main/java/org/opensearch/client/json/jsonb/JsonbJsonpMapper.java index a01d478326..0a7c98e2da 100644 --- a/java-client/src/main/java/org/opensearch/client/json/jsonb/JsonbJsonpMapper.java +++ b/java-client/src/main/java/org/opensearch/client/json/jsonb/JsonbJsonpMapper.java @@ -32,21 +32,20 @@ package org.opensearch.client.json.jsonb; -import org.opensearch.client.json.JsonpDeserializer; -import org.opensearch.client.json.JsonpDeserializerBase; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.JsonpMapperBase; -import org.opensearch.client.json.JsonpSerializable; import jakarta.json.bind.Jsonb; import jakarta.json.bind.spi.JsonbProvider; import jakarta.json.spi.JsonProvider; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; - import java.io.CharArrayReader; import java.io.CharArrayWriter; import java.util.EnumSet; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpDeserializerBase; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.JsonpMapperBase; +import org.opensearch.client.json.JsonpSerializable; public class JsonbJsonpMapper extends JsonpMapperBase { @@ -74,7 +73,7 @@ protected JsonpDeserializer getDefaultDeserializer(Class clazz) { @Override public void serialize(T value, JsonGenerator generator) { if (value instanceof JsonpSerializable) { - ((JsonpSerializable)value).serialize(generator, this); + ((JsonpSerializable) value).serialize(generator, this); return; } @@ -126,7 +125,7 @@ private void transferAll(JsonParser from, JsonGenerator to) { */ private void transferAll(JsonParser from, JsonParser.Event event, JsonGenerator to) { transferEvent(from, event, to); - switch(event) { + switch (event) { case START_OBJECT: { int depth = 1; do { @@ -140,9 +139,9 @@ private void transferAll(JsonParser from, JsonParser.Event event, JsonGenerator depth--; break; } - } while(!(event == Event.END_OBJECT && depth == 0)); + } while (!(event == Event.END_OBJECT && depth == 0)); } - break; + break; case START_ARRAY: { int depth = 1; @@ -157,9 +156,9 @@ private void transferAll(JsonParser from, JsonParser.Event event, JsonGenerator depth--; break; } - } while(!(event == Event.END_ARRAY && depth == 0)); + } while (!(event == Event.END_ARRAY && depth == 0)); } - break; + break; default: // nothing more diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java index 0aa60b542c..5d869c6f59 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java @@ -32,9 +32,13 @@ package org.opensearch.client.opensearch; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.ApiClient; -import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch.cat.OpenSearchCatAsyncClient; import org.opensearch.client.opensearch.cluster.OpenSearchClusterAsyncClient; import org.opensearch.client.opensearch.core.BulkRequest; @@ -126,1470 +130,1567 @@ import org.opensearch.client.opensearch.shutdown.OpenSearchShutdownAsyncClient; import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotAsyncClient; import org.opensearch.client.opensearch.tasks.OpenSearchTasksAsyncClient; -import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.JsonEndpoint; +import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.TransportOptions; import org.opensearch.client.transport.endpoints.BooleanResponse; import org.opensearch.client.transport.endpoints.EndpointWithResponseMapperAttr; import org.opensearch.client.util.ObjectBuilder; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import javax.annotation.Nullable; /** * Client for the namespace. */ public class OpenSearchAsyncClient extends ApiClient { - public OpenSearchAsyncClient(OpenSearchTransport transport) { - super(transport, null); - } - - public OpenSearchAsyncClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions) { - super(transport, transportOptions); - } - - @Override - public OpenSearchAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { - return new OpenSearchAsyncClient(this.transport, transportOptions); - } - - // ----- Child clients - - public OpenSearchCatAsyncClient cat() { - return new OpenSearchCatAsyncClient(this.transport, this.transportOptions); - } - - - public OpenSearchClusterAsyncClient cluster() { - return new OpenSearchClusterAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchDanglingIndicesAsyncClient danglingIndices() { - return new OpenSearchDanglingIndicesAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchFeaturesAsyncClient features() { - return new OpenSearchFeaturesAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchIndicesAsyncClient indices() { - return new OpenSearchIndicesAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchIngestAsyncClient ingest() { - return new OpenSearchIngestAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchNodesAsyncClient nodes() { - return new OpenSearchNodesAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchShutdownAsyncClient shutdown() { - return new OpenSearchShutdownAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchSnapshotAsyncClient snapshot() { - return new OpenSearchSnapshotAsyncClient(this.transport, this.transportOptions); - } - - public OpenSearchTasksAsyncClient tasks() { - return new OpenSearchTasksAsyncClient(this.transport, this.transportOptions); - } - - // ----- Endpoint: bulk - - /** - * Allows to perform multiple index/update/delete operations in a single - * request. - * - * - */ - - public CompletableFuture bulk(BulkRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) BulkRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to perform multiple index/update/delete operations in a single - * request. - * - * @param fn - * a function that initializes a builder to create the - * {@link BulkRequest} - * - */ - - public final CompletableFuture bulk(Function> fn) - throws IOException, OpenSearchException { - return bulk(fn.apply(new BulkRequest.Builder()).build()); - } - - /** - * Allows to perform multiple index/update/delete operations in a single - * request. - * - * - */ - - public CompletableFuture bulk() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new BulkRequest.Builder().build(), BulkRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: clear_scroll - - /** - * Explicitly clears the search context for a scroll. - * - * - */ - - public CompletableFuture clearScroll(ClearScrollRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ClearScrollRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Explicitly clears the search context for a scroll. - * - * @param fn - * a function that initializes a builder to create the - * {@link ClearScrollRequest} - * - */ - - public final CompletableFuture clearScroll( - Function> fn) - throws IOException, OpenSearchException { - return clearScroll(fn.apply(new ClearScrollRequest.Builder()).build()); - } - - /** - * Explicitly clears the search context for a scroll. - * - * - */ - - public CompletableFuture clearScroll() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new ClearScrollRequest.Builder().build(), - ClearScrollRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: count - - /** - * Returns number of documents matching a query. - * - * - */ - - public CompletableFuture count(CountRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) CountRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns number of documents matching a query. - * - * @param fn - * a function that initializes a builder to create the - * {@link CountRequest} - * - */ - - public final CompletableFuture count(Function> fn) - throws IOException, OpenSearchException { - return count(fn.apply(new CountRequest.Builder()).build()); - } - - /** - * Returns number of documents matching a query. - * - * - */ - - public CompletableFuture count() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new CountRequest.Builder().build(), CountRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: create - - /** - * Creates a new document in the index. - *

- * Returns a 409 response when a document with a same ID already exists in the - * index. - * - * - */ - - public CompletableFuture create(CreateRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, CreateResponse, ErrorResponse> endpoint = - (JsonEndpoint, CreateResponse, ErrorResponse>) CreateRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Creates a new document in the index. - *

- * Returns a 409 response when a document with a same ID already exists in the - * index. - * - * @param fn - * a function that initializes a builder to create the - * {@link CreateRequest} - * - */ - - public final CompletableFuture create( - Function, ObjectBuilder>> fn) - throws IOException, OpenSearchException { - return create(fn.apply(new CreateRequest.Builder()).build()); - } - - // ----- Endpoint: create_point_in_time - - /** - * Provides low-level information about the disk utilization of a PIT by - * describing its Lucene segments. - * - * - */ - - public CompletableFuture createPit(CreatePitRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) CreatePitRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Provides low-level information about the disk utilization of a PIT by - * describing its Lucene segments. - * - * @param fn - * a function that initializes a builder to create the - * {@link CreatePitRequest} - * - */ - - public final CompletableFuture createPit( - Function> fn) - throws IOException, OpenSearchException { - return createPit(fn.apply(new CreatePitRequest.Builder()).build()); - } - - // ----- Endpoint: delete - - /** - * Removes a document from the index. - * - * - */ - - public CompletableFuture delete(DeleteRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) DeleteRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Removes a document from the index. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteRequest} - * - */ - - public final CompletableFuture delete( - Function> fn) - throws IOException, OpenSearchException { - return delete(fn.apply(new DeleteRequest.Builder()).build()); - } - - // ----- Endpoint: delete_point_in_time - - /** - * Delete Point In Time - * - * - */ - - public CompletableFuture deletePit(DeletePitRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) DeletePitRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Delete Point In Time - * - * @param fn - * a function that initializes a builder to create the - * {@link DeletePitRequest} - * - */ - - public final CompletableFuture deletePit( - Function> fn) - throws IOException, OpenSearchException { - return deletePit(fn.apply(new DeletePitRequest.Builder()).build()); - } - - // ----- Endpoint: delete_by_query - - /** - * Deletes documents matching the provided query. - * - * - */ - - public CompletableFuture deleteByQuery(DeleteByQueryRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) DeleteByQueryRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Deletes documents matching the provided query. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteByQueryRequest} - * - */ - - public final CompletableFuture deleteByQuery( - Function> fn) - throws IOException, OpenSearchException { - return deleteByQuery(fn.apply(new DeleteByQueryRequest.Builder()).build()); - } - - // ----- Endpoint: delete_by_query_rethrottle - - /** - * Changes the number of requests per second for a particular Delete By Query - * operation. - * - * - */ - - public CompletableFuture deleteByQueryRethrottle( - DeleteByQueryRethrottleRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - DeleteByQueryRethrottleRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Changes the number of requests per second for a particular Delete By Query - * operation. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteByQueryRethrottleRequest} - * - */ - - public final CompletableFuture deleteByQueryRethrottle( - Function> fn) - throws IOException, OpenSearchException { - return deleteByQueryRethrottle(fn.apply(new DeleteByQueryRethrottleRequest.Builder()).build()); - } - - // ----- Endpoint: delete_script - - /** - * Deletes a script. - * - * - */ - - public CompletableFuture deleteScript(DeleteScriptRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) DeleteScriptRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Deletes a script. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteScriptRequest} - * - */ - - public final CompletableFuture deleteScript( - Function> fn) - throws IOException, OpenSearchException { - return deleteScript(fn.apply(new DeleteScriptRequest.Builder()).build()); - } - - // ----- Endpoint: exists - - /** - * Returns information about whether a document exists in an index. - * - * - */ - - public CompletableFuture exists(ExistsRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ExistsRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns information about whether a document exists in an index. - * - * @param fn - * a function that initializes a builder to create the - * {@link ExistsRequest} - * - */ - - public final CompletableFuture exists( - Function> fn) - throws IOException, OpenSearchException { - return exists(fn.apply(new ExistsRequest.Builder()).build()); - } - - // ----- Endpoint: exists_source - - /** - * Returns information about whether a document source exists in an index. - * - * - */ - - public CompletableFuture existsSource(ExistsSourceRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ExistsSourceRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns information about whether a document source exists in an index. - * - * @param fn - * a function that initializes a builder to create the - * {@link ExistsSourceRequest} - * - */ - - public final CompletableFuture existsSource( - Function> fn) - throws IOException, OpenSearchException { - return existsSource(fn.apply(new ExistsSourceRequest.Builder()).build()); - } - - // ----- Endpoint: explain - - /** - * Returns information about why a specific matches (or doesn't match) a query. - * - * - */ - - public CompletableFuture> explain(ExplainRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) ExplainRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.explain.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns information about why a specific matches (or doesn't match) a query. - * - * @param fn - * a function that initializes a builder to create the - * {@link ExplainRequest} - * - */ - - public final CompletableFuture> explain( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: field_caps - - /** - * Returns the information about the capabilities of fields among multiple - * indices. - */ - - public CompletableFuture fieldCaps(FieldCapsRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) FieldCapsRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns the information about the capabilities of fields among multiple - * indices. - * - * @param fn - * a function that initializes a builder to create the - * {@link FieldCapsRequest} - * - */ - - public final CompletableFuture fieldCaps( - Function> fn) - throws IOException, OpenSearchException { - return fieldCaps(fn.apply(new FieldCapsRequest.Builder()).build()); - } - - /** - * Returns the information about the capabilities of fields among multiple - * indices. - * - * - */ - - public CompletableFuture fieldCaps() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new FieldCapsRequest.Builder().build(), FieldCapsRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: get - - /** - * Returns a document. - * - * - */ - - public CompletableFuture> get(GetRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) GetRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.get.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns a document. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetRequest} - * - */ - - public final CompletableFuture> get( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return get(fn.apply(new GetRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: get_script - - /** - * Returns a script. - * - * - */ - - public CompletableFuture getScript(GetScriptRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) GetScriptRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns a script. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetScriptRequest} - * - */ - - public final CompletableFuture getScript( - Function> fn) - throws IOException, OpenSearchException { - return getScript(fn.apply(new GetScriptRequest.Builder()).build()); - } - - // ----- Endpoint: get_script_context - - /** - * Returns all script contexts. - * - * - */ - public CompletableFuture getScriptContext() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(GetScriptContextRequest._INSTANCE, GetScriptContextRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: get_script_languages - - /** - * Returns available script types, languages and contexts - * - * - */ - public CompletableFuture getScriptLanguages() - throws IOException, OpenSearchException { - return this.transport.performRequestAsync(GetScriptLanguagesRequest._INSTANCE, - GetScriptLanguagesRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: get_source - - /** - * Returns the source of a document. - * - * - */ - - public CompletableFuture> getSource(GetSourceRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) GetSourceRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.get_source.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns the source of a document. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetSourceRequest} - * - */ - - public final CompletableFuture> getSource( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: index - - /** - * Creates or updates a document in an index. - * - * - */ - - public CompletableFuture index(IndexRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, IndexResponse, ErrorResponse> endpoint = - (JsonEndpoint, IndexResponse, ErrorResponse>) IndexRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Creates or updates a document in an index. - * - * @param fn - * a function that initializes a builder to create the - * {@link IndexRequest} - * - */ - - public final CompletableFuture index( - Function, ObjectBuilder>> fn) - throws IOException, OpenSearchException { - return index(fn.apply(new IndexRequest.Builder()).build()); - } - - // ----- Endpoint: info - - /** - * Returns basic information about the cluster. - * - * - */ - public CompletableFuture info() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: list_point_in_time - - /** - * List all Point In Time - * - * - */ - - public CompletableFuture listAllPit() - throws IOException, OpenSearchException { - return this.transport.performRequestAsync(ListAllPitRequest._INSTANCE, ListAllPitRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: mget - - /** - * Allows to get multiple documents in one request. - * - * - */ - - public CompletableFuture> mget(MgetRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) MgetRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.mget.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to get multiple documents in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MgetRequest} - * - */ - - public final CompletableFuture> mget( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return mget(fn.apply(new MgetRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: msearch - - /** - * Allows to execute several search operations in one request. - * - * - */ - - public CompletableFuture> msearch(MsearchRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) MsearchRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.msearch.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to execute several search operations in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MsearchRequest} - * - */ - - public final CompletableFuture> msearch( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return msearch(fn.apply(new MsearchRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: msearch_template - - /** - * Allows to execute several search template operations in one request. - * - * - */ - - public CompletableFuture> msearchTemplate( - MsearchTemplateRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - MsearchTemplateRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.msearch_template.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to execute several search template operations in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MsearchTemplateRequest} - * - */ - - public final CompletableFuture> msearchTemplate( - Function> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: mtermvectors - - /** - * Returns multiple termvectors in one request. - * - * - */ - - public CompletableFuture mtermvectors(MtermvectorsRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) MtermvectorsRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns multiple termvectors in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MtermvectorsRequest} - * - */ - - public final CompletableFuture mtermvectors( - Function> fn) - throws IOException, OpenSearchException { - return mtermvectors(fn.apply(new MtermvectorsRequest.Builder()).build()); - } - - /** - * Returns multiple termvectors in one request. - * - * - */ - - public CompletableFuture mtermvectors() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new MtermvectorsRequest.Builder().build(), - MtermvectorsRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: ping - - /** - * Returns whether the cluster is running. - * - * - */ - public CompletableFuture ping() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(PingRequest._INSTANCE, PingRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: put_script - - /** - * Creates or updates a script. - * - * - */ - - public CompletableFuture putScript(PutScriptRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) PutScriptRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Creates or updates a script. - * - * @param fn - * a function that initializes a builder to create the - * {@link PutScriptRequest} - * - */ - - public final CompletableFuture putScript( - Function> fn) - throws IOException, OpenSearchException { - return putScript(fn.apply(new PutScriptRequest.Builder()).build()); - } - - // ----- Endpoint: rank_eval - - /** - * Allows to evaluate the quality of ranked search results over a set of typical - * search queries - * - * - */ - - public CompletableFuture rankEval(RankEvalRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) RankEvalRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to evaluate the quality of ranked search results over a set of typical - * search queries - * - * @param fn - * a function that initializes a builder to create the - * {@link RankEvalRequest} - * - */ - - public final CompletableFuture rankEval( - Function> fn) - throws IOException, OpenSearchException { - return rankEval(fn.apply(new RankEvalRequest.Builder()).build()); - } - - // ----- Endpoint: reindex - - /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. - * - * - */ - - public CompletableFuture reindex(ReindexRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ReindexRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. - * - * @param fn - * a function that initializes a builder to create the - * {@link ReindexRequest} - * - */ - - public final CompletableFuture reindex( - Function> fn) - throws IOException, OpenSearchException { - return reindex(fn.apply(new ReindexRequest.Builder()).build()); - } - - /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. - * - * - */ - - public CompletableFuture reindex() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new ReindexRequest.Builder().build(), ReindexRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: reindex_rethrottle - - /** - * Changes the number of requests per second for a particular Reindex operation. - * - * - */ - - public CompletableFuture reindexRethrottle(ReindexRethrottleRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - ReindexRethrottleRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Changes the number of requests per second for a particular Reindex operation. - * - * @param fn - * a function that initializes a builder to create the - * {@link ReindexRethrottleRequest} - * - */ - - public final CompletableFuture reindexRethrottle( - Function> fn) - throws IOException, OpenSearchException { - return reindexRethrottle(fn.apply(new ReindexRethrottleRequest.Builder()).build()); - } - - // ----- Endpoint: render_search_template - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * - */ - - public CompletableFuture renderSearchTemplate(RenderSearchTemplateRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - RenderSearchTemplateRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * @param fn - * a function that initializes a builder to create the - * {@link RenderSearchTemplateRequest} - * - */ - - public final CompletableFuture renderSearchTemplate( - Function> fn) - throws IOException, OpenSearchException { - return renderSearchTemplate(fn.apply(new RenderSearchTemplateRequest.Builder()).build()); - } - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * - */ - - public CompletableFuture renderSearchTemplate() - throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new RenderSearchTemplateRequest.Builder().build(), - RenderSearchTemplateRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: scripts_painless_execute - - /** - * Allows an arbitrary script to be executed and a result to be returned - * - * - */ - - public CompletableFuture> scriptsPainlessExecute( - ScriptsPainlessExecuteRequest request, Class tResultClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - ScriptsPainlessExecuteRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.scripts_painless_execute.TResult", - getDeserializer(tResultClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows an arbitrary script to be executed and a result to be returned - * - * @param fn - * a function that initializes a builder to create the - * {@link ScriptsPainlessExecuteRequest} - * - */ - - public final CompletableFuture> scriptsPainlessExecute( - Function> fn, - Class tResultClass) throws IOException, OpenSearchException { - return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), tResultClass); - } - - // ----- Endpoint: scroll - - /** - * Allows to retrieve a large numbers of results from a single search request. - * - */ - - public CompletableFuture> scroll(ScrollRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) ScrollRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.scroll.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to retrieve a large numbers of results from a single search request. - * - * @param fn - * a function that initializes a builder to create the - * {@link ScrollRequest} - */ - - public final CompletableFuture> scroll( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return scroll(fn.apply(new ScrollRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: search - - /** - * Returns results matching a query. - * - * - */ - - public CompletableFuture> search(SearchRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) SearchRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.search.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns results matching a query. - * - * @param fn - * a function that initializes a builder to create the - * {@link SearchRequest} - * - */ - - public final CompletableFuture> search( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: search_shards - - /** - * Returns information about the indices and shards that a search request would - * be executed against. - * - * - */ - - public CompletableFuture searchShards(SearchShardsRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) SearchShardsRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns information about the indices and shards that a search request would - * be executed against. - * - * @param fn - * a function that initializes a builder to create the - * {@link SearchShardsRequest} - * - */ - - public final CompletableFuture searchShards( - Function> fn) - throws IOException, OpenSearchException { - return searchShards(fn.apply(new SearchShardsRequest.Builder()).build()); - } - - /** - * Returns information about the indices and shards that a search request would - * be executed against. - * - * - */ - - public CompletableFuture searchShards() throws IOException, OpenSearchException { - return this.transport.performRequestAsync(new SearchShardsRequest.Builder().build(), - SearchShardsRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: search_template - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * - */ - - public CompletableFuture> searchTemplate( - SearchTemplateRequest request, Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - SearchTemplateRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.search_template.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * @param fn - * a function that initializes a builder to create the - * {@link SearchTemplateRequest} - * - */ - - public final CompletableFuture> searchTemplate( - Function> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: terms_enum - - /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. - * - * - */ - - public CompletableFuture termsEnum(TermsEnumRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) TermsEnumRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. - * - * @param fn - * a function that initializes a builder to create the - * {@link TermsEnumRequest} - * - */ - - public final CompletableFuture termsEnum( - Function> fn) - throws IOException, OpenSearchException { - return termsEnum(fn.apply(new TermsEnumRequest.Builder()).build()); - } - - // ----- Endpoint: termvectors - - /** - * Returns information and statistics about terms in the fields of a particular - * document. - * - * - */ - - public CompletableFuture termvectors(TermvectorsRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, TermvectorsResponse, ErrorResponse> endpoint = - (JsonEndpoint, TermvectorsResponse, ErrorResponse>) TermvectorsRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns information and statistics about terms in the fields of a particular - * document. - * - * @param fn - * a function that initializes a builder to create the - * {@link TermvectorsRequest} - * - */ - - public final CompletableFuture termvectors( - Function, ObjectBuilder>> fn) - throws IOException, OpenSearchException { - return termvectors(fn.apply(new TermvectorsRequest.Builder()).build()); - } - - // ----- Endpoint: update - - /** - * Updates a document with a script or partial document. - * - * - */ - - public CompletableFuture> update( - UpdateRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, UpdateResponse, ErrorResponse> endpoint = - (JsonEndpoint, UpdateResponse, ErrorResponse>) UpdateRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.update.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates a document with a script or partial document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateRequest} - * - */ - - public final CompletableFuture> update( - Function, - ObjectBuilder>> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return update(fn.apply(new UpdateRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: update_by_query - - /** - * Performs an update on every document in the index without changing the - * source, for example to pick up a mapping change. - * - * - */ - - public CompletableFuture updateByQuery(UpdateByQueryRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - UpdateByQueryRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Performs an update on every document in the index without changing the - * source, for example to pick up a mapping change. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateByQueryRequest} - * - */ - - public final CompletableFuture updateByQuery( - Function> fn) - throws IOException, OpenSearchException { - return updateByQuery(fn.apply(new UpdateByQueryRequest.Builder()).build()); - } - - // ----- Endpoint: update_by_query_rethrottle - - /** - * Changes the number of requests per second for a particular Update By Query - * operation. - * - * - */ - - public CompletableFuture updateByQueryRethrottle( - UpdateByQueryRethrottleRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - UpdateByQueryRethrottleRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Changes the number of requests per second for a particular Update By Query - * operation. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateByQueryRethrottleRequest} - * - */ - - public final CompletableFuture updateByQueryRethrottle( - Function> fn) - throws IOException, OpenSearchException { - return updateByQueryRethrottle(fn.apply(new UpdateByQueryRethrottleRequest.Builder()).build()); - } + public OpenSearchAsyncClient(OpenSearchTransport transport) { + super(transport, null); + } + + public OpenSearchAsyncClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public OpenSearchAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new OpenSearchAsyncClient(this.transport, transportOptions); + } + + // ----- Child clients + + public OpenSearchCatAsyncClient cat() { + return new OpenSearchCatAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchClusterAsyncClient cluster() { + return new OpenSearchClusterAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchDanglingIndicesAsyncClient danglingIndices() { + return new OpenSearchDanglingIndicesAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchFeaturesAsyncClient features() { + return new OpenSearchFeaturesAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchIndicesAsyncClient indices() { + return new OpenSearchIndicesAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchIngestAsyncClient ingest() { + return new OpenSearchIngestAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchNodesAsyncClient nodes() { + return new OpenSearchNodesAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchShutdownAsyncClient shutdown() { + return new OpenSearchShutdownAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchSnapshotAsyncClient snapshot() { + return new OpenSearchSnapshotAsyncClient(this.transport, this.transportOptions); + } + + public OpenSearchTasksAsyncClient tasks() { + return new OpenSearchTasksAsyncClient(this.transport, this.transportOptions); + } + + // ----- Endpoint: bulk + + /** + * Allows to perform multiple index/update/delete operations in a single + * request. + * + * + */ + + public CompletableFuture bulk(BulkRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + BulkRequest, + BulkResponse, + ErrorResponse>) BulkRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to perform multiple index/update/delete operations in a single + * request. + * + * @param fn + * a function that initializes a builder to create the + * {@link BulkRequest} + * + */ + + public final CompletableFuture bulk(Function> fn) throws IOException, + OpenSearchException { + return bulk(fn.apply(new BulkRequest.Builder()).build()); + } + + /** + * Allows to perform multiple index/update/delete operations in a single + * request. + * + * + */ + + public CompletableFuture bulk() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(new BulkRequest.Builder().build(), BulkRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: clear_scroll + + /** + * Explicitly clears the search context for a scroll. + * + * + */ + + public CompletableFuture clearScroll(ClearScrollRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ClearScrollRequest, + ClearScrollResponse, + ErrorResponse>) ClearScrollRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Explicitly clears the search context for a scroll. + * + * @param fn + * a function that initializes a builder to create the + * {@link ClearScrollRequest} + * + */ + + public final CompletableFuture clearScroll( + Function> fn + ) throws IOException, OpenSearchException { + return clearScroll(fn.apply(new ClearScrollRequest.Builder()).build()); + } + + /** + * Explicitly clears the search context for a scroll. + * + * + */ + + public CompletableFuture clearScroll() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + new ClearScrollRequest.Builder().build(), + ClearScrollRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: count + + /** + * Returns number of documents matching a query. + * + * + */ + + public CompletableFuture count(CountRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + CountRequest, + CountResponse, + ErrorResponse>) CountRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns number of documents matching a query. + * + * @param fn + * a function that initializes a builder to create the + * {@link CountRequest} + * + */ + + public final CompletableFuture count(Function> fn) throws IOException, + OpenSearchException { + return count(fn.apply(new CountRequest.Builder()).build()); + } + + /** + * Returns number of documents matching a query. + * + * + */ + + public CompletableFuture count() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(new CountRequest.Builder().build(), CountRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: create + + /** + * Creates a new document in the index. + *

+ * Returns a 409 response when a document with a same ID already exists in the + * index. + * + * + */ + + public CompletableFuture create(CreateRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, CreateResponse, ErrorResponse> endpoint = (JsonEndpoint< + CreateRequest, + CreateResponse, + ErrorResponse>) CreateRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates a new document in the index. + *

+ * Returns a 409 response when a document with a same ID already exists in the + * index. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreateRequest} + * + */ + + public final CompletableFuture create( + Function, ObjectBuilder>> fn + ) throws IOException, OpenSearchException { + return create(fn.apply(new CreateRequest.Builder()).build()); + } + + // ----- Endpoint: create_point_in_time + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * + */ + + public CompletableFuture createPit(CreatePitRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + CreatePitRequest, + CreatePitResponse, + ErrorResponse>) CreatePitRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreatePitRequest} + * + */ + + public final CompletableFuture createPit(Function> fn) + throws IOException, OpenSearchException { + return createPit(fn.apply(new CreatePitRequest.Builder()).build()); + } + + // ----- Endpoint: delete + + /** + * Removes a document from the index. + * + * + */ + + public CompletableFuture delete(DeleteRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteRequest, + DeleteResponse, + ErrorResponse>) DeleteRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Removes a document from the index. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteRequest} + * + */ + + public final CompletableFuture delete(Function> fn) + throws IOException, OpenSearchException { + return delete(fn.apply(new DeleteRequest.Builder()).build()); + } + + // ----- Endpoint: delete_point_in_time + + /** + * Delete Point In Time + * + * + */ + + public CompletableFuture deletePit(DeletePitRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeletePitRequest, + DeletePitResponse, + ErrorResponse>) DeletePitRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Delete Point In Time + * + * @param fn + * a function that initializes a builder to create the + * {@link DeletePitRequest} + * + */ + + public final CompletableFuture deletePit(Function> fn) + throws IOException, OpenSearchException { + return deletePit(fn.apply(new DeletePitRequest.Builder()).build()); + } + + // ----- Endpoint: delete_by_query + + /** + * Deletes documents matching the provided query. + * + * + */ + + public CompletableFuture deleteByQuery(DeleteByQueryRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteByQueryRequest, + DeleteByQueryResponse, + ErrorResponse>) DeleteByQueryRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes documents matching the provided query. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteByQueryRequest} + * + */ + + public final CompletableFuture deleteByQuery( + Function> fn + ) throws IOException, OpenSearchException { + return deleteByQuery(fn.apply(new DeleteByQueryRequest.Builder()).build()); + } + + // ----- Endpoint: delete_by_query_rethrottle + + /** + * Changes the number of requests per second for a particular Delete By Query + * operation. + * + * + */ + + public CompletableFuture deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteByQueryRethrottleRequest, + DeleteByQueryRethrottleResponse, + ErrorResponse>) DeleteByQueryRethrottleRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Changes the number of requests per second for a particular Delete By Query + * operation. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteByQueryRethrottleRequest} + * + */ + + public final CompletableFuture deleteByQueryRethrottle( + Function> fn + ) throws IOException, OpenSearchException { + return deleteByQueryRethrottle(fn.apply(new DeleteByQueryRethrottleRequest.Builder()).build()); + } + + // ----- Endpoint: delete_script + + /** + * Deletes a script. + * + * + */ + + public CompletableFuture deleteScript(DeleteScriptRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteScriptRequest, + DeleteScriptResponse, + ErrorResponse>) DeleteScriptRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes a script. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteScriptRequest} + * + */ + + public final CompletableFuture deleteScript( + Function> fn + ) throws IOException, OpenSearchException { + return deleteScript(fn.apply(new DeleteScriptRequest.Builder()).build()); + } + + // ----- Endpoint: exists + + /** + * Returns information about whether a document exists in an index. + * + * + */ + + public CompletableFuture exists(ExistsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ExistsRequest, + BooleanResponse, + ErrorResponse>) ExistsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about whether a document exists in an index. + * + * @param fn + * a function that initializes a builder to create the + * {@link ExistsRequest} + * + */ + + public final CompletableFuture exists(Function> fn) + throws IOException, OpenSearchException { + return exists(fn.apply(new ExistsRequest.Builder()).build()); + } + + // ----- Endpoint: exists_source + + /** + * Returns information about whether a document source exists in an index. + * + * + */ + + public CompletableFuture existsSource(ExistsSourceRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ExistsSourceRequest, + BooleanResponse, + ErrorResponse>) ExistsSourceRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about whether a document source exists in an index. + * + * @param fn + * a function that initializes a builder to create the + * {@link ExistsSourceRequest} + * + */ + + public final CompletableFuture existsSource( + Function> fn + ) throws IOException, OpenSearchException { + return existsSource(fn.apply(new ExistsSourceRequest.Builder()).build()); + } + + // ----- Endpoint: explain + + /** + * Returns information about why a specific matches (or doesn't match) a query. + * + * + */ + + public CompletableFuture> explain(ExplainRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + ExplainRequest, + ExplainResponse, + ErrorResponse>) ExplainRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.explain.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about why a specific matches (or doesn't match) a query. + * + * @param fn + * a function that initializes a builder to create the + * {@link ExplainRequest} + * + */ + + public final CompletableFuture> explain( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: field_caps + + /** + * Returns the information about the capabilities of fields among multiple + * indices. + */ + + public CompletableFuture fieldCaps(FieldCapsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + FieldCapsRequest, + FieldCapsResponse, + ErrorResponse>) FieldCapsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns the information about the capabilities of fields among multiple + * indices. + * + * @param fn + * a function that initializes a builder to create the + * {@link FieldCapsRequest} + * + */ + + public final CompletableFuture fieldCaps(Function> fn) + throws IOException, OpenSearchException { + return fieldCaps(fn.apply(new FieldCapsRequest.Builder()).build()); + } + + /** + * Returns the information about the capabilities of fields among multiple + * indices. + * + * + */ + + public CompletableFuture fieldCaps() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + new FieldCapsRequest.Builder().build(), + FieldCapsRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: get + + /** + * Returns a document. + * + * + */ + + public CompletableFuture> get(GetRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + GetRequest, + GetResponse, + ErrorResponse>) GetRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.get.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns a document. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetRequest} + * + */ + + public final CompletableFuture> get( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return get(fn.apply(new GetRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: get_script + + /** + * Returns a script. + * + * + */ + + public CompletableFuture getScript(GetScriptRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + GetScriptRequest, + GetScriptResponse, + ErrorResponse>) GetScriptRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns a script. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetScriptRequest} + * + */ + + public final CompletableFuture getScript(Function> fn) + throws IOException, OpenSearchException { + return getScript(fn.apply(new GetScriptRequest.Builder()).build()); + } + + // ----- Endpoint: get_script_context + + /** + * Returns all script contexts. + * + * + */ + public CompletableFuture getScriptContext() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + GetScriptContextRequest._INSTANCE, + GetScriptContextRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: get_script_languages + + /** + * Returns available script types, languages and contexts + * + * + */ + public CompletableFuture getScriptLanguages() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + GetScriptLanguagesRequest._INSTANCE, + GetScriptLanguagesRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: get_source + + /** + * Returns the source of a document. + * + * + */ + + public CompletableFuture> getSource(GetSourceRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + GetSourceRequest, + GetSourceResponse, + ErrorResponse>) GetSourceRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.get_source.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns the source of a document. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetSourceRequest} + * + */ + + public final CompletableFuture> getSource( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: index + + /** + * Creates or updates a document in an index. + * + * + */ + + public CompletableFuture index(IndexRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, IndexResponse, ErrorResponse> endpoint = (JsonEndpoint< + IndexRequest, + IndexResponse, + ErrorResponse>) IndexRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a document in an index. + * + * @param fn + * a function that initializes a builder to create the + * {@link IndexRequest} + * + */ + + public final CompletableFuture index( + Function, ObjectBuilder>> fn + ) throws IOException, OpenSearchException { + return index(fn.apply(new IndexRequest.Builder()).build()); + } + + // ----- Endpoint: info + + /** + * Returns basic information about the cluster. + * + * + */ + public CompletableFuture info() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: list_point_in_time + + /** + * List all Point In Time + * + * + */ + + public CompletableFuture listAllPit() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(ListAllPitRequest._INSTANCE, ListAllPitRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: mget + + /** + * Allows to get multiple documents in one request. + * + * + */ + + public CompletableFuture> mget(MgetRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + MgetRequest, + MgetResponse, + ErrorResponse>) MgetRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.mget.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to get multiple documents in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MgetRequest} + * + */ + + public final CompletableFuture> mget( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return mget(fn.apply(new MgetRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: msearch + + /** + * Allows to execute several search operations in one request. + * + * + */ + + public CompletableFuture> msearch(MsearchRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + MsearchRequest, + MsearchResponse, + ErrorResponse>) MsearchRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.msearch.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to execute several search operations in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MsearchRequest} + * + */ + + public final CompletableFuture> msearch( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return msearch(fn.apply(new MsearchRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: msearch_template + + /** + * Allows to execute several search template operations in one request. + * + * + */ + + public CompletableFuture> msearchTemplate( + MsearchTemplateRequest request, + Class tDocumentClass + ) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + MsearchTemplateRequest, + MsearchTemplateResponse, + ErrorResponse>) MsearchTemplateRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.msearch_template.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to execute several search template operations in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MsearchTemplateRequest} + * + */ + + public final CompletableFuture> msearchTemplate( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: mtermvectors + + /** + * Returns multiple termvectors in one request. + * + * + */ + + public CompletableFuture mtermvectors(MtermvectorsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + MtermvectorsRequest, + MtermvectorsResponse, + ErrorResponse>) MtermvectorsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns multiple termvectors in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MtermvectorsRequest} + * + */ + + public final CompletableFuture mtermvectors( + Function> fn + ) throws IOException, OpenSearchException { + return mtermvectors(fn.apply(new MtermvectorsRequest.Builder()).build()); + } + + /** + * Returns multiple termvectors in one request. + * + * + */ + + public CompletableFuture mtermvectors() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + new MtermvectorsRequest.Builder().build(), + MtermvectorsRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: ping + + /** + * Returns whether the cluster is running. + * + * + */ + public CompletableFuture ping() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(PingRequest._INSTANCE, PingRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: put_script + + /** + * Creates or updates a script. + * + * + */ + + public CompletableFuture putScript(PutScriptRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + PutScriptRequest, + PutScriptResponse, + ErrorResponse>) PutScriptRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a script. + * + * @param fn + * a function that initializes a builder to create the + * {@link PutScriptRequest} + * + */ + + public final CompletableFuture putScript(Function> fn) + throws IOException, OpenSearchException { + return putScript(fn.apply(new PutScriptRequest.Builder()).build()); + } + + // ----- Endpoint: rank_eval + + /** + * Allows to evaluate the quality of ranked search results over a set of typical + * search queries + * + * + */ + + public CompletableFuture rankEval(RankEvalRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + RankEvalRequest, + RankEvalResponse, + ErrorResponse>) RankEvalRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to evaluate the quality of ranked search results over a set of typical + * search queries + * + * @param fn + * a function that initializes a builder to create the + * {@link RankEvalRequest} + * + */ + + public final CompletableFuture rankEval(Function> fn) + throws IOException, OpenSearchException { + return rankEval(fn.apply(new RankEvalRequest.Builder()).build()); + } + + // ----- Endpoint: reindex + + /** + * Allows to copy documents from one index to another, optionally filtering the + * source documents by a query, changing the destination index settings, or + * fetching the documents from a remote cluster. + * + * + */ + + public CompletableFuture reindex(ReindexRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ReindexRequest, + ReindexResponse, + ErrorResponse>) ReindexRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to copy documents from one index to another, optionally filtering the + * source documents by a query, changing the destination index settings, or + * fetching the documents from a remote cluster. + * + * @param fn + * a function that initializes a builder to create the + * {@link ReindexRequest} + * + */ + + public final CompletableFuture reindex(Function> fn) + throws IOException, OpenSearchException { + return reindex(fn.apply(new ReindexRequest.Builder()).build()); + } + + /** + * Allows to copy documents from one index to another, optionally filtering the + * source documents by a query, changing the destination index settings, or + * fetching the documents from a remote cluster. + * + * + */ + + public CompletableFuture reindex() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(new ReindexRequest.Builder().build(), ReindexRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: reindex_rethrottle + + /** + * Changes the number of requests per second for a particular Reindex operation. + * + * + */ + + public CompletableFuture reindexRethrottle(ReindexRethrottleRequest request) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ReindexRethrottleRequest, + ReindexRethrottleResponse, + ErrorResponse>) ReindexRethrottleRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Changes the number of requests per second for a particular Reindex operation. + * + * @param fn + * a function that initializes a builder to create the + * {@link ReindexRethrottleRequest} + * + */ + + public final CompletableFuture reindexRethrottle( + Function> fn + ) throws IOException, OpenSearchException { + return reindexRethrottle(fn.apply(new ReindexRethrottleRequest.Builder()).build()); + } + + // ----- Endpoint: render_search_template + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * + */ + + public CompletableFuture renderSearchTemplate(RenderSearchTemplateRequest request) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + RenderSearchTemplateRequest, + RenderSearchTemplateResponse, + ErrorResponse>) RenderSearchTemplateRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * @param fn + * a function that initializes a builder to create the + * {@link RenderSearchTemplateRequest} + * + */ + + public final CompletableFuture renderSearchTemplate( + Function> fn + ) throws IOException, OpenSearchException { + return renderSearchTemplate(fn.apply(new RenderSearchTemplateRequest.Builder()).build()); + } + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * + */ + + public CompletableFuture renderSearchTemplate() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + new RenderSearchTemplateRequest.Builder().build(), + RenderSearchTemplateRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: scripts_painless_execute + + /** + * Allows an arbitrary script to be executed and a result to be returned + * + * + */ + + public CompletableFuture> scriptsPainlessExecute( + ScriptsPainlessExecuteRequest request, + Class tResultClass + ) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + ScriptsPainlessExecuteRequest, + ScriptsPainlessExecuteResponse, + ErrorResponse>) ScriptsPainlessExecuteRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.scripts_painless_execute.TResult", + getDeserializer(tResultClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows an arbitrary script to be executed and a result to be returned + * + * @param fn + * a function that initializes a builder to create the + * {@link ScriptsPainlessExecuteRequest} + * + */ + + public final CompletableFuture> scriptsPainlessExecute( + Function> fn, + Class tResultClass + ) throws IOException, OpenSearchException { + return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), tResultClass); + } + + // ----- Endpoint: scroll + + /** + * Allows to retrieve a large numbers of results from a single search request. + * + */ + + public CompletableFuture> scroll(ScrollRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + ScrollRequest, + ScrollResponse, + ErrorResponse>) ScrollRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.scroll.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to retrieve a large numbers of results from a single search request. + * + * @param fn + * a function that initializes a builder to create the + * {@link ScrollRequest} + */ + + public final CompletableFuture> scroll( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return scroll(fn.apply(new ScrollRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: search + + /** + * Returns results matching a query. + * + * + */ + + public CompletableFuture> search(SearchRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + SearchRequest, + SearchResponse, + ErrorResponse>) SearchRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.search.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns results matching a query. + * + * @param fn + * a function that initializes a builder to create the + * {@link SearchRequest} + * + */ + + public final CompletableFuture> search( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: search_shards + + /** + * Returns information about the indices and shards that a search request would + * be executed against. + * + * + */ + + public CompletableFuture searchShards(SearchShardsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + SearchShardsRequest, + SearchShardsResponse, + ErrorResponse>) SearchShardsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about the indices and shards that a search request would + * be executed against. + * + * @param fn + * a function that initializes a builder to create the + * {@link SearchShardsRequest} + * + */ + + public final CompletableFuture searchShards( + Function> fn + ) throws IOException, OpenSearchException { + return searchShards(fn.apply(new SearchShardsRequest.Builder()).build()); + } + + /** + * Returns information about the indices and shards that a search request would + * be executed against. + * + * + */ + + public CompletableFuture searchShards() throws IOException, OpenSearchException { + return this.transport.performRequestAsync( + new SearchShardsRequest.Builder().build(), + SearchShardsRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: search_template + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * + */ + + public CompletableFuture> searchTemplate( + SearchTemplateRequest request, + Class tDocumentClass + ) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + SearchTemplateRequest, + SearchTemplateResponse, + ErrorResponse>) SearchTemplateRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.search_template.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * @param fn + * a function that initializes a builder to create the + * {@link SearchTemplateRequest} + * + */ + + public final CompletableFuture> searchTemplate( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: terms_enum + + /** + * The terms enum API can be used to discover terms in the index that begin with + * the provided string. It is designed for low-latency look-ups used in + * auto-complete scenarios. + * + * + */ + + public CompletableFuture termsEnum(TermsEnumRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + TermsEnumRequest, + TermsEnumResponse, + ErrorResponse>) TermsEnumRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * The terms enum API can be used to discover terms in the index that begin with + * the provided string. It is designed for low-latency look-ups used in + * auto-complete scenarios. + * + * @param fn + * a function that initializes a builder to create the + * {@link TermsEnumRequest} + * + */ + + public final CompletableFuture termsEnum(Function> fn) + throws IOException, OpenSearchException { + return termsEnum(fn.apply(new TermsEnumRequest.Builder()).build()); + } + + // ----- Endpoint: termvectors + + /** + * Returns information and statistics about terms in the fields of a particular + * document. + * + * + */ + + public CompletableFuture termvectors(TermvectorsRequest request) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, TermvectorsResponse, ErrorResponse> endpoint = (JsonEndpoint< + TermvectorsRequest, + TermvectorsResponse, + ErrorResponse>) TermvectorsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information and statistics about terms in the fields of a particular + * document. + * + * @param fn + * a function that initializes a builder to create the + * {@link TermvectorsRequest} + * + */ + + public final CompletableFuture termvectors( + Function, ObjectBuilder>> fn + ) throws IOException, OpenSearchException { + return termvectors(fn.apply(new TermvectorsRequest.Builder()).build()); + } + + // ----- Endpoint: update + + /** + * Updates a document with a script or partial document. + * + * + */ + + public CompletableFuture> update( + UpdateRequest request, + Class tDocumentClass + ) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, UpdateResponse, ErrorResponse> endpoint = (JsonEndpoint< + UpdateRequest, + UpdateResponse, + ErrorResponse>) UpdateRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.update.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates a document with a script or partial document. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateRequest} + * + */ + + public final CompletableFuture> update( + Function, ObjectBuilder>> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return update(fn.apply(new UpdateRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: update_by_query + + /** + * Performs an update on every document in the index without changing the + * source, for example to pick up a mapping change. + * + * + */ + + public CompletableFuture updateByQuery(UpdateByQueryRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + UpdateByQueryRequest, + UpdateByQueryResponse, + ErrorResponse>) UpdateByQueryRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Performs an update on every document in the index without changing the + * source, for example to pick up a mapping change. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateByQueryRequest} + * + */ + + public final CompletableFuture updateByQuery( + Function> fn + ) throws IOException, OpenSearchException { + return updateByQuery(fn.apply(new UpdateByQueryRequest.Builder()).build()); + } + + // ----- Endpoint: update_by_query_rethrottle + + /** + * Changes the number of requests per second for a particular Update By Query + * operation. + * + * + */ + + public CompletableFuture updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + UpdateByQueryRethrottleRequest, + UpdateByQueryRethrottleResponse, + ErrorResponse>) UpdateByQueryRethrottleRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Changes the number of requests per second for a particular Update By Query + * operation. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateByQueryRethrottleRequest} + * + */ + + public final CompletableFuture updateByQueryRethrottle( + Function> fn + ) throws IOException, OpenSearchException { + return updateByQueryRethrottle(fn.apply(new UpdateByQueryRethrottleRequest.Builder()).build()); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java index 801ff279df..3b2d8d76ff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/OpenSearchClient.java @@ -32,9 +32,12 @@ package org.opensearch.client.opensearch; +import java.io.IOException; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.ApiClient; -import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.OpenSearchException; import org.opensearch.client.opensearch.cat.OpenSearchCatClient; import org.opensearch.client.opensearch.cluster.OpenSearchClusterClient; import org.opensearch.client.opensearch.core.BulkRequest; @@ -126,1446 +129,1540 @@ import org.opensearch.client.opensearch.shutdown.OpenSearchShutdownClient; import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotClient; import org.opensearch.client.opensearch.tasks.OpenSearchTasksClient; -import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.JsonEndpoint; +import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.TransportOptions; import org.opensearch.client.transport.endpoints.BooleanResponse; import org.opensearch.client.transport.endpoints.EndpointWithResponseMapperAttr; import org.opensearch.client.util.ObjectBuilder; -import java.io.IOException; -import java.util.function.Function; -import javax.annotation.Nullable; /** * Client for the namespace. */ public class OpenSearchClient extends ApiClient { - public OpenSearchClient(OpenSearchTransport transport) { - super(transport, null); - } - - public OpenSearchClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions) { - super(transport, transportOptions); - } - - @Override - public OpenSearchClient withTransportOptions(@Nullable TransportOptions transportOptions) { - return new OpenSearchClient(this.transport, transportOptions); - } - - // ----- Child clients - - public OpenSearchCatClient cat() { - return new OpenSearchCatClient(this.transport, this.transportOptions); - } - - public OpenSearchClusterClient cluster() { - return new OpenSearchClusterClient(this.transport, this.transportOptions); - } - - public OpenSearchDanglingIndicesClient danglingIndices() { - return new OpenSearchDanglingIndicesClient(this.transport, this.transportOptions); - } - - public OpenSearchFeaturesClient features() { - return new OpenSearchFeaturesClient(this.transport, this.transportOptions); - } - - public OpenSearchIndicesClient indices() { - return new OpenSearchIndicesClient(this.transport, this.transportOptions); - } - - public OpenSearchIngestClient ingest() { - return new OpenSearchIngestClient(this.transport, this.transportOptions); - } - - public OpenSearchNodesClient nodes() { - return new OpenSearchNodesClient(this.transport, this.transportOptions); - } - - public OpenSearchShutdownClient shutdown() { - return new OpenSearchShutdownClient(this.transport, this.transportOptions); - } - - public OpenSearchSnapshotClient snapshot() { - return new OpenSearchSnapshotClient(this.transport, this.transportOptions); - } - - public OpenSearchTasksClient tasks() { - return new OpenSearchTasksClient(this.transport, this.transportOptions); - } - - // ----- Endpoint: bulk - - /** - * Allows to perform multiple index/update/delete operations in a single - * request. - * - * - */ - - public BulkResponse bulk(BulkRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) BulkRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to perform multiple index/update/delete operations in a single - * request. - * - * @param fn - * a function that initializes a builder to create the - * {@link BulkRequest} - * - */ - - public final BulkResponse bulk(Function> fn) - throws IOException, OpenSearchException { - return bulk(fn.apply(new BulkRequest.Builder()).build()); - } - - /** - * Allows to perform multiple index/update/delete operations in a single - * request. - * - * - */ - - public BulkResponse bulk() throws IOException, OpenSearchException { - return this.transport.performRequest(new BulkRequest.Builder().build(), BulkRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: clear_scroll - - /** - * Explicitly clears the search context for a scroll. - * - * - */ - - public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ClearScrollRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Explicitly clears the search context for a scroll. - * - * @param fn - * a function that initializes a builder to create the - * {@link ClearScrollRequest} - * - */ - - public final ClearScrollResponse clearScroll( - Function> fn) - throws IOException, OpenSearchException { - return clearScroll(fn.apply(new ClearScrollRequest.Builder()).build()); - } - - /** - * Explicitly clears the search context for a scroll. - * - * - */ - - public ClearScrollResponse clearScroll() throws IOException, OpenSearchException { - return this.transport.performRequest(new ClearScrollRequest.Builder().build(), ClearScrollRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: count - - /** - * Returns number of documents matching a query. - * - * - */ - - public CountResponse count(CountRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) CountRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns number of documents matching a query. - * - * @param fn - * a function that initializes a builder to create the - * {@link CountRequest} - * - */ - - public final CountResponse count(Function> fn) - throws IOException, OpenSearchException { - return count(fn.apply(new CountRequest.Builder()).build()); - } - - /** - * Returns number of documents matching a query. - * - * - */ - - public CountResponse count() throws IOException, OpenSearchException { - return this.transport.performRequest(new CountRequest.Builder().build(), CountRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: create - - /** - * Creates a new document in the index. - *

- * Returns a 409 response when a document with a same ID already exists in the - * index. - * - * - */ - - public CreateResponse create(CreateRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, CreateResponse, ErrorResponse> endpoint = - (JsonEndpoint, CreateResponse, ErrorResponse>) CreateRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Creates a new document in the index. - *

- * Returns a 409 response when a document with a same ID already exists in the - * index. - * - * @param fn - * a function that initializes a builder to create the - * {@link CreateRequest} - * - */ - - public final CreateResponse create( - Function, ObjectBuilder>> fn) - throws IOException, OpenSearchException { - return create(fn.apply(new CreateRequest.Builder()).build()); - } - - // ----- Endpoint: create_point_in_time - - /** - * Provides low-level information about the disk utilization of a PIT by - * describing its Lucene segments. - * - * - */ - - public CreatePitResponse createPit(CreatePitRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) CreatePitRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Provides low-level information about the disk utilization of a PIT by - * describing its Lucene segments. - * - * @param fn - * a function that initializes a builder to create the - * {@link CreatePitRequest} - * - */ - - public final CreatePitResponse createPit( - Function> fn) - throws IOException, OpenSearchException { - return createPit(fn.apply(new CreatePitRequest.Builder()).build()); - } - - // ----- Endpoint: delete - - /** - * Removes a document from the index. - * - * - */ - - public DeleteResponse delete(DeleteRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) DeleteRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Removes a document from the index. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteRequest} - * - */ - - public final DeleteResponse delete(Function> fn) - throws IOException, OpenSearchException { - return delete(fn.apply(new DeleteRequest.Builder()).build()); - } - - // ----- Endpoint: delete_point_in_time - - /** - * Delete Point In Time - * - * - */ - - public DeletePitResponse deletePit(DeletePitRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) DeletePitRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Delete Point In Time - * - * @param fn - * a function that initializes a builder to create the - * {@link DeletePitRequest} - * - */ - - public final DeletePitResponse deletePit( - Function> fn) - throws IOException, OpenSearchException { - return deletePit(fn.apply(new DeletePitRequest.Builder()).build()); - } - - // ----- Endpoint: delete_by_query - - /** - * Deletes documents matching the provided query. - * - * - */ - - public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) DeleteByQueryRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Deletes documents matching the provided query. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteByQueryRequest} - * - */ - - public final DeleteByQueryResponse deleteByQuery( - Function> fn) - throws IOException, OpenSearchException { - return deleteByQuery(fn.apply(new DeleteByQueryRequest.Builder()).build()); - } - - // ----- Endpoint: delete_by_query_rethrottle - - /** - * Changes the number of requests per second for a particular Delete By Query - * operation. - * - * - */ - - public DeleteByQueryRethrottleResponse deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - DeleteByQueryRethrottleRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Changes the number of requests per second for a particular Delete By Query - * operation. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteByQueryRethrottleRequest} - * - */ - - public final DeleteByQueryRethrottleResponse deleteByQueryRethrottle( - Function> fn) - throws IOException, OpenSearchException { - return deleteByQueryRethrottle(fn.apply(new DeleteByQueryRethrottleRequest.Builder()).build()); - } - - // ----- Endpoint: delete_script - - /** - * Deletes a script. - * - * - */ - - public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) DeleteScriptRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Deletes a script. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteScriptRequest} - * - */ - - public final DeleteScriptResponse deleteScript( - Function> fn) - throws IOException, OpenSearchException { - return deleteScript(fn.apply(new DeleteScriptRequest.Builder()).build()); - } - - // ----- Endpoint: exists - - /** - * Returns information about whether a document exists in an index. - * - * - */ - - public BooleanResponse exists(ExistsRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ExistsRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns information about whether a document exists in an index. - * - * @param fn - * a function that initializes a builder to create the - * {@link ExistsRequest} - * - */ - - public final BooleanResponse exists(Function> fn) - throws IOException, OpenSearchException { - return exists(fn.apply(new ExistsRequest.Builder()).build()); - } - - // ----- Endpoint: exists_source - - /** - * Returns information about whether a document source exists in an index. - * - * - */ - - public BooleanResponse existsSource(ExistsSourceRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ExistsSourceRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns information about whether a document source exists in an index. - * - * @param fn - * a function that initializes a builder to create the - * {@link ExistsSourceRequest} - * - */ - - public final BooleanResponse existsSource( - Function> fn) - throws IOException, OpenSearchException { - return existsSource(fn.apply(new ExistsSourceRequest.Builder()).build()); - } - - // ----- Endpoint: explain - - /** - * Returns information about why a specific matches (or doesn't match) a query. - * - * - */ - - public ExplainResponse explain(ExplainRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) ExplainRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.explain.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns information about why a specific matches (or doesn't match) a query. - * - * @param fn - * a function that initializes a builder to create the - * {@link ExplainRequest} - * - */ - - public final ExplainResponse explain( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: field_caps - - /** - * Returns the information about the capabilities of fields among multiple - * indices. - * - * - */ - - public FieldCapsResponse fieldCaps(FieldCapsRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) FieldCapsRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns the information about the capabilities of fields among multiple - * indices. - * - * @param fn - * a function that initializes a builder to create the - * {@link FieldCapsRequest} - * - */ - - public final FieldCapsResponse fieldCaps(Function> fn) - throws IOException, OpenSearchException { - return fieldCaps(fn.apply(new FieldCapsRequest.Builder()).build()); - } - - /** - * Returns the information about the capabilities of fields among multiple - * indices. - * - * - */ - - public FieldCapsResponse fieldCaps() throws IOException, OpenSearchException { - return this.transport.performRequest(new FieldCapsRequest.Builder().build(), FieldCapsRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: get - - /** - * Returns a document. - * - * - */ - - public GetResponse get(GetRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) GetRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.get.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns a document. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetRequest} - * - */ - - public final GetResponse get(Function> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return get(fn.apply(new GetRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: get_script - - /** - * Returns a script. - * - * - */ - - public GetScriptResponse getScript(GetScriptRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) GetScriptRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns a script. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetScriptRequest} - * - */ - - public final GetScriptResponse getScript(Function> fn) - throws IOException, OpenSearchException { - return getScript(fn.apply(new GetScriptRequest.Builder()).build()); - } - - // ----- Endpoint: get_script_context - - /** - * Returns all script contexts. - * - * - */ - public GetScriptContextResponse getScriptContext() throws IOException, OpenSearchException { - return this.transport.performRequest(GetScriptContextRequest._INSTANCE, GetScriptContextRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: get_script_languages - - /** - * Returns available script types, languages and contexts - * - * - */ - public GetScriptLanguagesResponse getScriptLanguages() throws IOException, OpenSearchException { - return this.transport.performRequest(GetScriptLanguagesRequest._INSTANCE, GetScriptLanguagesRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: get_source - - /** - * Returns the source of a document. - * - * - */ - - public GetSourceResponse getSource(GetSourceRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - GetSourceRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.get_source.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns the source of a document. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetSourceRequest} - * - */ - - public final GetSourceResponse getSource( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: index - - /** - * Creates or updates a document in an index. - * - * - */ - - public IndexResponse index(IndexRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, IndexResponse, ErrorResponse> endpoint = - (JsonEndpoint, IndexResponse, ErrorResponse>) IndexRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Creates or updates a document in an index. - * - * @param fn - * a function that initializes a builder to create the - * {@link IndexRequest} - * - */ - - public final IndexResponse index( - Function, ObjectBuilder>> fn) - throws IOException, OpenSearchException { - return index(fn.apply(new IndexRequest.Builder()).build()); - } - - // ----- Endpoint: info - - /** - * Returns basic information about the cluster. - * - * - */ - public InfoResponse info() throws IOException, OpenSearchException { - return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: list_point_in_time - - /** - * List all Point In Time - * - * - */ - - public ListAllPitResponse listAllPit() - throws IOException, OpenSearchException { - return this.transport.performRequest(ListAllPitRequest._INSTANCE, ListAllPitRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: mget - - /** - * Allows to get multiple documents in one request. - * - * - */ - - public MgetResponse mget(MgetRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) MgetRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.mget.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to get multiple documents in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MgetRequest} - * - */ - - public final MgetResponse mget(Function> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return mget(fn.apply(new MgetRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: msearch - - /** - * Allows to execute several search operations in one request. - * - * - */ - - public MsearchResponse msearch(MsearchRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) MsearchRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.msearch.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to execute several search operations in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MsearchRequest} - * - */ - - public final MsearchResponse msearch( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return msearch(fn.apply(new MsearchRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: msearch_template - - /** - * Allows to execute several search template operations in one request. - * - * - */ - - public MsearchTemplateResponse msearchTemplate(MsearchTemplateRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - MsearchTemplateRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.msearch_template.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to execute several search template operations in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MsearchTemplateRequest} - * - */ - - public final MsearchTemplateResponse msearchTemplate( - Function> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: mtermvectors - - /** - * Returns multiple termvectors in one request. - * - * - */ - - public MtermvectorsResponse mtermvectors(MtermvectorsRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) MtermvectorsRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns multiple termvectors in one request. - * - * @param fn - * a function that initializes a builder to create the - * {@link MtermvectorsRequest} - * - */ - - public final MtermvectorsResponse mtermvectors( - Function> fn) - throws IOException, OpenSearchException { - return mtermvectors(fn.apply(new MtermvectorsRequest.Builder()).build()); - } - - /** - * Returns multiple termvectors in one request. - * - * - */ - - public MtermvectorsResponse mtermvectors() throws IOException, OpenSearchException { - return this.transport.performRequest(new MtermvectorsRequest.Builder().build(), MtermvectorsRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: ping - - /** - * Returns whether the cluster is running. - * - * - */ - public BooleanResponse ping() throws IOException, OpenSearchException { - return this.transport.performRequest(PingRequest._INSTANCE, PingRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: put_script - - /** - * Creates or updates a script. - * - * - */ - - public PutScriptResponse putScript(PutScriptRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) PutScriptRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Creates or updates a script. - * - * @param fn - * a function that initializes a builder to create the - * {@link PutScriptRequest} - * - */ - - public final PutScriptResponse putScript(Function> fn) - throws IOException, OpenSearchException { - return putScript(fn.apply(new PutScriptRequest.Builder()).build()); - } - - // ----- Endpoint: rank_eval - - /** - * Allows to evaluate the quality of ranked search results over a set of typical - * search queries - * - * - */ - - public RankEvalResponse rankEval(RankEvalRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) RankEvalRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to evaluate the quality of ranked search results over a set of typical - * search queries - * - * @param fn - * a function that initializes a builder to create the - * {@link RankEvalRequest} - * - */ - - public final RankEvalResponse rankEval(Function> fn) - throws IOException, OpenSearchException { - return rankEval(fn.apply(new RankEvalRequest.Builder()).build()); - } - - // ----- Endpoint: reindex - - /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. - * - * - */ - - public ReindexResponse reindex(ReindexRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) ReindexRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. - * - * @param fn - * a function that initializes a builder to create the - * {@link ReindexRequest} - * - */ - - public final ReindexResponse reindex(Function> fn) - throws IOException, OpenSearchException { - return reindex(fn.apply(new ReindexRequest.Builder()).build()); - } - - /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. - * - * - */ - - public ReindexResponse reindex() throws IOException, OpenSearchException { - return this.transport.performRequest(new ReindexRequest.Builder().build(), ReindexRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: reindex_rethrottle - - /** - * Changes the number of requests per second for a particular Reindex operation. - * - * - */ - - public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - ReindexRethrottleRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Changes the number of requests per second for a particular Reindex operation. - * - * @param fn - * a function that initializes a builder to create the - * {@link ReindexRethrottleRequest} - * - */ - - public final ReindexRethrottleResponse reindexRethrottle( - Function> fn) - throws IOException, OpenSearchException { - return reindexRethrottle(fn.apply(new ReindexRethrottleRequest.Builder()).build()); - } - - // ----- Endpoint: render_search_template - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * - */ - - public RenderSearchTemplateResponse renderSearchTemplate(RenderSearchTemplateRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - RenderSearchTemplateRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * @param fn - * a function that initializes a builder to create the - * {@link RenderSearchTemplateRequest} - * - */ - - public final RenderSearchTemplateResponse renderSearchTemplate( - Function> fn) - throws IOException, OpenSearchException { - return renderSearchTemplate(fn.apply(new RenderSearchTemplateRequest.Builder()).build()); - } - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * - */ - - public RenderSearchTemplateResponse renderSearchTemplate() throws IOException, OpenSearchException { - return this.transport.performRequest(new RenderSearchTemplateRequest.Builder().build(), - RenderSearchTemplateRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: scripts_painless_execute - - /** - * Allows an arbitrary script to be executed and a result to be returned - * - * - */ - - public ScriptsPainlessExecuteResponse scriptsPainlessExecute( - ScriptsPainlessExecuteRequest request, Class tResultClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - ScriptsPainlessExecuteRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.scripts_painless_execute.TResult", - getDeserializer(tResultClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows an arbitrary script to be executed and a result to be returned - * - * @param fn - * a function that initializes a builder to create the - * {@link ScriptsPainlessExecuteRequest} - * - */ - - public final ScriptsPainlessExecuteResponse scriptsPainlessExecute( - Function> fn, - Class tResultClass) throws IOException, OpenSearchException { - return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), tResultClass); - } - - // ----- Endpoint: scroll - - /** - * Allows to retrieve a large numbers of results from a single search request. - * - */ - - public ScrollResponse scroll(ScrollRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) ScrollRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.scroll.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to retrieve a large numbers of results from a single search request. - * - * @param fn - * a function that initializes a builder to create the - * {@link ScrollRequest} - */ - - public final ScrollResponse scroll( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return scroll(fn.apply(new ScrollRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: search - - /** - * Returns results matching a query. - * - * - */ - - public SearchResponse search(SearchRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) SearchRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.search.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns results matching a query. - * - * @param fn - * a function that initializes a builder to create the - * {@link SearchRequest} - * - */ - - public final SearchResponse search( - Function> fn, Class tDocumentClass) - throws IOException, OpenSearchException { - return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: search_shards - - /** - * Returns information about the indices and shards that a search request would - * be executed against. - * - * - */ - - public SearchShardsResponse searchShards(SearchShardsRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) SearchShardsRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns information about the indices and shards that a search request would - * be executed against. - * - * @param fn - * a function that initializes a builder to create the - * {@link SearchShardsRequest} - * - */ - - public final SearchShardsResponse searchShards( - Function> fn) - throws IOException, OpenSearchException { - return searchShards(fn.apply(new SearchShardsRequest.Builder()).build()); - } - - /** - * Returns information about the indices and shards that a search request would - * be executed against. - * - * - */ - - public SearchShardsResponse searchShards() throws IOException, OpenSearchException { - return this.transport.performRequest(new SearchShardsRequest.Builder().build(), SearchShardsRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: search_template - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * - */ - - public SearchTemplateResponse searchTemplate(SearchTemplateRequest request, - Class tDocumentClass) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, ErrorResponse> endpoint = - (JsonEndpoint, ErrorResponse>) - SearchTemplateRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.search_template.TDocument", - getDeserializer(tDocumentClass)); - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Allows to use the Mustache language to pre-render a search definition. - * - * @param fn - * a function that initializes a builder to create the - * {@link SearchTemplateRequest} - * - */ - - public final SearchTemplateResponse searchTemplate( - Function> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: terms_enum - - /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. - * - * - */ - - public TermsEnumResponse termsEnum(TermsEnumRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) TermsEnumRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. - * - * @param fn - * a function that initializes a builder to create the - * {@link TermsEnumRequest} - * - */ - - public final TermsEnumResponse termsEnum(Function> fn) - throws IOException, OpenSearchException { - return termsEnum(fn.apply(new TermsEnumRequest.Builder()).build()); - } - - // ----- Endpoint: termvectors - - /** - * Returns information and statistics about terms in the fields of a particular - * document. - * - * - */ - - public TermvectorsResponse termvectors(TermvectorsRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, TermvectorsResponse, ErrorResponse> endpoint = - (JsonEndpoint, TermvectorsResponse, ErrorResponse>) TermvectorsRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns information and statistics about terms in the fields of a particular - * document. - * - * @param fn - * a function that initializes a builder to create the - * {@link TermvectorsRequest} - * - */ - - public final TermvectorsResponse termvectors( - Function, ObjectBuilder>> fn) - throws IOException, OpenSearchException { - return termvectors(fn.apply(new TermvectorsRequest.Builder()).build()); - } - - // ----- Endpoint: update - - /** - * Updates a document with a script or partial document. - * - * - */ - - public UpdateResponse update( - UpdateRequest request, Class tDocumentClass) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint, UpdateResponse, ErrorResponse> endpoint = - (JsonEndpoint, UpdateResponse, ErrorResponse>) UpdateRequest._ENDPOINT; - endpoint = new EndpointWithResponseMapperAttr<>(endpoint, - "org.opensearch.client:Deserializer:_global.update.TDocument", getDeserializer(tDocumentClass)); - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates a document with a script or partial document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateRequest} - * - */ - - public final UpdateResponse update( - - Function, - ObjectBuilder>> fn, - Class tDocumentClass) throws IOException, OpenSearchException { - return update(fn.apply(new UpdateRequest.Builder()).build(), tDocumentClass); - } - - // ----- Endpoint: update_by_query - - /** - * Performs an update on every document in the index without changing the - * source, for example to pick up a mapping change. - * - * - */ - - public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - UpdateByQueryRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Performs an update on every document in the index without changing the - * source, for example to pick up a mapping change. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateByQueryRequest} - * - */ - - public final UpdateByQueryResponse updateByQuery( - Function> fn) - throws IOException, OpenSearchException { - return updateByQuery(fn.apply(new UpdateByQueryRequest.Builder()).build()); - } - - // ----- Endpoint: update_by_query_rethrottle - - /** - * Changes the number of requests per second for a particular Update By Query - * operation. - * - * - */ - - public UpdateByQueryRethrottleResponse updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) - throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = - (JsonEndpoint) - UpdateByQueryRethrottleRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Changes the number of requests per second for a particular Update By Query - * operation. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateByQueryRethrottleRequest} - * - */ - - public final UpdateByQueryRethrottleResponse updateByQueryRethrottle( - Function> fn) - throws IOException, OpenSearchException { - return updateByQueryRethrottle(fn.apply(new UpdateByQueryRethrottleRequest.Builder()).build()); - } + public OpenSearchClient(OpenSearchTransport transport) { + super(transport, null); + } + + public OpenSearchClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public OpenSearchClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new OpenSearchClient(this.transport, transportOptions); + } + + // ----- Child clients + + public OpenSearchCatClient cat() { + return new OpenSearchCatClient(this.transport, this.transportOptions); + } + + public OpenSearchClusterClient cluster() { + return new OpenSearchClusterClient(this.transport, this.transportOptions); + } + + public OpenSearchDanglingIndicesClient danglingIndices() { + return new OpenSearchDanglingIndicesClient(this.transport, this.transportOptions); + } + + public OpenSearchFeaturesClient features() { + return new OpenSearchFeaturesClient(this.transport, this.transportOptions); + } + + public OpenSearchIndicesClient indices() { + return new OpenSearchIndicesClient(this.transport, this.transportOptions); + } + + public OpenSearchIngestClient ingest() { + return new OpenSearchIngestClient(this.transport, this.transportOptions); + } + + public OpenSearchNodesClient nodes() { + return new OpenSearchNodesClient(this.transport, this.transportOptions); + } + + public OpenSearchShutdownClient shutdown() { + return new OpenSearchShutdownClient(this.transport, this.transportOptions); + } + + public OpenSearchSnapshotClient snapshot() { + return new OpenSearchSnapshotClient(this.transport, this.transportOptions); + } + + public OpenSearchTasksClient tasks() { + return new OpenSearchTasksClient(this.transport, this.transportOptions); + } + + // ----- Endpoint: bulk + + /** + * Allows to perform multiple index/update/delete operations in a single + * request. + * + * + */ + + public BulkResponse bulk(BulkRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + BulkRequest, + BulkResponse, + ErrorResponse>) BulkRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to perform multiple index/update/delete operations in a single + * request. + * + * @param fn + * a function that initializes a builder to create the + * {@link BulkRequest} + * + */ + + public final BulkResponse bulk(Function> fn) throws IOException, OpenSearchException { + return bulk(fn.apply(new BulkRequest.Builder()).build()); + } + + /** + * Allows to perform multiple index/update/delete operations in a single + * request. + * + * + */ + + public BulkResponse bulk() throws IOException, OpenSearchException { + return this.transport.performRequest(new BulkRequest.Builder().build(), BulkRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: clear_scroll + + /** + * Explicitly clears the search context for a scroll. + * + * + */ + + public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ClearScrollRequest, + ClearScrollResponse, + ErrorResponse>) ClearScrollRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Explicitly clears the search context for a scroll. + * + * @param fn + * a function that initializes a builder to create the + * {@link ClearScrollRequest} + * + */ + + public final ClearScrollResponse clearScroll(Function> fn) + throws IOException, OpenSearchException { + return clearScroll(fn.apply(new ClearScrollRequest.Builder()).build()); + } + + /** + * Explicitly clears the search context for a scroll. + * + * + */ + + public ClearScrollResponse clearScroll() throws IOException, OpenSearchException { + return this.transport.performRequest(new ClearScrollRequest.Builder().build(), ClearScrollRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: count + + /** + * Returns number of documents matching a query. + * + * + */ + + public CountResponse count(CountRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + CountRequest, + CountResponse, + ErrorResponse>) CountRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns number of documents matching a query. + * + * @param fn + * a function that initializes a builder to create the + * {@link CountRequest} + * + */ + + public final CountResponse count(Function> fn) throws IOException, + OpenSearchException { + return count(fn.apply(new CountRequest.Builder()).build()); + } + + /** + * Returns number of documents matching a query. + * + * + */ + + public CountResponse count() throws IOException, OpenSearchException { + return this.transport.performRequest(new CountRequest.Builder().build(), CountRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: create + + /** + * Creates a new document in the index. + *

+ * Returns a 409 response when a document with a same ID already exists in the + * index. + * + * + */ + + public CreateResponse create(CreateRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, CreateResponse, ErrorResponse> endpoint = (JsonEndpoint< + CreateRequest, + CreateResponse, + ErrorResponse>) CreateRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates a new document in the index. + *

+ * Returns a 409 response when a document with a same ID already exists in the + * index. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreateRequest} + * + */ + + public final CreateResponse create(Function, ObjectBuilder>> fn) + throws IOException, OpenSearchException { + return create(fn.apply(new CreateRequest.Builder()).build()); + } + + // ----- Endpoint: create_point_in_time + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * + */ + + public CreatePitResponse createPit(CreatePitRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + CreatePitRequest, + CreatePitResponse, + ErrorResponse>) CreatePitRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Provides low-level information about the disk utilization of a PIT by + * describing its Lucene segments. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreatePitRequest} + * + */ + + public final CreatePitResponse createPit(Function> fn) throws IOException, + OpenSearchException { + return createPit(fn.apply(new CreatePitRequest.Builder()).build()); + } + + // ----- Endpoint: delete + + /** + * Removes a document from the index. + * + * + */ + + public DeleteResponse delete(DeleteRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteRequest, + DeleteResponse, + ErrorResponse>) DeleteRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Removes a document from the index. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteRequest} + * + */ + + public final DeleteResponse delete(Function> fn) throws IOException, + OpenSearchException { + return delete(fn.apply(new DeleteRequest.Builder()).build()); + } + + // ----- Endpoint: delete_point_in_time + + /** + * Delete Point In Time + * + * + */ + + public DeletePitResponse deletePit(DeletePitRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeletePitRequest, + DeletePitResponse, + ErrorResponse>) DeletePitRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Delete Point In Time + * + * @param fn + * a function that initializes a builder to create the + * {@link DeletePitRequest} + * + */ + + public final DeletePitResponse deletePit(Function> fn) throws IOException, + OpenSearchException { + return deletePit(fn.apply(new DeletePitRequest.Builder()).build()); + } + + // ----- Endpoint: delete_by_query + + /** + * Deletes documents matching the provided query. + * + * + */ + + public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteByQueryRequest, + DeleteByQueryResponse, + ErrorResponse>) DeleteByQueryRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes documents matching the provided query. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteByQueryRequest} + * + */ + + public final DeleteByQueryResponse deleteByQuery(Function> fn) + throws IOException, OpenSearchException { + return deleteByQuery(fn.apply(new DeleteByQueryRequest.Builder()).build()); + } + + // ----- Endpoint: delete_by_query_rethrottle + + /** + * Changes the number of requests per second for a particular Delete By Query + * operation. + * + * + */ + + public DeleteByQueryRethrottleResponse deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteByQueryRethrottleRequest, + DeleteByQueryRethrottleResponse, + ErrorResponse>) DeleteByQueryRethrottleRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Changes the number of requests per second for a particular Delete By Query + * operation. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteByQueryRethrottleRequest} + * + */ + + public final DeleteByQueryRethrottleResponse deleteByQueryRethrottle( + Function> fn + ) throws IOException, OpenSearchException { + return deleteByQueryRethrottle(fn.apply(new DeleteByQueryRethrottleRequest.Builder()).build()); + } + + // ----- Endpoint: delete_script + + /** + * Deletes a script. + * + * + */ + + public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + DeleteScriptRequest, + DeleteScriptResponse, + ErrorResponse>) DeleteScriptRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes a script. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteScriptRequest} + * + */ + + public final DeleteScriptResponse deleteScript(Function> fn) + throws IOException, OpenSearchException { + return deleteScript(fn.apply(new DeleteScriptRequest.Builder()).build()); + } + + // ----- Endpoint: exists + + /** + * Returns information about whether a document exists in an index. + * + * + */ + + public BooleanResponse exists(ExistsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ExistsRequest, + BooleanResponse, + ErrorResponse>) ExistsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about whether a document exists in an index. + * + * @param fn + * a function that initializes a builder to create the + * {@link ExistsRequest} + * + */ + + public final BooleanResponse exists(Function> fn) throws IOException, + OpenSearchException { + return exists(fn.apply(new ExistsRequest.Builder()).build()); + } + + // ----- Endpoint: exists_source + + /** + * Returns information about whether a document source exists in an index. + * + * + */ + + public BooleanResponse existsSource(ExistsSourceRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ExistsSourceRequest, + BooleanResponse, + ErrorResponse>) ExistsSourceRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about whether a document source exists in an index. + * + * @param fn + * a function that initializes a builder to create the + * {@link ExistsSourceRequest} + * + */ + + public final BooleanResponse existsSource(Function> fn) + throws IOException, OpenSearchException { + return existsSource(fn.apply(new ExistsSourceRequest.Builder()).build()); + } + + // ----- Endpoint: explain + + /** + * Returns information about why a specific matches (or doesn't match) a query. + * + * + */ + + public ExplainResponse explain(ExplainRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + ExplainRequest, + ExplainResponse, + ErrorResponse>) ExplainRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.explain.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about why a specific matches (or doesn't match) a query. + * + * @param fn + * a function that initializes a builder to create the + * {@link ExplainRequest} + * + */ + + public final ExplainResponse explain( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: field_caps + + /** + * Returns the information about the capabilities of fields among multiple + * indices. + * + * + */ + + public FieldCapsResponse fieldCaps(FieldCapsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + FieldCapsRequest, + FieldCapsResponse, + ErrorResponse>) FieldCapsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns the information about the capabilities of fields among multiple + * indices. + * + * @param fn + * a function that initializes a builder to create the + * {@link FieldCapsRequest} + * + */ + + public final FieldCapsResponse fieldCaps(Function> fn) throws IOException, + OpenSearchException { + return fieldCaps(fn.apply(new FieldCapsRequest.Builder()).build()); + } + + /** + * Returns the information about the capabilities of fields among multiple + * indices. + * + * + */ + + public FieldCapsResponse fieldCaps() throws IOException, OpenSearchException { + return this.transport.performRequest(new FieldCapsRequest.Builder().build(), FieldCapsRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: get + + /** + * Returns a document. + * + * + */ + + public GetResponse get(GetRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + GetRequest, + GetResponse, + ErrorResponse>) GetRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.get.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns a document. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetRequest} + * + */ + + public final GetResponse get( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return get(fn.apply(new GetRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: get_script + + /** + * Returns a script. + * + * + */ + + public GetScriptResponse getScript(GetScriptRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + GetScriptRequest, + GetScriptResponse, + ErrorResponse>) GetScriptRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns a script. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetScriptRequest} + * + */ + + public final GetScriptResponse getScript(Function> fn) throws IOException, + OpenSearchException { + return getScript(fn.apply(new GetScriptRequest.Builder()).build()); + } + + // ----- Endpoint: get_script_context + + /** + * Returns all script contexts. + * + * + */ + public GetScriptContextResponse getScriptContext() throws IOException, OpenSearchException { + return this.transport.performRequest(GetScriptContextRequest._INSTANCE, GetScriptContextRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: get_script_languages + + /** + * Returns available script types, languages and contexts + * + * + */ + public GetScriptLanguagesResponse getScriptLanguages() throws IOException, OpenSearchException { + return this.transport.performRequest( + GetScriptLanguagesRequest._INSTANCE, + GetScriptLanguagesRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: get_source + + /** + * Returns the source of a document. + * + * + */ + + public GetSourceResponse getSource(GetSourceRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + GetSourceRequest, + GetSourceResponse, + ErrorResponse>) GetSourceRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.get_source.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns the source of a document. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetSourceRequest} + * + */ + + public final GetSourceResponse getSource( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: index + + /** + * Creates or updates a document in an index. + * + * + */ + + public IndexResponse index(IndexRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, IndexResponse, ErrorResponse> endpoint = (JsonEndpoint< + IndexRequest, + IndexResponse, + ErrorResponse>) IndexRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a document in an index. + * + * @param fn + * a function that initializes a builder to create the + * {@link IndexRequest} + * + */ + + public final IndexResponse index(Function, ObjectBuilder>> fn) + throws IOException, OpenSearchException { + return index(fn.apply(new IndexRequest.Builder()).build()); + } + + // ----- Endpoint: info + + /** + * Returns basic information about the cluster. + * + * + */ + public InfoResponse info() throws IOException, OpenSearchException { + return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: list_point_in_time + + /** + * List all Point In Time + * + * + */ + + public ListAllPitResponse listAllPit() throws IOException, OpenSearchException { + return this.transport.performRequest(ListAllPitRequest._INSTANCE, ListAllPitRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: mget + + /** + * Allows to get multiple documents in one request. + * + * + */ + + public MgetResponse mget(MgetRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + MgetRequest, + MgetResponse, + ErrorResponse>) MgetRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.mget.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to get multiple documents in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MgetRequest} + * + */ + + public final MgetResponse mget( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return mget(fn.apply(new MgetRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: msearch + + /** + * Allows to execute several search operations in one request. + * + * + */ + + public MsearchResponse msearch(MsearchRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + MsearchRequest, + MsearchResponse, + ErrorResponse>) MsearchRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.msearch.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to execute several search operations in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MsearchRequest} + * + */ + + public final MsearchResponse msearch( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return msearch(fn.apply(new MsearchRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: msearch_template + + /** + * Allows to execute several search template operations in one request. + * + * + */ + + public MsearchTemplateResponse msearchTemplate(MsearchTemplateRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + MsearchTemplateRequest, + MsearchTemplateResponse, + ErrorResponse>) MsearchTemplateRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.msearch_template.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to execute several search template operations in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MsearchTemplateRequest} + * + */ + + public final MsearchTemplateResponse msearchTemplate( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: mtermvectors + + /** + * Returns multiple termvectors in one request. + * + * + */ + + public MtermvectorsResponse mtermvectors(MtermvectorsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + MtermvectorsRequest, + MtermvectorsResponse, + ErrorResponse>) MtermvectorsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns multiple termvectors in one request. + * + * @param fn + * a function that initializes a builder to create the + * {@link MtermvectorsRequest} + * + */ + + public final MtermvectorsResponse mtermvectors(Function> fn) + throws IOException, OpenSearchException { + return mtermvectors(fn.apply(new MtermvectorsRequest.Builder()).build()); + } + + /** + * Returns multiple termvectors in one request. + * + * + */ + + public MtermvectorsResponse mtermvectors() throws IOException, OpenSearchException { + return this.transport.performRequest( + new MtermvectorsRequest.Builder().build(), + MtermvectorsRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: ping + + /** + * Returns whether the cluster is running. + * + * + */ + public BooleanResponse ping() throws IOException, OpenSearchException { + return this.transport.performRequest(PingRequest._INSTANCE, PingRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: put_script + + /** + * Creates or updates a script. + * + * + */ + + public PutScriptResponse putScript(PutScriptRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + PutScriptRequest, + PutScriptResponse, + ErrorResponse>) PutScriptRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a script. + * + * @param fn + * a function that initializes a builder to create the + * {@link PutScriptRequest} + * + */ + + public final PutScriptResponse putScript(Function> fn) throws IOException, + OpenSearchException { + return putScript(fn.apply(new PutScriptRequest.Builder()).build()); + } + + // ----- Endpoint: rank_eval + + /** + * Allows to evaluate the quality of ranked search results over a set of typical + * search queries + * + * + */ + + public RankEvalResponse rankEval(RankEvalRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + RankEvalRequest, + RankEvalResponse, + ErrorResponse>) RankEvalRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to evaluate the quality of ranked search results over a set of typical + * search queries + * + * @param fn + * a function that initializes a builder to create the + * {@link RankEvalRequest} + * + */ + + public final RankEvalResponse rankEval(Function> fn) throws IOException, + OpenSearchException { + return rankEval(fn.apply(new RankEvalRequest.Builder()).build()); + } + + // ----- Endpoint: reindex + + /** + * Allows to copy documents from one index to another, optionally filtering the + * source documents by a query, changing the destination index settings, or + * fetching the documents from a remote cluster. + * + * + */ + + public ReindexResponse reindex(ReindexRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ReindexRequest, + ReindexResponse, + ErrorResponse>) ReindexRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to copy documents from one index to another, optionally filtering the + * source documents by a query, changing the destination index settings, or + * fetching the documents from a remote cluster. + * + * @param fn + * a function that initializes a builder to create the + * {@link ReindexRequest} + * + */ + + public final ReindexResponse reindex(Function> fn) throws IOException, + OpenSearchException { + return reindex(fn.apply(new ReindexRequest.Builder()).build()); + } + + /** + * Allows to copy documents from one index to another, optionally filtering the + * source documents by a query, changing the destination index settings, or + * fetching the documents from a remote cluster. + * + * + */ + + public ReindexResponse reindex() throws IOException, OpenSearchException { + return this.transport.performRequest(new ReindexRequest.Builder().build(), ReindexRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: reindex_rethrottle + + /** + * Changes the number of requests per second for a particular Reindex operation. + * + * + */ + + public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + ReindexRethrottleRequest, + ReindexRethrottleResponse, + ErrorResponse>) ReindexRethrottleRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Changes the number of requests per second for a particular Reindex operation. + * + * @param fn + * a function that initializes a builder to create the + * {@link ReindexRethrottleRequest} + * + */ + + public final ReindexRethrottleResponse reindexRethrottle( + Function> fn + ) throws IOException, OpenSearchException { + return reindexRethrottle(fn.apply(new ReindexRethrottleRequest.Builder()).build()); + } + + // ----- Endpoint: render_search_template + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * + */ + + public RenderSearchTemplateResponse renderSearchTemplate(RenderSearchTemplateRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + RenderSearchTemplateRequest, + RenderSearchTemplateResponse, + ErrorResponse>) RenderSearchTemplateRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * @param fn + * a function that initializes a builder to create the + * {@link RenderSearchTemplateRequest} + * + */ + + public final RenderSearchTemplateResponse renderSearchTemplate( + Function> fn + ) throws IOException, OpenSearchException { + return renderSearchTemplate(fn.apply(new RenderSearchTemplateRequest.Builder()).build()); + } + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * + */ + + public RenderSearchTemplateResponse renderSearchTemplate() throws IOException, OpenSearchException { + return this.transport.performRequest( + new RenderSearchTemplateRequest.Builder().build(), + RenderSearchTemplateRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: scripts_painless_execute + + /** + * Allows an arbitrary script to be executed and a result to be returned + * + * + */ + + public ScriptsPainlessExecuteResponse scriptsPainlessExecute( + ScriptsPainlessExecuteRequest request, + Class tResultClass + ) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + ScriptsPainlessExecuteRequest, + ScriptsPainlessExecuteResponse, + ErrorResponse>) ScriptsPainlessExecuteRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.scripts_painless_execute.TResult", + getDeserializer(tResultClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows an arbitrary script to be executed and a result to be returned + * + * @param fn + * a function that initializes a builder to create the + * {@link ScriptsPainlessExecuteRequest} + * + */ + + public final ScriptsPainlessExecuteResponse scriptsPainlessExecute( + Function> fn, + Class tResultClass + ) throws IOException, OpenSearchException { + return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), tResultClass); + } + + // ----- Endpoint: scroll + + /** + * Allows to retrieve a large numbers of results from a single search request. + * + */ + + public ScrollResponse scroll(ScrollRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + ScrollRequest, + ScrollResponse, + ErrorResponse>) ScrollRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.scroll.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to retrieve a large numbers of results from a single search request. + * + * @param fn + * a function that initializes a builder to create the + * {@link ScrollRequest} + */ + + public final ScrollResponse scroll( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return scroll(fn.apply(new ScrollRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: search + + /** + * Returns results matching a query. + * + * + */ + + public SearchResponse search(SearchRequest request, Class tDocumentClass) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + SearchRequest, + SearchResponse, + ErrorResponse>) SearchRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.search.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns results matching a query. + * + * @param fn + * a function that initializes a builder to create the + * {@link SearchRequest} + * + */ + + public final SearchResponse search( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: search_shards + + /** + * Returns information about the indices and shards that a search request would + * be executed against. + * + * + */ + + public SearchShardsResponse searchShards(SearchShardsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + SearchShardsRequest, + SearchShardsResponse, + ErrorResponse>) SearchShardsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about the indices and shards that a search request would + * be executed against. + * + * @param fn + * a function that initializes a builder to create the + * {@link SearchShardsRequest} + * + */ + + public final SearchShardsResponse searchShards(Function> fn) + throws IOException, OpenSearchException { + return searchShards(fn.apply(new SearchShardsRequest.Builder()).build()); + } + + /** + * Returns information about the indices and shards that a search request would + * be executed against. + * + * + */ + + public SearchShardsResponse searchShards() throws IOException, OpenSearchException { + return this.transport.performRequest( + new SearchShardsRequest.Builder().build(), + SearchShardsRequest._ENDPOINT, + this.transportOptions + ); + } + + // ----- Endpoint: search_template + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * + */ + + public SearchTemplateResponse searchTemplate(SearchTemplateRequest request, Class tDocumentClass) + throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint< + SearchTemplateRequest, + SearchTemplateResponse, + ErrorResponse>) SearchTemplateRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.search_template.TDocument", + getDeserializer(tDocumentClass) + ); + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Allows to use the Mustache language to pre-render a search definition. + * + * @param fn + * a function that initializes a builder to create the + * {@link SearchTemplateRequest} + * + */ + + public final SearchTemplateResponse searchTemplate( + Function> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: terms_enum + + /** + * The terms enum API can be used to discover terms in the index that begin with + * the provided string. It is designed for low-latency look-ups used in + * auto-complete scenarios. + * + * + */ + + public TermsEnumResponse termsEnum(TermsEnumRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + TermsEnumRequest, + TermsEnumResponse, + ErrorResponse>) TermsEnumRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * The terms enum API can be used to discover terms in the index that begin with + * the provided string. It is designed for low-latency look-ups used in + * auto-complete scenarios. + * + * @param fn + * a function that initializes a builder to create the + * {@link TermsEnumRequest} + * + */ + + public final TermsEnumResponse termsEnum(Function> fn) throws IOException, + OpenSearchException { + return termsEnum(fn.apply(new TermsEnumRequest.Builder()).build()); + } + + // ----- Endpoint: termvectors + + /** + * Returns information and statistics about terms in the fields of a particular + * document. + * + * + */ + + public TermvectorsResponse termvectors(TermvectorsRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, TermvectorsResponse, ErrorResponse> endpoint = (JsonEndpoint< + TermvectorsRequest, + TermvectorsResponse, + ErrorResponse>) TermvectorsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information and statistics about terms in the fields of a particular + * document. + * + * @param fn + * a function that initializes a builder to create the + * {@link TermvectorsRequest} + * + */ + + public final TermvectorsResponse termvectors( + Function, ObjectBuilder>> fn + ) throws IOException, OpenSearchException { + return termvectors(fn.apply(new TermvectorsRequest.Builder()).build()); + } + + // ----- Endpoint: update + + /** + * Updates a document with a script or partial document. + * + * + */ + + public UpdateResponse update( + UpdateRequest request, + Class tDocumentClass + ) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint, UpdateResponse, ErrorResponse> endpoint = (JsonEndpoint< + UpdateRequest, + UpdateResponse, + ErrorResponse>) UpdateRequest._ENDPOINT; + endpoint = new EndpointWithResponseMapperAttr<>( + endpoint, + "org.opensearch.client:Deserializer:_global.update.TDocument", + getDeserializer(tDocumentClass) + ); + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates a document with a script or partial document. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateRequest} + * + */ + + public final UpdateResponse update( + + Function, ObjectBuilder>> fn, + Class tDocumentClass + ) throws IOException, OpenSearchException { + return update(fn.apply(new UpdateRequest.Builder()).build(), tDocumentClass); + } + + // ----- Endpoint: update_by_query + + /** + * Performs an update on every document in the index without changing the + * source, for example to pick up a mapping change. + * + * + */ + + public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) throws IOException, OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + UpdateByQueryRequest, + UpdateByQueryResponse, + ErrorResponse>) UpdateByQueryRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Performs an update on every document in the index without changing the + * source, for example to pick up a mapping change. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateByQueryRequest} + * + */ + + public final UpdateByQueryResponse updateByQuery(Function> fn) + throws IOException, OpenSearchException { + return updateByQuery(fn.apply(new UpdateByQueryRequest.Builder()).build()); + } + + // ----- Endpoint: update_by_query_rethrottle + + /** + * Changes the number of requests per second for a particular Update By Query + * operation. + * + * + */ + + public UpdateByQueryRethrottleResponse updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) throws IOException, + OpenSearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint< + UpdateByQueryRethrottleRequest, + UpdateByQueryRethrottleResponse, + ErrorResponse>) UpdateByQueryRethrottleRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Changes the number of requests per second for a particular Update By Query + * operation. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateByQueryRethrottleRequest} + * + */ + + public final UpdateByQueryRethrottleResponse updateByQueryRethrottle( + Function> fn + ) throws IOException, OpenSearchException { + return updateByQueryRethrottle(fn.apply(new UpdateByQueryRethrottleRequest.Builder()).build()); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java index 548be19f3d..96afe7515c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java @@ -32,80 +32,78 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectDeserializer; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; // typedef: _types.AcknowledgedResponseBase - public abstract class AcknowledgedResponseBase implements JsonpSerializable { - private final boolean acknowledged; + private final boolean acknowledged; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - protected AcknowledgedResponseBase(AbstractBuilder builder) { + protected AcknowledgedResponseBase(AbstractBuilder builder) { - this.acknowledged = ApiTypeHelper.requireNonNull(builder.acknowledged, this, "acknowledged"); + this.acknowledged = ApiTypeHelper.requireNonNull(builder.acknowledged, this, "acknowledged"); - } + } - /** - * Required - For a successful response, this value is always true. On failure, - * an exception is returned instead. - *

- * API name: {@code acknowledged} - */ - public final boolean acknowledged() { - return this.acknowledged; - } + /** + * Required - For a successful response, this value is always true. On failure, + * an exception is returned instead. + *

+ * API name: {@code acknowledged} + */ + public final boolean acknowledged() { + return this.acknowledged; + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("acknowledged"); - generator.write(this.acknowledged); + generator.writeKey("acknowledged"); + generator.write(this.acknowledged); - } + } - protected abstract static class AbstractBuilder> - extends - ObjectBuilderBase { - private Boolean acknowledged; + protected abstract static class AbstractBuilder> extends ObjectBuilderBase { + private Boolean acknowledged; - /** - * Required - For a successful response, this value is always true. On failure, - * an exception is returned instead. - *

- * API name: {@code acknowledged} - */ - public final BuilderT acknowledged(boolean value) { - this.acknowledged = value; - return self(); - } + /** + * Required - For a successful response, this value is always true. On failure, + * an exception is returned instead. + *

+ * API name: {@code acknowledged} + */ + public final BuilderT acknowledged(boolean value) { + this.acknowledged = value; + return self(); + } - protected abstract BuilderT self(); + protected abstract BuilderT self(); - } + } - // --------------------------------------------------------------------------------------------- - protected static > void setupAcknowledgedResponseBaseDeserializer( - ObjectDeserializer op) { + // --------------------------------------------------------------------------------------------- + protected static > void setupAcknowledgedResponseBaseDeserializer( + ObjectDeserializer op + ) { - op.add(AbstractBuilder::acknowledged, JsonpDeserializer.booleanDeserializer(), "acknowledged"); + op.add(AbstractBuilder::acknowledged, JsonpDeserializer.booleanDeserializer(), "acknowledged"); - } + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java index 3fee84a10f..abd2b4204e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BaseNode.java @@ -32,242 +32,237 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Map; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectDeserializer; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.Map; -import javax.annotation.Nullable; // typedef: _spec_utils.BaseNode - public abstract class BaseNode implements JsonpSerializable { - private final Map attributes; - - private final String host; - - private final String ip; - - private final String name; - - private final List roles; - - private final String transportAddress; - - // --------------------------------------------------------------------------------------------- - - protected BaseNode(AbstractBuilder builder) { - - this.attributes = ApiTypeHelper.unmodifiable(builder.attributes); - this.host = builder.host; - this.ip = builder.ip; - this.name = builder.name; - this.roles = ApiTypeHelper.unmodifiable(builder.roles); - this.transportAddress = builder.transportAddress; - - } - - /** - * API name: {@code attributes} - */ - public final Map attributes() { - return this.attributes; - } - - /** - * API name: {@code host} - */ - public final String host() { - return this.host; - } - - /** - * API name: {@code ip} - */ - public final String ip() { - return this.ip; - } - - /** - * API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * API name: {@code roles} - */ - public final List roles() { - return this.roles; - } - - /** - * API name: {@code transport_address} - */ - public final String transportAddress() { - return this.transportAddress; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.attributes)) { - generator.writeKey("attributes"); - generator.writeStartObject(); - for (Map.Entry item0 : this.attributes.entrySet()) { - generator.writeKey(item0.getKey()); - generator.write(item0.getValue()); - - } - generator.writeEnd(); - - } - generator.writeKey("host"); - generator.write(this.host); - - generator.writeKey("ip"); - generator.write(this.ip); - - generator.writeKey("name"); - generator.write(this.name); - - if (ApiTypeHelper.isDefined(this.roles)) { - generator.writeKey("roles"); - generator.writeStartArray(); - for (NodeRole item0 : this.roles) { - item0.serialize(generator, mapper); - } - generator.writeEnd(); - - } - generator.writeKey("transport_address"); - generator.write(this.transportAddress); - - } - - protected abstract static class AbstractBuilder> - extends - ObjectBuilderBase { - @Nullable - private Map attributes; - - @Nullable - private String host; - - @Nullable - private String ip; - - @Nullable - private String name; - - @Nullable - private List roles; - - @Nullable - private String transportAddress; - - /** - * API name: {@code attributes} - *

- * Adds all entries of map to attributes. - */ - public final BuilderT attributes(Map map) { - this.attributes = _mapPutAll(this.attributes, map); - return self(); - } - - /** - * API name: {@code attributes} - *

- * Adds an entry to attributes. - */ - public final BuilderT attributes(String key, String value) { - this.attributes = _mapPut(this.attributes, key, value); - return self(); - } - - /** - * API name: {@code host} - */ - public final BuilderT host(String value) { - this.host = value; - return self(); - } - - /** - * API name: {@code ip} - */ - public final BuilderT ip(String value) { - this.ip = value; - return self(); - } - - /** - * API name: {@code name} - */ - public final BuilderT name(String value) { - this.name = value; - return self(); - } - - /** - * API name: {@code roles} - *

- * Adds all elements of list to roles. - */ - public final BuilderT roles(List list) { - this.roles = _listAddAll(this.roles, list); - return self(); - } - - /** - * API name: {@code roles} - *

- * Adds one or more values to roles. - */ - public final BuilderT roles(NodeRole value, NodeRole... values) { - this.roles = _listAdd(this.roles, value, values); - return self(); - } - - /** - * API name: {@code transport_address} - */ - public final BuilderT transportAddress(String value) { - this.transportAddress = value; - return self(); - } - - protected abstract BuilderT self(); - - } - - // --------------------------------------------------------------------------------------------- - protected static > void setupBaseNodeDeserializer( - ObjectDeserializer op) { - - op.add(AbstractBuilder::attributes, - JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "attributes"); - op.add(AbstractBuilder::host, JsonpDeserializer.stringDeserializer(), "host"); - op.add(AbstractBuilder::ip, JsonpDeserializer.stringDeserializer(), "ip"); - op.add(AbstractBuilder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(AbstractBuilder::roles, JsonpDeserializer.arrayDeserializer(NodeRole._DESERIALIZER), "roles"); - op.add(AbstractBuilder::transportAddress, JsonpDeserializer.stringDeserializer(), "transport_address"); - - } + private final Map attributes; + + private final String host; + + private final String ip; + + private final String name; + + private final List roles; + + private final String transportAddress; + + // --------------------------------------------------------------------------------------------- + + protected BaseNode(AbstractBuilder builder) { + + this.attributes = ApiTypeHelper.unmodifiable(builder.attributes); + this.host = builder.host; + this.ip = builder.ip; + this.name = builder.name; + this.roles = ApiTypeHelper.unmodifiable(builder.roles); + this.transportAddress = builder.transportAddress; + + } + + /** + * API name: {@code attributes} + */ + public final Map attributes() { + return this.attributes; + } + + /** + * API name: {@code host} + */ + public final String host() { + return this.host; + } + + /** + * API name: {@code ip} + */ + public final String ip() { + return this.ip; + } + + /** + * API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * API name: {@code roles} + */ + public final List roles() { + return this.roles; + } + + /** + * API name: {@code transport_address} + */ + public final String transportAddress() { + return this.transportAddress; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.attributes)) { + generator.writeKey("attributes"); + generator.writeStartObject(); + for (Map.Entry item0 : this.attributes.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } + generator.writeKey("host"); + generator.write(this.host); + + generator.writeKey("ip"); + generator.write(this.ip); + + generator.writeKey("name"); + generator.write(this.name); + + if (ApiTypeHelper.isDefined(this.roles)) { + generator.writeKey("roles"); + generator.writeStartArray(); + for (NodeRole item0 : this.roles) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } + generator.writeKey("transport_address"); + generator.write(this.transportAddress); + + } + + protected abstract static class AbstractBuilder> extends ObjectBuilderBase { + @Nullable + private Map attributes; + + @Nullable + private String host; + + @Nullable + private String ip; + + @Nullable + private String name; + + @Nullable + private List roles; + + @Nullable + private String transportAddress; + + /** + * API name: {@code attributes} + *

+ * Adds all entries of map to attributes. + */ + public final BuilderT attributes(Map map) { + this.attributes = _mapPutAll(this.attributes, map); + return self(); + } + + /** + * API name: {@code attributes} + *

+ * Adds an entry to attributes. + */ + public final BuilderT attributes(String key, String value) { + this.attributes = _mapPut(this.attributes, key, value); + return self(); + } + + /** + * API name: {@code host} + */ + public final BuilderT host(String value) { + this.host = value; + return self(); + } + + /** + * API name: {@code ip} + */ + public final BuilderT ip(String value) { + this.ip = value; + return self(); + } + + /** + * API name: {@code name} + */ + public final BuilderT name(String value) { + this.name = value; + return self(); + } + + /** + * API name: {@code roles} + *

+ * Adds all elements of list to roles. + */ + public final BuilderT roles(List list) { + this.roles = _listAddAll(this.roles, list); + return self(); + } + + /** + * API name: {@code roles} + *

+ * Adds one or more values to roles. + */ + public final BuilderT roles(NodeRole value, NodeRole... values) { + this.roles = _listAdd(this.roles, value, values); + return self(); + } + + /** + * API name: {@code transport_address} + */ + public final BuilderT transportAddress(String value) { + this.transportAddress = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + protected static > void setupBaseNodeDeserializer(ObjectDeserializer op) { + + op.add(AbstractBuilder::attributes, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "attributes"); + op.add(AbstractBuilder::host, JsonpDeserializer.stringDeserializer(), "host"); + op.add(AbstractBuilder::ip, JsonpDeserializer.stringDeserializer(), "ip"); + op.add(AbstractBuilder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(AbstractBuilder::roles, JsonpDeserializer.arrayDeserializer(NodeRole._DESERIALIZER), "roles"); + op.add(AbstractBuilder::transportAddress, JsonpDeserializer.stringDeserializer(), "transport_address"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java index 183b486e8c..4718d336ab 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkIndexByScrollFailure.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,196 +43,195 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.BulkIndexByScrollFailure @JsonpDeserializable public class BulkIndexByScrollFailure implements JsonpSerializable { - private final ErrorCause cause; + private final ErrorCause cause; - private final String id; + private final String id; - private final String index; + private final String index; - private final int status; + private final int status; - private final String type; + private final String type; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private BulkIndexByScrollFailure(Builder builder) { + private BulkIndexByScrollFailure(Builder builder) { - this.cause = ApiTypeHelper.requireNonNull(builder.cause, this, "cause"); - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); - this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); - this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.cause = ApiTypeHelper.requireNonNull(builder.cause, this, "cause"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - } + } - public static BulkIndexByScrollFailure of(Function> fn) { - return fn.apply(new Builder()).build(); - } + public static BulkIndexByScrollFailure of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code cause} - */ - public final ErrorCause cause() { - return this.cause; - } + /** + * Required - API name: {@code cause} + */ + public final ErrorCause cause() { + return this.cause; + } - /** - * Required - API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * Required - API name: {@code index} - */ - public final String index() { - return this.index; - } - - /** - * Required - API name: {@code status} - */ - public final int status() { - return this.status; - } - - /** - * Required - API name: {@code type} - */ - public final String type() { - return this.type; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("cause"); - this.cause.serialize(generator, mapper); - - generator.writeKey("id"); - generator.write(this.id); - - generator.writeKey("index"); - generator.write(this.index); - - generator.writeKey("status"); - generator.write(this.status); - - generator.writeKey("type"); - generator.write(this.type); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link BulkIndexByScrollFailure}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private ErrorCause cause; - - private String id; - - private String index; - - private Integer status; - - private String type; - - /** - * Required - API name: {@code cause} - */ - public final Builder cause(ErrorCause value) { - this.cause = value; - return this; - } - - /** - * Required - API name: {@code cause} - */ - public final Builder cause(Function> fn) { - return this.cause(fn.apply(new ErrorCause.Builder()).build()); - } - - /** - * Required - API name: {@code id} - */ - public final Builder id(String value) { - this.id = value; - return this; - } - - /** - * Required - API name: {@code index} - */ - public final Builder index(String value) { - this.index = value; - return this; - } - - /** - * Required - API name: {@code status} - */ - public final Builder status(int value) { - this.status = value; - return this; - } - - /** - * Required - API name: {@code type} - */ - public final Builder type(String value) { - this.type = value; - return this; - } - - /** - * Builds a {@link BulkIndexByScrollFailure}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public BulkIndexByScrollFailure build() { - _checkSingleUse(); - - return new BulkIndexByScrollFailure(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link BulkIndexByScrollFailure} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, BulkIndexByScrollFailure::setupBulkIndexByScrollFailureDeserializer); - - protected static void setupBulkIndexByScrollFailureDeserializer( - ObjectDeserializer op) { - - op.add(Builder::cause, ErrorCause._DESERIALIZER, "cause"); - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index"); - op.add(Builder::status, JsonpDeserializer.integerDeserializer(), "status"); - op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); - - } + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code index} + */ + public final String index() { + return this.index; + } + + /** + * Required - API name: {@code status} + */ + public final int status() { + return this.status; + } + + /** + * Required - API name: {@code type} + */ + public final String type() { + return this.type; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("cause"); + this.cause.serialize(generator, mapper); + + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("index"); + generator.write(this.index); + + generator.writeKey("status"); + generator.write(this.status); + + generator.writeKey("type"); + generator.write(this.type); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BulkIndexByScrollFailure}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private ErrorCause cause; + + private String id; + + private String index; + + private Integer status; + + private String type; + + /** + * Required - API name: {@code cause} + */ + public final Builder cause(ErrorCause value) { + this.cause = value; + return this; + } + + /** + * Required - API name: {@code cause} + */ + public final Builder cause(Function> fn) { + return this.cause(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Required - API name: {@code index} + */ + public final Builder index(String value) { + this.index = value; + return this; + } + + /** + * Required - API name: {@code status} + */ + public final Builder status(int value) { + this.status = value; + return this; + } + + /** + * Required - API name: {@code type} + */ + public final Builder type(String value) { + this.type = value; + return this; + } + + /** + * Builds a {@link BulkIndexByScrollFailure}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BulkIndexByScrollFailure build() { + _checkSingleUse(); + + return new BulkIndexByScrollFailure(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BulkIndexByScrollFailure} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + BulkIndexByScrollFailure::setupBulkIndexByScrollFailureDeserializer + ); + + protected static void setupBulkIndexByScrollFailureDeserializer(ObjectDeserializer op) { + + op.add(Builder::cause, ErrorCause._DESERIALIZER, "cause"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index"); + op.add(Builder::status, JsonpDeserializer.integerDeserializer(), "status"); + op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java index 6cf3fb2dd0..ab174f1dcf 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/BulkStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,306 +44,304 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.BulkStats @JsonpDeserializable public class BulkStats implements JsonpSerializable { - private final long totalOperations; - - @Nullable - private final String totalTime; - - private final long totalTimeInMillis; - - @Nullable - private final String totalSize; - - private final long totalSizeInBytes; - - @Nullable - private final String avgTime; - - private final long avgTimeInMillis; - - @Nullable - private final String avgSize; - - private final long avgSizeInBytes; - - // --------------------------------------------------------------------------------------------- - - private BulkStats(Builder builder) { - - this.totalOperations = ApiTypeHelper.requireNonNull(builder.totalOperations, this, "totalOperations"); - this.totalTime = builder.totalTime; - this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); - this.totalSize = builder.totalSize; - this.totalSizeInBytes = ApiTypeHelper.requireNonNull(builder.totalSizeInBytes, this, "totalSizeInBytes"); - this.avgTime = builder.avgTime; - this.avgTimeInMillis = ApiTypeHelper.requireNonNull(builder.avgTimeInMillis, this, "avgTimeInMillis"); - this.avgSize = builder.avgSize; - this.avgSizeInBytes = ApiTypeHelper.requireNonNull(builder.avgSizeInBytes, this, "avgSizeInBytes"); - - } - - public static BulkStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code total_operations} - */ - public final long totalOperations() { - return this.totalOperations; - } - - /** - * API name: {@code total_time} - */ - @Nullable - public final String totalTime() { - return this.totalTime; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final long totalTimeInMillis() { - return this.totalTimeInMillis; - } - - /** - * API name: {@code total_size} - */ - @Nullable - public final String totalSize() { - return this.totalSize; - } - - /** - * Required - API name: {@code total_size_in_bytes} - */ - public final long totalSizeInBytes() { - return this.totalSizeInBytes; - } - - /** - * API name: {@code avg_time} - */ - @Nullable - public final String avgTime() { - return this.avgTime; - } + private final long totalOperations; + + @Nullable + private final String totalTime; + + private final long totalTimeInMillis; + + @Nullable + private final String totalSize; + + private final long totalSizeInBytes; + + @Nullable + private final String avgTime; + + private final long avgTimeInMillis; + + @Nullable + private final String avgSize; + + private final long avgSizeInBytes; + + // --------------------------------------------------------------------------------------------- + + private BulkStats(Builder builder) { + + this.totalOperations = ApiTypeHelper.requireNonNull(builder.totalOperations, this, "totalOperations"); + this.totalTime = builder.totalTime; + this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); + this.totalSize = builder.totalSize; + this.totalSizeInBytes = ApiTypeHelper.requireNonNull(builder.totalSizeInBytes, this, "totalSizeInBytes"); + this.avgTime = builder.avgTime; + this.avgTimeInMillis = ApiTypeHelper.requireNonNull(builder.avgTimeInMillis, this, "avgTimeInMillis"); + this.avgSize = builder.avgSize; + this.avgSizeInBytes = ApiTypeHelper.requireNonNull(builder.avgSizeInBytes, this, "avgSizeInBytes"); + + } + + public static BulkStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code total_operations} + */ + public final long totalOperations() { + return this.totalOperations; + } + + /** + * API name: {@code total_time} + */ + @Nullable + public final String totalTime() { + return this.totalTime; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final long totalTimeInMillis() { + return this.totalTimeInMillis; + } + + /** + * API name: {@code total_size} + */ + @Nullable + public final String totalSize() { + return this.totalSize; + } + + /** + * Required - API name: {@code total_size_in_bytes} + */ + public final long totalSizeInBytes() { + return this.totalSizeInBytes; + } + + /** + * API name: {@code avg_time} + */ + @Nullable + public final String avgTime() { + return this.avgTime; + } - /** - * Required - API name: {@code avg_time_in_millis} - */ - public final long avgTimeInMillis() { - return this.avgTimeInMillis; - } - - /** - * API name: {@code avg_size} - */ - @Nullable - public final String avgSize() { - return this.avgSize; - } - - /** - * Required - API name: {@code avg_size_in_bytes} - */ - public final long avgSizeInBytes() { - return this.avgSizeInBytes; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("total_operations"); - generator.write(this.totalOperations); - - if (this.totalTime != null) { - generator.writeKey("total_time"); - generator.write(this.totalTime); - - } - generator.writeKey("total_time_in_millis"); - generator.write(this.totalTimeInMillis); - - if (this.totalSize != null) { - generator.writeKey("total_size"); - generator.write(this.totalSize); - - } - generator.writeKey("total_size_in_bytes"); - generator.write(this.totalSizeInBytes); - - if (this.avgTime != null) { - generator.writeKey("avg_time"); - generator.write(this.avgTime); - - } - generator.writeKey("avg_time_in_millis"); - generator.write(this.avgTimeInMillis); - - if (this.avgSize != null) { - generator.writeKey("avg_size"); - generator.write(this.avgSize); - - } - generator.writeKey("avg_size_in_bytes"); - generator.write(this.avgSizeInBytes); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link BulkStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long totalOperations; - - @Nullable - private String totalTime; - - private Long totalTimeInMillis; - - @Nullable - private String totalSize; - - private Long totalSizeInBytes; - - @Nullable - private String avgTime; - - private Long avgTimeInMillis; - - @Nullable - private String avgSize; - - private Long avgSizeInBytes; - - /** - * Required - API name: {@code total_operations} - */ - public final Builder totalOperations(long value) { - this.totalOperations = value; - return this; - } - - /** - * API name: {@code total_time} - */ - public final Builder totalTime(@Nullable String value) { - this.totalTime = value; - return this; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final Builder totalTimeInMillis(long value) { - this.totalTimeInMillis = value; - return this; - } - - /** - * API name: {@code total_size} - */ - public final Builder totalSize(@Nullable String value) { - this.totalSize = value; - return this; - } - - /** - * Required - API name: {@code total_size_in_bytes} - */ - public final Builder totalSizeInBytes(long value) { - this.totalSizeInBytes = value; - return this; - } - - /** - * API name: {@code avg_time} - */ - public final Builder avgTime(@Nullable String value) { - this.avgTime = value; - return this; - } - - /** - * Required - API name: {@code avg_time_in_millis} - */ - public final Builder avgTimeInMillis(long value) { - this.avgTimeInMillis = value; - return this; - } - - /** - * API name: {@code avg_size} - */ - public final Builder avgSize(@Nullable String value) { - this.avgSize = value; - return this; - } - - /** - * Required - API name: {@code avg_size_in_bytes} - */ - public final Builder avgSizeInBytes(long value) { - this.avgSizeInBytes = value; - return this; - } - - /** - * Builds a {@link BulkStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public BulkStats build() { - _checkSingleUse(); - - return new BulkStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link BulkStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - BulkStats::setupBulkStatsDeserializer); - - protected static void setupBulkStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::totalOperations, JsonpDeserializer.longDeserializer(), "total_operations"); - op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); - op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); - op.add(Builder::totalSize, JsonpDeserializer.stringDeserializer(), "total_size"); - op.add(Builder::totalSizeInBytes, JsonpDeserializer.longDeserializer(), "total_size_in_bytes"); - op.add(Builder::avgTime, JsonpDeserializer.stringDeserializer(), "avg_time"); - op.add(Builder::avgTimeInMillis, JsonpDeserializer.longDeserializer(), "avg_time_in_millis"); - op.add(Builder::avgSize, JsonpDeserializer.stringDeserializer(), "avg_size"); - op.add(Builder::avgSizeInBytes, JsonpDeserializer.longDeserializer(), "avg_size_in_bytes"); - - } + /** + * Required - API name: {@code avg_time_in_millis} + */ + public final long avgTimeInMillis() { + return this.avgTimeInMillis; + } + + /** + * API name: {@code avg_size} + */ + @Nullable + public final String avgSize() { + return this.avgSize; + } + + /** + * Required - API name: {@code avg_size_in_bytes} + */ + public final long avgSizeInBytes() { + return this.avgSizeInBytes; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("total_operations"); + generator.write(this.totalOperations); + + if (this.totalTime != null) { + generator.writeKey("total_time"); + generator.write(this.totalTime); + + } + generator.writeKey("total_time_in_millis"); + generator.write(this.totalTimeInMillis); + + if (this.totalSize != null) { + generator.writeKey("total_size"); + generator.write(this.totalSize); + + } + generator.writeKey("total_size_in_bytes"); + generator.write(this.totalSizeInBytes); + + if (this.avgTime != null) { + generator.writeKey("avg_time"); + generator.write(this.avgTime); + + } + generator.writeKey("avg_time_in_millis"); + generator.write(this.avgTimeInMillis); + + if (this.avgSize != null) { + generator.writeKey("avg_size"); + generator.write(this.avgSize); + + } + generator.writeKey("avg_size_in_bytes"); + generator.write(this.avgSizeInBytes); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BulkStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long totalOperations; + + @Nullable + private String totalTime; + + private Long totalTimeInMillis; + + @Nullable + private String totalSize; + + private Long totalSizeInBytes; + + @Nullable + private String avgTime; + + private Long avgTimeInMillis; + + @Nullable + private String avgSize; + + private Long avgSizeInBytes; + + /** + * Required - API name: {@code total_operations} + */ + public final Builder totalOperations(long value) { + this.totalOperations = value; + return this; + } + + /** + * API name: {@code total_time} + */ + public final Builder totalTime(@Nullable String value) { + this.totalTime = value; + return this; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final Builder totalTimeInMillis(long value) { + this.totalTimeInMillis = value; + return this; + } + + /** + * API name: {@code total_size} + */ + public final Builder totalSize(@Nullable String value) { + this.totalSize = value; + return this; + } + + /** + * Required - API name: {@code total_size_in_bytes} + */ + public final Builder totalSizeInBytes(long value) { + this.totalSizeInBytes = value; + return this; + } + + /** + * API name: {@code avg_time} + */ + public final Builder avgTime(@Nullable String value) { + this.avgTime = value; + return this; + } + + /** + * Required - API name: {@code avg_time_in_millis} + */ + public final Builder avgTimeInMillis(long value) { + this.avgTimeInMillis = value; + return this; + } + + /** + * API name: {@code avg_size} + */ + public final Builder avgSize(@Nullable String value) { + this.avgSize = value; + return this; + } + + /** + * Required - API name: {@code avg_size_in_bytes} + */ + public final Builder avgSizeInBytes(long value) { + this.avgSizeInBytes = value; + return this; + } + + /** + * Builds a {@link BulkStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BulkStats build() { + _checkSingleUse(); + + return new BulkStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BulkStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + BulkStats::setupBulkStatsDeserializer + ); + + protected static void setupBulkStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::totalOperations, JsonpDeserializer.longDeserializer(), "total_operations"); + op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); + op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); + op.add(Builder::totalSize, JsonpDeserializer.stringDeserializer(), "total_size"); + op.add(Builder::totalSizeInBytes, JsonpDeserializer.longDeserializer(), "total_size_in_bytes"); + op.add(Builder::avgTime, JsonpDeserializer.stringDeserializer(), "avg_time"); + op.add(Builder::avgTimeInMillis, JsonpDeserializer.longDeserializer(), "avg_time_in_millis"); + op.add(Builder::avgSize, JsonpDeserializer.stringDeserializer(), "avg_size"); + op.add(Builder::avgSizeInBytes, JsonpDeserializer.longDeserializer(), "avg_size_in_bytes"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java index 5f3cf670f8..0d6077e653 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Bytes.java @@ -37,29 +37,29 @@ @JsonpDeserializable public enum Bytes implements JsonEnum { - Bytes("b"), + Bytes("b"), - KiloBytes("kb"), + KiloBytes("kb"), - MegaBytes("mb"), + MegaBytes("mb"), - GigaBytes("gb"), + GigaBytes("gb"), - TeraBytes("tb"), + TeraBytes("tb"), - PetaBytes("pb"), + PetaBytes("pb"), - ; + ; - private final String jsonValue; + private final String jsonValue; - Bytes(String jsonValue) { - this.jsonValue = jsonValue; - } + Bytes(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Bytes.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Bytes.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java index 1c3bd5fa9a..025ebbe097 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ClusterStatistics.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,140 +43,140 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.ClusterStatistics @JsonpDeserializable public class ClusterStatistics implements JsonpSerializable { - private final int skipped; - - private final int successful; - - private final int total; - - // --------------------------------------------------------------------------------------------- - - private ClusterStatistics(Builder builder) { - - this.skipped = ApiTypeHelper.requireNonNull(builder.skipped, this, "skipped"); - this.successful = ApiTypeHelper.requireNonNull(builder.successful, this, "successful"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - - } - - public static ClusterStatistics of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code skipped} - */ - public final int skipped() { - return this.skipped; - } + private final int skipped; - /** - * Required - API name: {@code successful} - */ - public final int successful() { - return this.successful; - } - - /** - * Required - API name: {@code total} - */ - public final int total() { - return this.total; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("skipped"); - generator.write(this.skipped); - - generator.writeKey("successful"); - generator.write(this.successful); - - generator.writeKey("total"); - generator.write(this.total); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ClusterStatistics}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Integer skipped; - - private Integer successful; - - private Integer total; - - /** - * Required - API name: {@code skipped} - */ - public final Builder skipped(int value) { - this.skipped = value; - return this; - } - - /** - * Required - API name: {@code successful} - */ - public final Builder successful(int value) { - this.successful = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(int value) { - this.total = value; - return this; - } - - /** - * Builds a {@link ClusterStatistics}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ClusterStatistics build() { - _checkSingleUse(); - - return new ClusterStatistics(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ClusterStatistics} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, ClusterStatistics::setupClusterStatisticsDeserializer); - - protected static void setupClusterStatisticsDeserializer(ObjectDeserializer op) { - - op.add(Builder::skipped, JsonpDeserializer.integerDeserializer(), "skipped"); - op.add(Builder::successful, JsonpDeserializer.integerDeserializer(), "successful"); - op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total"); - - } + private final int successful; + + private final int total; + + // --------------------------------------------------------------------------------------------- + + private ClusterStatistics(Builder builder) { + + this.skipped = ApiTypeHelper.requireNonNull(builder.skipped, this, "skipped"); + this.successful = ApiTypeHelper.requireNonNull(builder.successful, this, "successful"); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + + } + + public static ClusterStatistics of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code skipped} + */ + public final int skipped() { + return this.skipped; + } + + /** + * Required - API name: {@code successful} + */ + public final int successful() { + return this.successful; + } + + /** + * Required - API name: {@code total} + */ + public final int total() { + return this.total; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("skipped"); + generator.write(this.skipped); + + generator.writeKey("successful"); + generator.write(this.successful); + + generator.writeKey("total"); + generator.write(this.total); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ClusterStatistics}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Integer skipped; + + private Integer successful; + + private Integer total; + + /** + * Required - API name: {@code skipped} + */ + public final Builder skipped(int value) { + this.skipped = value; + return this; + } + + /** + * Required - API name: {@code successful} + */ + public final Builder successful(int value) { + this.successful = value; + return this; + } + + /** + * Required - API name: {@code total} + */ + public final Builder total(int value) { + this.total = value; + return this; + } + + /** + * Builds a {@link ClusterStatistics}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ClusterStatistics build() { + _checkSingleUse(); + + return new ClusterStatistics(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ClusterStatistics} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + ClusterStatistics::setupClusterStatisticsDeserializer + ); + + protected static void setupClusterStatisticsDeserializer(ObjectDeserializer op) { + + op.add(Builder::skipped, JsonpDeserializer.integerDeserializer(), "skipped"); + op.add(Builder::successful, JsonpDeserializer.integerDeserializer(), "successful"); + op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java index d375f28eab..85a4f4c1d3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CompletionStats.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,178 +45,176 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.CompletionStats @JsonpDeserializable public class CompletionStats implements JsonpSerializable { - private final long sizeInBytes; + private final long sizeInBytes; - @Nullable - private final String size; - - private final Map fields; + @Nullable + private final String size; + + private final Map fields; - // --------------------------------------------------------------------------------------------- - - private CompletionStats(Builder builder) { - - this.sizeInBytes = ApiTypeHelper.requireNonNull(builder.sizeInBytes, this, "sizeInBytes"); - this.size = builder.size; - this.fields = ApiTypeHelper.unmodifiable(builder.fields); - - } - - public static CompletionStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code size_in_bytes} - */ - public final long sizeInBytes() { - return this.sizeInBytes; - } - - /** - * API name: {@code size} - */ - @Nullable - public final String size() { - return this.size; - } - - /** - * API name: {@code fields} - */ - public final Map fields() { - return this.fields; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("size_in_bytes"); - generator.write(this.sizeInBytes); - - if (this.size != null) { - generator.writeKey("size"); - generator.write(this.size); - - } - if (ApiTypeHelper.isDefined(this.fields)) { - generator.writeKey("fields"); - generator.writeStartObject(); - for (Map.Entry item0 : this.fields.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link CompletionStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long sizeInBytes; - - @Nullable - private String size; - - @Nullable - private Map fields; - - /** - * Required - API name: {@code size_in_bytes} - */ - public final Builder sizeInBytes(long value) { - this.sizeInBytes = value; - return this; - } - - /** - * API name: {@code size} - */ - public final Builder size(@Nullable String value) { - this.size = value; - return this; - } - - /** - * API name: {@code fields} - *

- * Adds all entries of map to fields. - */ - public final Builder fields(Map map) { - this.fields = _mapPutAll(this.fields, map); - return this; - } - - /** - * API name: {@code fields} - *

- * Adds an entry to fields. - */ - public final Builder fields(String key, FieldSizeUsage value) { - this.fields = _mapPut(this.fields, key, value); - return this; - } - - /** - * API name: {@code fields} - *

- * Adds an entry to fields using a builder lambda. - */ - public final Builder fields(String key, Function> fn) { - return fields(key, fn.apply(new FieldSizeUsage.Builder()).build()); - } - - /** - * Builds a {@link CompletionStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public CompletionStats build() { - _checkSingleUse(); - - return new CompletionStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link CompletionStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - CompletionStats::setupCompletionStatsDeserializer); - - protected static void setupCompletionStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::sizeInBytes, JsonpDeserializer.longDeserializer(), "size_in_bytes"); - op.add(Builder::size, JsonpDeserializer.stringDeserializer(), "size"); - op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(FieldSizeUsage._DESERIALIZER), "fields"); - - } + // --------------------------------------------------------------------------------------------- + + private CompletionStats(Builder builder) { + + this.sizeInBytes = ApiTypeHelper.requireNonNull(builder.sizeInBytes, this, "sizeInBytes"); + this.size = builder.size; + this.fields = ApiTypeHelper.unmodifiable(builder.fields); + + } + + public static CompletionStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code size_in_bytes} + */ + public final long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * API name: {@code size} + */ + @Nullable + public final String size() { + return this.size; + } + + /** + * API name: {@code fields} + */ + public final Map fields() { + return this.fields; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("size_in_bytes"); + generator.write(this.sizeInBytes); + + if (this.size != null) { + generator.writeKey("size"); + generator.write(this.size); + + } + if (ApiTypeHelper.isDefined(this.fields)) { + generator.writeKey("fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.fields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CompletionStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long sizeInBytes; + + @Nullable + private String size; + + @Nullable + private Map fields; + + /** + * Required - API name: {@code size_in_bytes} + */ + public final Builder sizeInBytes(long value) { + this.sizeInBytes = value; + return this; + } + + /** + * API name: {@code size} + */ + public final Builder size(@Nullable String value) { + this.size = value; + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds all entries of map to fields. + */ + public final Builder fields(Map map) { + this.fields = _mapPutAll(this.fields, map); + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds an entry to fields. + */ + public final Builder fields(String key, FieldSizeUsage value) { + this.fields = _mapPut(this.fields, key, value); + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds an entry to fields using a builder lambda. + */ + public final Builder fields(String key, Function> fn) { + return fields(key, fn.apply(new FieldSizeUsage.Builder()).build()); + } + + /** + * Builds a {@link CompletionStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CompletionStats build() { + _checkSingleUse(); + + return new CompletionStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CompletionStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + CompletionStats::setupCompletionStatsDeserializer + ); + + protected static void setupCompletionStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::sizeInBytes, JsonpDeserializer.longDeserializer(), "size_in_bytes"); + op.add(Builder::size, JsonpDeserializer.stringDeserializer(), "size"); + op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(FieldSizeUsage._DESERIALIZER), "fields"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java index 7bd42f6bc9..dc551c5d2a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Conflicts.java @@ -37,22 +37,21 @@ @JsonpDeserializable public enum Conflicts implements JsonEnum { - Abort("abort"), + Abort("abort"), - Proceed("proceed"), + Proceed("proceed"), - ; + ; - private final String jsonValue; + private final String jsonValue; - Conflicts(String jsonValue) { - this.jsonValue = jsonValue; - } + Conflicts(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - Conflicts.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Conflicts.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java index dd7db05815..0551e8642c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,164 +43,164 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.CoordsGeoBounds @JsonpDeserializable public class CoordsGeoBounds implements JsonpSerializable { - private final double top; + private final double top; - private final double bottom; + private final double bottom; - private final double left; + private final double left; - private final double right; + private final double right; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private CoordsGeoBounds(Builder builder) { + private CoordsGeoBounds(Builder builder) { - this.top = ApiTypeHelper.requireNonNull(builder.top, this, "top"); - this.bottom = ApiTypeHelper.requireNonNull(builder.bottom, this, "bottom"); - this.left = ApiTypeHelper.requireNonNull(builder.left, this, "left"); - this.right = ApiTypeHelper.requireNonNull(builder.right, this, "right"); + this.top = ApiTypeHelper.requireNonNull(builder.top, this, "top"); + this.bottom = ApiTypeHelper.requireNonNull(builder.bottom, this, "bottom"); + this.left = ApiTypeHelper.requireNonNull(builder.left, this, "left"); + this.right = ApiTypeHelper.requireNonNull(builder.right, this, "right"); - } + } - public static CoordsGeoBounds of(Function> fn) { - return fn.apply(new Builder()).build(); - } + public static CoordsGeoBounds of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code top} - */ - public final double top() { - return this.top; - } - - /** - * Required - API name: {@code bottom} - */ - public final double bottom() { - return this.bottom; - } - - /** - * Required - API name: {@code left} - */ - public final double left() { - return this.left; - } - - /** - * Required - API name: {@code right} - */ - public final double right() { - return this.right; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("top"); - generator.write(this.top); - - generator.writeKey("bottom"); - generator.write(this.bottom); - - generator.writeKey("left"); - generator.write(this.left); - - generator.writeKey("right"); - generator.write(this.right); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link CoordsGeoBounds}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Double top; - - private Double bottom; - - private Double left; - - private Double right; - - /** - * Required - API name: {@code top} - */ - public final Builder top(double value) { - this.top = value; - return this; - } - - /** - * Required - API name: {@code bottom} - */ - public final Builder bottom(double value) { - this.bottom = value; - return this; - } - - /** - * Required - API name: {@code left} - */ - public final Builder left(double value) { - this.left = value; - return this; - } - - /** - * Required - API name: {@code right} - */ - public final Builder right(double value) { - this.right = value; - return this; - } - - /** - * Builds a {@link CoordsGeoBounds}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public CoordsGeoBounds build() { - _checkSingleUse(); - - return new CoordsGeoBounds(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link CoordsGeoBounds} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - CoordsGeoBounds::setupCoordsGeoBoundsDeserializer); - - protected static void setupCoordsGeoBoundsDeserializer(ObjectDeserializer op) { - - op.add(Builder::top, JsonpDeserializer.doubleDeserializer(), "top"); - op.add(Builder::bottom, JsonpDeserializer.doubleDeserializer(), "bottom"); - op.add(Builder::left, JsonpDeserializer.doubleDeserializer(), "left"); - op.add(Builder::right, JsonpDeserializer.doubleDeserializer(), "right"); - - } + /** + * Required - API name: {@code top} + */ + public final double top() { + return this.top; + } + + /** + * Required - API name: {@code bottom} + */ + public final double bottom() { + return this.bottom; + } + + /** + * Required - API name: {@code left} + */ + public final double left() { + return this.left; + } + + /** + * Required - API name: {@code right} + */ + public final double right() { + return this.right; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("top"); + generator.write(this.top); + + generator.writeKey("bottom"); + generator.write(this.bottom); + + generator.writeKey("left"); + generator.write(this.left); + + generator.writeKey("right"); + generator.write(this.right); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CoordsGeoBounds}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Double top; + + private Double bottom; + + private Double left; + + private Double right; + + /** + * Required - API name: {@code top} + */ + public final Builder top(double value) { + this.top = value; + return this; + } + + /** + * Required - API name: {@code bottom} + */ + public final Builder bottom(double value) { + this.bottom = value; + return this; + } + + /** + * Required - API name: {@code left} + */ + public final Builder left(double value) { + this.left = value; + return this; + } + + /** + * Required - API name: {@code right} + */ + public final Builder right(double value) { + this.right = value; + return this; + } + + /** + * Builds a {@link CoordsGeoBounds}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CoordsGeoBounds build() { + _checkSingleUse(); + + return new CoordsGeoBounds(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CoordsGeoBounds} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + CoordsGeoBounds::setupCoordsGeoBoundsDeserializer + ); + + protected static void setupCoordsGeoBoundsDeserializer(ObjectDeserializer op) { + + op.add(Builder::top, JsonpDeserializer.doubleDeserializer(), "top"); + op.add(Builder::bottom, JsonpDeserializer.doubleDeserializer(), "bottom"); + op.add(Builder::left, JsonpDeserializer.doubleDeserializer(), "left"); + op.add(Builder::right, JsonpDeserializer.doubleDeserializer(), "right"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java index 89bfa132da..fa3511a98c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DistanceUnit.java @@ -37,36 +37,35 @@ @JsonpDeserializable public enum DistanceUnit implements JsonEnum { - Inches("in"), + Inches("in"), - Feet("ft"), + Feet("ft"), - Yards("yd"), + Yards("yd"), - Miles("mi"), + Miles("mi"), - NauticMiles("nmi"), + NauticMiles("nmi"), - Kilometers("km"), + Kilometers("km"), - Meters("m"), + Meters("m"), - Centimeters("cm"), + Centimeters("cm"), - Millimeters("mm"), + Millimeters("mm"), - ; + ; - private final String jsonValue; + private final String jsonValue; - DistanceUnit(String jsonValue) { - this.jsonValue = jsonValue; - } + DistanceUnit(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - DistanceUnit.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(DistanceUnit.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java index 9cd3381b5b..25f5f8a39f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/DocStats.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,116 +43,116 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.DocStats @JsonpDeserializable public class DocStats implements JsonpSerializable { - private final long count; - - private final long deleted; - - // --------------------------------------------------------------------------------------------- + private final long count; - private DocStats(Builder builder) { + private final long deleted; + + // --------------------------------------------------------------------------------------------- - this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); - this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted"); + private DocStats(Builder builder) { - } + this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); + this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted"); - public static DocStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } + } - /** - * Required - API name: {@code count} - */ - public final long count() { - return this.count; - } + public static DocStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code deleted} - */ - public final long deleted() { - return this.deleted; - } + /** + * Required - API name: {@code count} + */ + public final long count() { + return this.count; + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } + /** + * Required - API name: {@code deleted} + */ + public final long deleted() { + return this.deleted; + } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } - generator.writeKey("count"); - generator.write(this.count); + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("deleted"); - generator.write(this.deleted); + generator.writeKey("count"); + generator.write(this.count); - } + generator.writeKey("deleted"); + generator.write(this.deleted); - // --------------------------------------------------------------------------------------------- + } - /** - * Builder for {@link DocStats}. - */ + // --------------------------------------------------------------------------------------------- - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long count; + /** + * Builder for {@link DocStats}. + */ - private Long deleted; + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long count; - /** - * Required - API name: {@code count} - */ - public final Builder count(long value) { - this.count = value; - return this; - } + private Long deleted; - /** - * Required - API name: {@code deleted} - */ - public final Builder deleted(long value) { - this.deleted = value; - return this; - } + /** + * Required - API name: {@code count} + */ + public final Builder count(long value) { + this.count = value; + return this; + } - /** - * Builds a {@link DocStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DocStats build() { - _checkSingleUse(); + /** + * Required - API name: {@code deleted} + */ + public final Builder deleted(long value) { + this.deleted = value; + return this; + } - return new DocStats(this); - } - } + /** + * Builds a {@link DocStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DocStats build() { + _checkSingleUse(); - // --------------------------------------------------------------------------------------------- + return new DocStats(this); + } + } - /** - * Json deserializer for {@link DocStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - DocStats::setupDocStatsDeserializer); + // --------------------------------------------------------------------------------------------- - protected static void setupDocStatsDeserializer(ObjectDeserializer op) { + /** + * Json deserializer for {@link DocStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + DocStats::setupDocStatsDeserializer + ); - op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); - op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); + protected static void setupDocStatsDeserializer(ObjectDeserializer op) { - } + op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); + op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java index a4de144e2f..2bac7df617 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyObject.java @@ -32,41 +32,40 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; /** * For empty Class assignments - * + * */ @JsonpDeserializable public class EmptyObject implements JsonpSerializable { - public static final class Builder implements ObjectBuilder { - @Override - public EmptyObject build() { - return EmptyObject._INSTANCE; - } - } + public static final class Builder implements ObjectBuilder { + @Override + public EmptyObject build() { + return EmptyObject._INSTANCE; + } + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - generator.writeEnd(); - } + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + generator.writeEnd(); + } - /** - * Singleton instance for empty class {@link EmptyObject}. - */ - public static final EmptyObject _INSTANCE = new EmptyObject(); + /** + * Singleton instance for empty class {@link EmptyObject}. + */ + public static final EmptyObject _INSTANCE = new EmptyObject(); - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .emptyObject(EmptyObject._INSTANCE); + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.emptyObject(EmptyObject._INSTANCE); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java index 8baccedfaa..6d298b5a7c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/EmptyTransform.java @@ -32,37 +32,36 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; @JsonpDeserializable public class EmptyTransform implements JsonpSerializable { - public static final class Builder implements ObjectBuilder { - @Override - public EmptyTransform build() { - return EmptyTransform._INSTANCE; - } - } + public static final class Builder implements ObjectBuilder { + @Override + public EmptyTransform build() { + return EmptyTransform._INSTANCE; + } + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - generator.writeEnd(); - } + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + generator.writeEnd(); + } - /** - * Singleton instance for empty class {@link EmptyTransform}. - */ - public static final EmptyTransform _INSTANCE = new EmptyTransform(); + /** + * Singleton instance for empty class {@link EmptyTransform}. + */ + public static final EmptyTransform _INSTANCE = new EmptyTransform(); - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .emptyObject(EmptyTransform._INSTANCE); + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.emptyObject(EmptyTransform._INSTANCE); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java index c2b4b1cd13..469134d325 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorCause.java @@ -32,6 +32,12 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; @@ -42,12 +48,6 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.ErrorCause @@ -58,342 +58,344 @@ */ @JsonpDeserializable public class ErrorCause implements JsonpSerializable { - private final Map metadata; - - private final String type; - - private final String reason; - - @Nullable - private final String stackTrace; - - @Nullable - private final ErrorCause causedBy; - - private final List rootCause; - - private final List suppressed; - - // --------------------------------------------------------------------------------------------- - - private ErrorCause(Builder builder) { - - this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); - - this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - this.reason = ApiTypeHelper.requireNonNull(builder.reason, this, "reason"); - this.stackTrace = builder.stackTrace; - this.causedBy = builder.causedBy; - this.rootCause = ApiTypeHelper.unmodifiable(builder.rootCause); - this.suppressed = ApiTypeHelper.unmodifiable(builder.suppressed); - - } - - public static ErrorCause of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Additional details about the error - */ - public final Map metadata() { - return this.metadata; - } - - /** - * Required - The type of error - *

- * API name: {@code type} - */ - public final String type() { - return this.type; - } - - /** - * Required - A human-readable explanation of the error, in english - *

- * API name: {@code reason} - */ - public final String reason() { - return this.reason; - } - - /** - * The server stack trace. Present only if the error_trace=true - * parameter was sent with the request. - *

- * API name: {@code stack_trace} - */ - @Nullable - public final String stackTrace() { - return this.stackTrace; - } - - /** - * API name: {@code caused_by} - */ - @Nullable - public final ErrorCause causedBy() { - return this.causedBy; - } - - /** - * API name: {@code root_cause} - */ - public final List rootCause() { - return this.rootCause; - } - - /** - * API name: {@code suppressed} - */ - public final List suppressed() { - return this.suppressed; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - for (Map.Entry item0 : this.metadata.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - - generator.writeKey("type"); - generator.write(this.type); - - generator.writeKey("reason"); - generator.write(this.reason); - - if (this.stackTrace != null) { - generator.writeKey("stack_trace"); - generator.write(this.stackTrace); - - } - if (this.causedBy != null) { - generator.writeKey("caused_by"); - this.causedBy.serialize(generator, mapper); - - } - if (ApiTypeHelper.isDefined(this.rootCause)) { - generator.writeKey("root_cause"); - generator.writeStartArray(); - for (ErrorCause item0 : this.rootCause) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.suppressed)) { - generator.writeKey("suppressed"); - generator.writeStartArray(); - for (ErrorCause item0 : this.suppressed) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ErrorCause}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private Map metadata = new HashMap<>(); - - /** - * Additional details about the error - *

- * Adds all entries of map to metadata. - */ - public final Builder metadata(Map map) { - this.metadata = _mapPutAll(this.metadata, map); - return this; - } - - /** - * Additional details about the error - *

- * Adds an entry to metadata. - */ - public final Builder metadata(String key, JsonData value) { - this.metadata = _mapPut(this.metadata, key, value); - return this; - } - - private String type; - - private String reason; - - @Nullable - private String stackTrace; - - @Nullable - private ErrorCause causedBy; - - @Nullable - private List rootCause; - - @Nullable - private List suppressed; - - /** - * Required - The type of error - *

- * API name: {@code type} - */ - public final Builder type(String value) { - this.type = value; - return this; - } - - /** - * Required - A human-readable explanation of the error, in english - *

- * API name: {@code reason} - */ - public final Builder reason(String value) { - this.reason = value; - return this; - } - - /** - * The server stack trace. Present only if the error_trace=true - * parameter was sent with the request. - *

- * API name: {@code stack_trace} - */ - public final Builder stackTrace(@Nullable String value) { - this.stackTrace = value; - return this; - } - - /** - * API name: {@code caused_by} - */ - public final Builder causedBy(@Nullable ErrorCause value) { - this.causedBy = value; - return this; - } - - /** - * API name: {@code caused_by} - */ - public final Builder causedBy(Function> fn) { - return this.causedBy(fn.apply(new ErrorCause.Builder()).build()); - } - - /** - * API name: {@code root_cause} - *

- * Adds all elements of list to rootCause. - */ - public final Builder rootCause(List list) { - this.rootCause = _listAddAll(this.rootCause, list); - return this; - } - - /** - * API name: {@code root_cause} - *

- * Adds one or more values to rootCause. - */ - public final Builder rootCause(ErrorCause value, ErrorCause... values) { - this.rootCause = _listAdd(this.rootCause, value, values); - return this; - } - - /** - * API name: {@code root_cause} - *

- * Adds a value to rootCause using a builder lambda. - */ - public final Builder rootCause(Function> fn) { - return rootCause(fn.apply(new ErrorCause.Builder()).build()); - } - - /** - * API name: {@code suppressed} - *

- * Adds all elements of list to suppressed. - */ - public final Builder suppressed(List list) { - this.suppressed = _listAddAll(this.suppressed, list); - return this; - } - - /** - * API name: {@code suppressed} - *

- * Adds one or more values to suppressed. - */ - public final Builder suppressed(ErrorCause value, ErrorCause... values) { - this.suppressed = _listAdd(this.suppressed, value, values); - return this; - } - - /** - * API name: {@code suppressed} - *

- * Adds a value to suppressed using a builder lambda. - */ - public final Builder suppressed(Function> fn) { - return suppressed(fn.apply(new ErrorCause.Builder()).build()); - } - - /** - * Builds a {@link ErrorCause}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ErrorCause build() { - _checkSingleUse(); - - return new ErrorCause(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ErrorCause} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - ErrorCause::setupErrorCauseDeserializer); - - protected static void setupErrorCauseDeserializer(ObjectDeserializer op) { - - op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); - op.add(Builder::reason, JsonpDeserializer.stringDeserializer(), "reason"); - op.add(Builder::stackTrace, JsonpDeserializer.stringDeserializer(), "stack_trace"); - op.add(Builder::causedBy, ErrorCause._DESERIALIZER, "caused_by"); - op.add(Builder::rootCause, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "root_cause"); - op.add(Builder::suppressed, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "suppressed"); - - op.setUnknownFieldHandler((builder, name, parser, mapper) -> { - if (builder.metadata == null) { - builder.metadata = new HashMap<>(); - } - builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); - }); - - } + private final Map metadata; + + private final String type; + + private final String reason; + + @Nullable + private final String stackTrace; + + @Nullable + private final ErrorCause causedBy; + + private final List rootCause; + + private final List suppressed; + + // --------------------------------------------------------------------------------------------- + + private ErrorCause(Builder builder) { + + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.reason = ApiTypeHelper.requireNonNull(builder.reason, this, "reason"); + this.stackTrace = builder.stackTrace; + this.causedBy = builder.causedBy; + this.rootCause = ApiTypeHelper.unmodifiable(builder.rootCause); + this.suppressed = ApiTypeHelper.unmodifiable(builder.suppressed); + + } + + public static ErrorCause of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Additional details about the error + */ + public final Map metadata() { + return this.metadata; + } + + /** + * Required - The type of error + *

+ * API name: {@code type} + */ + public final String type() { + return this.type; + } + + /** + * Required - A human-readable explanation of the error, in english + *

+ * API name: {@code reason} + */ + public final String reason() { + return this.reason; + } + + /** + * The server stack trace. Present only if the error_trace=true + * parameter was sent with the request. + *

+ * API name: {@code stack_trace} + */ + @Nullable + public final String stackTrace() { + return this.stackTrace; + } + + /** + * API name: {@code caused_by} + */ + @Nullable + public final ErrorCause causedBy() { + return this.causedBy; + } + + /** + * API name: {@code root_cause} + */ + public final List rootCause() { + return this.rootCause; + } + + /** + * API name: {@code suppressed} + */ + public final List suppressed() { + return this.suppressed; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + + generator.writeKey("type"); + generator.write(this.type); + + generator.writeKey("reason"); + generator.write(this.reason); + + if (this.stackTrace != null) { + generator.writeKey("stack_trace"); + generator.write(this.stackTrace); + + } + if (this.causedBy != null) { + generator.writeKey("caused_by"); + this.causedBy.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.rootCause)) { + generator.writeKey("root_cause"); + generator.writeStartArray(); + for (ErrorCause item0 : this.rootCause) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.suppressed)) { + generator.writeKey("suppressed"); + generator.writeStartArray(); + for (ErrorCause item0 : this.suppressed) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ErrorCause}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private Map metadata = new HashMap<>(); + + /** + * Additional details about the error + *

+ * Adds all entries of map to metadata. + */ + public final Builder metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return this; + } + + /** + * Additional details about the error + *

+ * Adds an entry to metadata. + */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + private String type; + + private String reason; + + @Nullable + private String stackTrace; + + @Nullable + private ErrorCause causedBy; + + @Nullable + private List rootCause; + + @Nullable + private List suppressed; + + /** + * Required - The type of error + *

+ * API name: {@code type} + */ + public final Builder type(String value) { + this.type = value; + return this; + } + + /** + * Required - A human-readable explanation of the error, in english + *

+ * API name: {@code reason} + */ + public final Builder reason(String value) { + this.reason = value; + return this; + } + + /** + * The server stack trace. Present only if the error_trace=true + * parameter was sent with the request. + *

+ * API name: {@code stack_trace} + */ + public final Builder stackTrace(@Nullable String value) { + this.stackTrace = value; + return this; + } + + /** + * API name: {@code caused_by} + */ + public final Builder causedBy(@Nullable ErrorCause value) { + this.causedBy = value; + return this; + } + + /** + * API name: {@code caused_by} + */ + public final Builder causedBy(Function> fn) { + return this.causedBy(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * API name: {@code root_cause} + *

+ * Adds all elements of list to rootCause. + */ + public final Builder rootCause(List list) { + this.rootCause = _listAddAll(this.rootCause, list); + return this; + } + + /** + * API name: {@code root_cause} + *

+ * Adds one or more values to rootCause. + */ + public final Builder rootCause(ErrorCause value, ErrorCause... values) { + this.rootCause = _listAdd(this.rootCause, value, values); + return this; + } + + /** + * API name: {@code root_cause} + *

+ * Adds a value to rootCause using a builder lambda. + */ + public final Builder rootCause(Function> fn) { + return rootCause(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * API name: {@code suppressed} + *

+ * Adds all elements of list to suppressed. + */ + public final Builder suppressed(List list) { + this.suppressed = _listAddAll(this.suppressed, list); + return this; + } + + /** + * API name: {@code suppressed} + *

+ * Adds one or more values to suppressed. + */ + public final Builder suppressed(ErrorCause value, ErrorCause... values) { + this.suppressed = _listAdd(this.suppressed, value, values); + return this; + } + + /** + * API name: {@code suppressed} + *

+ * Adds a value to suppressed using a builder lambda. + */ + public final Builder suppressed(Function> fn) { + return suppressed(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * Builds a {@link ErrorCause}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ErrorCause build() { + _checkSingleUse(); + + return new ErrorCause(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ErrorCause} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + ErrorCause::setupErrorCauseDeserializer + ); + + protected static void setupErrorCauseDeserializer(ObjectDeserializer op) { + + op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); + op.add(Builder::reason, JsonpDeserializer.stringDeserializer(), "reason"); + op.add(Builder::stackTrace, JsonpDeserializer.stringDeserializer(), "stack_trace"); + op.add(Builder::causedBy, ErrorCause._DESERIALIZER, "caused_by"); + op.add(Builder::rootCause, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "root_cause"); + op.add(Builder::suppressed, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "suppressed"); + + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + if (builder.metadata == null) { + builder.metadata = new HashMap<>(); + } + builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); + }); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java index 19d97fec9e..029d6a20c0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ErrorResponse.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -42,147 +44,146 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.function.Function; // typedef: _types.ErrorResponseBase /** * The response returned by Elasticsearch when request execution did not * succeed. - * + * */ @JsonpDeserializable public class ErrorResponse implements JsonpSerializable { - private enum Kind { - OBJECT, - STRING - } - private final ErrorCause error; - - private final int status; - - // --------------------------------------------------------------------------------------------- - - private ErrorResponse(Builder builder) { - - this.error = ApiTypeHelper.requireNonNull(builder.error, this, "error"); - this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); - - } + private enum Kind { + OBJECT, + STRING + } + + private final ErrorCause error; + + private final int status; + + // --------------------------------------------------------------------------------------------- + + private ErrorResponse(Builder builder) { + + this.error = ApiTypeHelper.requireNonNull(builder.error, this, "error"); + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + + } + + public static ErrorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } - public static ErrorResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code error} - */ - public final ErrorCause error() { - return this.error; - } - - /** - * Required - API name: {@code status} - */ - public final int status() { - return this.status; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("error"); - this.error.serialize(generator, mapper); - - generator.writeKey("status"); - generator.write(this.status); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ErrorResponse}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private ErrorCause error; - - private Integer status; - - /** - * Required - API name: {@code error} - */ - public final Builder error(ErrorCause value) { - this.error = value; - return this; - } - - /** - * Required - API name: {@code error} - */ - public final Builder error(Function> fn) { - return this.error(fn.apply(new ErrorCause.Builder()).build()); - } - - /** - * Required - API name: {@code status} - */ - public final Builder status(int value) { - this.status = value; - return this; - } - - /** - * Builds a {@link ErrorResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ErrorResponse build() { - _checkSingleUse(); - - return new ErrorResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ErrorResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - ErrorResponse::setupErrorResponseDeserializer); - - protected static void setupErrorResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::error, buildErrorCauseDeserializers(), "error"); - op.add(Builder::status, JsonpDeserializer.integerDeserializer(), "status"); - - } - - protected static JsonpDeserializer buildErrorCauseDeserializers() { - return new UnionDeserializer.Builder<>(ErrorResponse::getErrorCause, false) - .addMember(Kind.OBJECT, ErrorCause._DESERIALIZER) - .addMember(Kind.STRING, JsonpDeserializer.stringDeserializer()) - .build(); - } - - private static ErrorCause getErrorCause(Kind kind, Object errorCause) { - return Kind.STRING.equals(kind) ? - ErrorCause.of(builder -> builder.type("string_error").reason((String) errorCause)) : - (ErrorCause) errorCause; - } + /** + * Required - API name: {@code error} + */ + public final ErrorCause error() { + return this.error; + } + + /** + * Required - API name: {@code status} + */ + public final int status() { + return this.status; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + generator.writeKey("status"); + generator.write(this.status); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ErrorResponse}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private ErrorCause error; + + private Integer status; + + /** + * Required - API name: {@code error} + */ + public final Builder error(ErrorCause value) { + this.error = value; + return this; + } + + /** + * Required - API name: {@code error} + */ + public final Builder error(Function> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * Required - API name: {@code status} + */ + public final Builder status(int value) { + this.status = value; + return this; + } + + /** + * Builds a {@link ErrorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ErrorResponse build() { + _checkSingleUse(); + + return new ErrorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ErrorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + ErrorResponse::setupErrorResponseDeserializer + ); + + protected static void setupErrorResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::error, buildErrorCauseDeserializers(), "error"); + op.add(Builder::status, JsonpDeserializer.integerDeserializer(), "status"); + + } + + protected static JsonpDeserializer buildErrorCauseDeserializers() { + return new UnionDeserializer.Builder<>(ErrorResponse::getErrorCause, false).addMember(Kind.OBJECT, ErrorCause._DESERIALIZER) + .addMember(Kind.STRING, JsonpDeserializer.stringDeserializer()) + .build(); + } + + private static ErrorCause getErrorCause(Kind kind, Object errorCause) { + return Kind.STRING.equals(kind) + ? ErrorCause.of(builder -> builder.type("string_error").reason((String) errorCause)) + : (ErrorCause) errorCause; + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java index 352063ee54..5b66a33bd2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ExpandWildcard.java @@ -37,45 +37,44 @@ @JsonpDeserializable public enum ExpandWildcard implements JsonEnum { - /** - * Match any data stream or index, including hidden ones. - */ - All("all"), + /** + * Match any data stream or index, including hidden ones. + */ + All("all"), - /** - * Match open, non-hidden indices. Also matches any non-hidden data stream. - */ - Open("open"), + /** + * Match open, non-hidden indices. Also matches any non-hidden data stream. + */ + Open("open"), - /** - * Match closed, non-hidden indices. Also matches any non-hidden data stream. - * Data streams cannot be closed. - */ - Closed("closed"), + /** + * Match closed, non-hidden indices. Also matches any non-hidden data stream. + * Data streams cannot be closed. + */ + Closed("closed"), - /** - * Match hidden data streams and hidden indices. Must be combined with open, - * closed, or both. - */ - Hidden("hidden"), + /** + * Match hidden data streams and hidden indices. Must be combined with open, + * closed, or both. + */ + Hidden("hidden"), - /** - * Wildcard expressions are not accepted. - */ - None("none"), + /** + * Wildcard expressions are not accepted. + */ + None("none"), - ; + ; - private final String jsonValue; + private final String jsonValue; - ExpandWildcard(String jsonValue) { - this.jsonValue = jsonValue; - } + ExpandWildcard(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - ExpandWildcard.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(ExpandWildcard.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java index 0802fbdaa5..b202739387 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldMemoryUsage.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,122 +44,121 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.FieldMemoryUsage @JsonpDeserializable public class FieldMemoryUsage implements JsonpSerializable { - @Nullable - private final String memorySize; - - private final long memorySizeInBytes; - - // --------------------------------------------------------------------------------------------- - - private FieldMemoryUsage(Builder builder) { - - this.memorySize = builder.memorySize; - this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); - - } - - public static FieldMemoryUsage of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code memory_size} - */ - @Nullable - public final String memorySize() { - return this.memorySize; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final long memorySizeInBytes() { - return this.memorySizeInBytes; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.memorySize != null) { - generator.writeKey("memory_size"); - generator.write(this.memorySize); - - } - generator.writeKey("memory_size_in_bytes"); - generator.write(this.memorySizeInBytes); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FieldMemoryUsage}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private String memorySize; - - private Long memorySizeInBytes; - - /** - * API name: {@code memory_size} - */ - public final Builder memorySize(@Nullable String value) { - this.memorySize = value; - return this; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final Builder memorySizeInBytes(long value) { - this.memorySizeInBytes = value; - return this; - } - - /** - * Builds a {@link FieldMemoryUsage}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FieldMemoryUsage build() { - _checkSingleUse(); - - return new FieldMemoryUsage(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FieldMemoryUsage} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FieldMemoryUsage::setupFieldMemoryUsageDeserializer); - - protected static void setupFieldMemoryUsageDeserializer(ObjectDeserializer op) { - - op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); - op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes"); - - } + @Nullable + private final String memorySize; + + private final long memorySizeInBytes; + + // --------------------------------------------------------------------------------------------- + + private FieldMemoryUsage(Builder builder) { + + this.memorySize = builder.memorySize; + this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); + + } + + public static FieldMemoryUsage of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code memory_size} + */ + @Nullable + public final String memorySize() { + return this.memorySize; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final long memorySizeInBytes() { + return this.memorySizeInBytes; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.memorySize != null) { + generator.writeKey("memory_size"); + generator.write(this.memorySize); + + } + generator.writeKey("memory_size_in_bytes"); + generator.write(this.memorySizeInBytes); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FieldMemoryUsage}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String memorySize; + + private Long memorySizeInBytes; + + /** + * API name: {@code memory_size} + */ + public final Builder memorySize(@Nullable String value) { + this.memorySize = value; + return this; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final Builder memorySizeInBytes(long value) { + this.memorySizeInBytes = value; + return this; + } + + /** + * Builds a {@link FieldMemoryUsage}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FieldMemoryUsage build() { + _checkSingleUse(); + + return new FieldMemoryUsage(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FieldMemoryUsage} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + FieldMemoryUsage::setupFieldMemoryUsageDeserializer + ); + + protected static void setupFieldMemoryUsageDeserializer(ObjectDeserializer op) { + + op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); + op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java index edb66f531e..9d90e1e566 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSizeUsage.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,122 +44,121 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.FieldSizeUsage @JsonpDeserializable public class FieldSizeUsage implements JsonpSerializable { - @Nullable - private final String size; - - private final long sizeInBytes; - - // --------------------------------------------------------------------------------------------- - - private FieldSizeUsage(Builder builder) { - - this.size = builder.size; - this.sizeInBytes = ApiTypeHelper.requireNonNull(builder.sizeInBytes, this, "sizeInBytes"); - - } - - public static FieldSizeUsage of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code size} - */ - @Nullable - public final String size() { - return this.size; - } - - /** - * Required - API name: {@code size_in_bytes} - */ - public final long sizeInBytes() { - return this.sizeInBytes; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.size != null) { - generator.writeKey("size"); - generator.write(this.size); - - } - generator.writeKey("size_in_bytes"); - generator.write(this.sizeInBytes); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FieldSizeUsage}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private String size; - - private Long sizeInBytes; - - /** - * API name: {@code size} - */ - public final Builder size(@Nullable String value) { - this.size = value; - return this; - } - - /** - * Required - API name: {@code size_in_bytes} - */ - public final Builder sizeInBytes(long value) { - this.sizeInBytes = value; - return this; - } - - /** - * Builds a {@link FieldSizeUsage}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FieldSizeUsage build() { - _checkSingleUse(); - - return new FieldSizeUsage(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FieldSizeUsage} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FieldSizeUsage::setupFieldSizeUsageDeserializer); - - protected static void setupFieldSizeUsageDeserializer(ObjectDeserializer op) { - - op.add(Builder::size, JsonpDeserializer.stringDeserializer(), "size"); - op.add(Builder::sizeInBytes, JsonpDeserializer.longDeserializer(), "size_in_bytes"); - - } + @Nullable + private final String size; + + private final long sizeInBytes; + + // --------------------------------------------------------------------------------------------- + + private FieldSizeUsage(Builder builder) { + + this.size = builder.size; + this.sizeInBytes = ApiTypeHelper.requireNonNull(builder.sizeInBytes, this, "sizeInBytes"); + + } + + public static FieldSizeUsage of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code size} + */ + @Nullable + public final String size() { + return this.size; + } + + /** + * Required - API name: {@code size_in_bytes} + */ + public final long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.size != null) { + generator.writeKey("size"); + generator.write(this.size); + + } + generator.writeKey("size_in_bytes"); + generator.write(this.sizeInBytes); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FieldSizeUsage}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String size; + + private Long sizeInBytes; + + /** + * API name: {@code size} + */ + public final Builder size(@Nullable String value) { + this.size = value; + return this; + } + + /** + * Required - API name: {@code size_in_bytes} + */ + public final Builder sizeInBytes(long value) { + this.sizeInBytes = value; + return this; + } + + /** + * Builds a {@link FieldSizeUsage}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FieldSizeUsage build() { + _checkSingleUse(); + + return new FieldSizeUsage(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FieldSizeUsage} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + FieldSizeUsage::setupFieldSizeUsageDeserializer + ); + + protected static void setupFieldSizeUsageDeserializer(ObjectDeserializer op) { + + op.add(Builder::size, JsonpDeserializer.stringDeserializer(), "size"); + op.add(Builder::sizeInBytes, JsonpDeserializer.longDeserializer(), "size_in_bytes"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java index c9ab537e29..08806a7cc8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSort.java @@ -32,322 +32,323 @@ package org.opensearch.client.opensearch._types; -import org.opensearch.client.opensearch._types.mapping.FieldType; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.mapping.FieldType; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.FieldSort @JsonpDeserializable public class FieldSort implements JsonpSerializable { - // Single key dictionary - private final String field; - - @Nullable - private final FieldValue missing; - - @Nullable - private final SortMode mode; - - @Nullable - private final NestedSortValue nested; - - @Nullable - private final SortOrder order; - - @Nullable - private final FieldType unmappedType; - - @Nullable - private final FieldSortNumericType numericType; - - @Nullable - private final String format; - - // --------------------------------------------------------------------------------------------- - - private FieldSort(Builder builder) { - - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - - this.missing = builder.missing; - this.mode = builder.mode; - this.nested = builder.nested; - this.order = builder.order; - this.unmappedType = builder.unmappedType; - this.numericType = builder.numericType; - this.format = builder.format; - - } - - public static FieldSort of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The target field - */ - public final String field() { - return this.field; - } - - /** - * API name: {@code missing} - */ - @Nullable - public final FieldValue missing() { - return this.missing; - } - - /** - * API name: {@code mode} - */ - @Nullable - public final SortMode mode() { - return this.mode; - } - - /** - * API name: {@code nested} - */ - @Nullable - public final NestedSortValue nested() { - return this.nested; - } - - /** - * API name: {@code order} - */ - @Nullable - public final SortOrder order() { - return this.order; - } - - /** - * API name: {@code unmapped_type} - */ - @Nullable - public final FieldType unmappedType() { - return this.unmappedType; - } - - /** - * API name: {@code numeric_type} - */ - @Nullable - public final FieldSortNumericType numericType() { - return this.numericType; - } - - /** - * API name: {@code format} - */ - @Nullable - public final String format() { - return this.format; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(this.field); - - if (this.missing != null) { - generator.writeKey("missing"); - this.missing.serialize(generator, mapper); - - } - if (this.mode != null) { - generator.writeKey("mode"); - this.mode.serialize(generator, mapper); - } - if (this.nested != null) { - generator.writeKey("nested"); - this.nested.serialize(generator, mapper); - - } - if (this.order != null) { - generator.writeKey("order"); - this.order.serialize(generator, mapper); - } - if (this.unmappedType != null) { - generator.writeKey("unmapped_type"); - this.unmappedType.serialize(generator, mapper); - } - if (this.numericType != null) { - generator.writeKey("numeric_type"); - this.numericType.serialize(generator, mapper); - } - if (this.format != null) { - generator.writeKey("format"); - generator.write(this.format); - - } - - generator.writeEnd(); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FieldSort}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String field; - - /** - * Required - The target field - */ - public final Builder field(String value) { - this.field = value; - return this; - } - - @Nullable - private FieldValue missing; - - @Nullable - private SortMode mode; - - @Nullable - private NestedSortValue nested; - - @Nullable - private SortOrder order; - - @Nullable - private FieldType unmappedType; - - @Nullable - private FieldSortNumericType numericType; - - @Nullable - private String format; - - /** - * API name: {@code missing} - */ - public final Builder missing(@Nullable FieldValue value) { - this.missing = value; - return this; - } - - /** - * API name: {@code missing} - */ - public final Builder missing(Function> fn) { - return this.missing(fn.apply(new FieldValue.Builder()).build()); - } - - /** - * API name: {@code mode} - */ - public final Builder mode(@Nullable SortMode value) { - this.mode = value; - return this; - } - - /** - * API name: {@code nested} - */ - public final Builder nested(@Nullable NestedSortValue value) { - this.nested = value; - return this; - } - - /** - * API name: {@code nested} - */ - public final Builder nested(Function> fn) { - return this.nested(fn.apply(new NestedSortValue.Builder()).build()); - } - - /** - * API name: {@code order} - */ - public final Builder order(@Nullable SortOrder value) { - this.order = value; - return this; - } - - /** - * API name: {@code unmapped_type} - */ - public final Builder unmappedType(@Nullable FieldType value) { - this.unmappedType = value; - return this; - } - - /** - * API name: {@code numeric_type} - */ - public final Builder numericType(@Nullable FieldSortNumericType value) { - this.numericType = value; - return this; - } - - /** - * API name: {@code format} - */ - public final Builder format(@Nullable String value) { - this.format = value; - return this; - } - - /** - * Builds a {@link FieldSort}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FieldSort build() { - _checkSingleUse(); - - return new FieldSort(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FieldSort} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FieldSort::setupFieldSortDeserializer); - - protected static void setupFieldSortDeserializer(ObjectDeserializer op) { - - op.add(Builder::missing, FieldValue._DESERIALIZER, "missing"); - op.add(Builder::mode, SortMode._DESERIALIZER, "mode"); - op.add(Builder::nested, NestedSortValue._DESERIALIZER, "nested"); - op.add(Builder::order, SortOrder._DESERIALIZER, "order"); - op.add(Builder::unmappedType, FieldType._DESERIALIZER, "unmapped_type"); - op.add(Builder::numericType, FieldSortNumericType._DESERIALIZER, "numeric_type"); - op.add(Builder::format, JsonpDeserializer.stringDeserializer(), "format"); - - op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); - op.shortcutProperty("order"); - - } + // Single key dictionary + private final String field; + + @Nullable + private final FieldValue missing; + + @Nullable + private final SortMode mode; + + @Nullable + private final NestedSortValue nested; + + @Nullable + private final SortOrder order; + + @Nullable + private final FieldType unmappedType; + + @Nullable + private final FieldSortNumericType numericType; + + @Nullable + private final String format; + + // --------------------------------------------------------------------------------------------- + + private FieldSort(Builder builder) { + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + + this.missing = builder.missing; + this.mode = builder.mode; + this.nested = builder.nested; + this.order = builder.order; + this.unmappedType = builder.unmappedType; + this.numericType = builder.numericType; + this.format = builder.format; + + } + + public static FieldSort of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The target field + */ + public final String field() { + return this.field; + } + + /** + * API name: {@code missing} + */ + @Nullable + public final FieldValue missing() { + return this.missing; + } + + /** + * API name: {@code mode} + */ + @Nullable + public final SortMode mode() { + return this.mode; + } + + /** + * API name: {@code nested} + */ + @Nullable + public final NestedSortValue nested() { + return this.nested; + } + + /** + * API name: {@code order} + */ + @Nullable + public final SortOrder order() { + return this.order; + } + + /** + * API name: {@code unmapped_type} + */ + @Nullable + public final FieldType unmappedType() { + return this.unmappedType; + } + + /** + * API name: {@code numeric_type} + */ + @Nullable + public final FieldSortNumericType numericType() { + return this.numericType; + } + + /** + * API name: {@code format} + */ + @Nullable + public final String format() { + return this.format; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + if (this.missing != null) { + generator.writeKey("missing"); + this.missing.serialize(generator, mapper); + + } + if (this.mode != null) { + generator.writeKey("mode"); + this.mode.serialize(generator, mapper); + } + if (this.nested != null) { + generator.writeKey("nested"); + this.nested.serialize(generator, mapper); + + } + if (this.order != null) { + generator.writeKey("order"); + this.order.serialize(generator, mapper); + } + if (this.unmappedType != null) { + generator.writeKey("unmapped_type"); + this.unmappedType.serialize(generator, mapper); + } + if (this.numericType != null) { + generator.writeKey("numeric_type"); + this.numericType.serialize(generator, mapper); + } + if (this.format != null) { + generator.writeKey("format"); + generator.write(this.format); + + } + + generator.writeEnd(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FieldSort}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String field; + + /** + * Required - The target field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + @Nullable + private FieldValue missing; + + @Nullable + private SortMode mode; + + @Nullable + private NestedSortValue nested; + + @Nullable + private SortOrder order; + + @Nullable + private FieldType unmappedType; + + @Nullable + private FieldSortNumericType numericType; + + @Nullable + private String format; + + /** + * API name: {@code missing} + */ + public final Builder missing(@Nullable FieldValue value) { + this.missing = value; + return this; + } + + /** + * API name: {@code missing} + */ + public final Builder missing(Function> fn) { + return this.missing(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * API name: {@code mode} + */ + public final Builder mode(@Nullable SortMode value) { + this.mode = value; + return this; + } + + /** + * API name: {@code nested} + */ + public final Builder nested(@Nullable NestedSortValue value) { + this.nested = value; + return this; + } + + /** + * API name: {@code nested} + */ + public final Builder nested(Function> fn) { + return this.nested(fn.apply(new NestedSortValue.Builder()).build()); + } + + /** + * API name: {@code order} + */ + public final Builder order(@Nullable SortOrder value) { + this.order = value; + return this; + } + + /** + * API name: {@code unmapped_type} + */ + public final Builder unmappedType(@Nullable FieldType value) { + this.unmappedType = value; + return this; + } + + /** + * API name: {@code numeric_type} + */ + public final Builder numericType(@Nullable FieldSortNumericType value) { + this.numericType = value; + return this; + } + + /** + * API name: {@code format} + */ + public final Builder format(@Nullable String value) { + this.format = value; + return this; + } + + /** + * Builds a {@link FieldSort}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FieldSort build() { + _checkSingleUse(); + + return new FieldSort(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FieldSort} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + FieldSort::setupFieldSortDeserializer + ); + + protected static void setupFieldSortDeserializer(ObjectDeserializer op) { + + op.add(Builder::missing, FieldValue._DESERIALIZER, "missing"); + op.add(Builder::mode, SortMode._DESERIALIZER, "mode"); + op.add(Builder::nested, NestedSortValue._DESERIALIZER, "nested"); + op.add(Builder::order, SortOrder._DESERIALIZER, "order"); + op.add(Builder::unmappedType, FieldType._DESERIALIZER, "unmapped_type"); + op.add(Builder::numericType, FieldSortNumericType._DESERIALIZER, "numeric_type"); + op.add(Builder::format, JsonpDeserializer.stringDeserializer(), "format"); + + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + op.shortcutProperty("order"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java index 776101e80c..faf7f9d667 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldSortNumericType.java @@ -37,26 +37,27 @@ @JsonpDeserializable public enum FieldSortNumericType implements JsonEnum { - Long("long"), + Long("long"), - Double("double"), + Double("double"), - Date("date"), + Date("date"), - DateNanos("date_nanos"), + DateNanos("date_nanos"), - ; + ; - private final String jsonValue; + private final String jsonValue; - FieldSortNumericType(String jsonValue) { - this.jsonValue = jsonValue; - } + FieldSortNumericType(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - FieldSortNumericType.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FieldSortNumericType.values() + ); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java index c5efb8350e..fbf6808921 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FieldValue.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import java.util.EnumSet; +import java.util.function.Consumer; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,245 +45,250 @@ import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import jakarta.json.stream.JsonParser; - -import java.util.EnumSet; -import java.util.function.Consumer; // typedef: _types.FieldValue @JsonpDeserializable public class FieldValue implements TaggedUnion, JsonpSerializable { - public static FieldValue of(long value) { - return new FieldValue(Kind.Long, value); - } - - public static FieldValue of(double value) { - return new FieldValue(Kind.Double, value); - } - - public static FieldValue of(boolean value) { - return value ? TRUE : FALSE; - } - - public static FieldValue of(String value) { - return new FieldValue(Kind.String, value); - } - - public static final FieldValue NULL = new FieldValue(Kind.Null, null); - public static final FieldValue TRUE = new FieldValue(Kind.Boolean, Boolean.TRUE); - public static final FieldValue FALSE = new FieldValue(Kind.Boolean, Boolean.FALSE); - - public enum Kind { - Double, Long, Boolean, String, Null - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - public String _toJsonString() { - switch (_kind) { - case Double : - return String.valueOf(this.doubleValue()); - case Long : - return String.valueOf(this.longValue()); - case Boolean : - return String.valueOf(this.booleanValue()); - case String : - return this.stringValue(); - case Null : - return "null"; - - default : - throw new IllegalStateException("Unknown kind " + _kind); - } - } - - private FieldValue(Builder builder) { - this(builder._kind, builder._value); - } - - private FieldValue(Kind kind, Object value) { - this._kind = ApiTypeHelper.requireNonNull(kind, this, ""); - this._value = kind == Kind.Null ? null : ApiTypeHelper.requireNonNull(value, this, ""); - } - - public static FieldValue of(Consumer fn) { - Builder builder = new Builder(); - fn.accept(builder); - return builder.build(); - } - - /** - * Is this variant instance of kind {@code double}? - */ - public boolean isDouble() { - return _kind == Kind.Double; - } - - /** - * Get the {@code double} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code double} kind. - */ - public double doubleValue() { - return TaggedUnionUtils.get(this, Kind.Double); - } - - /** - * Is this variant instance of kind {@code long}? - */ - public boolean isLong() { - return _kind == Kind.Long; - } - - /** - * Get the {@code long} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code long} kind. - */ - public long longValue() { - return TaggedUnionUtils.get(this, Kind.Long); - } - - /** - * Is this variant instance of kind {@code boolean}? - */ - public boolean isBoolean() { - return _kind == Kind.Boolean; - } - - /** - * Get the {@code boolean} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code boolean} kind. - */ - public boolean booleanValue() { - return TaggedUnionUtils.get(this, Kind.Boolean); - } - - /** - * Is this variant instance of kind {@code string}? - */ - public boolean isString() { - return _kind == Kind.String; - } - - /** - * Get the {@code string} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code string} kind. - */ - public String stringValue() { - return TaggedUnionUtils.get(this, Kind.String); - } - - /** - * Is this variant instance of kind {@code null}? - */ - public boolean isNull() { - return _kind == Kind.Null; - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - switch (_kind) { - case Double : - generator.write(((Double) this._value)); - break; - case Long : - generator.write(((Long) this._value)); - break; - case Boolean : - generator.write(((Boolean) this._value)); - break; - case String : - generator.write(((String) this._value)); - break; - case Null : - generator.writeNull(); - break; - } - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - - public ObjectBuilder doubleValue(double v) { - this._kind = Kind.Double; - this._value = v; - return this; - } - - public ObjectBuilder longValue(long v) { - this._kind = Kind.Long; - this._value = v; - return this; - } - - public ObjectBuilder booleanValue(boolean v) { - this._kind = Kind.Boolean; - this._value = v; - return this; - } - - public ObjectBuilder stringValue(String v) { - this._kind = Kind.String; - this._value = v; - return this; - } - - public ObjectBuilder nullValue() { - this._kind = Kind.Null; - this._value = null; - return this; - } - - public FieldValue build() { - _checkSingleUse(); - return new FieldValue(this); - } - } - - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .lazy(() -> JsonpDeserializer.of( - EnumSet.of(JsonParser.Event.VALUE_STRING, JsonParser.Event.VALUE_NUMBER, - JsonParser.Event.VALUE_NULL, - JsonParser.Event.VALUE_TRUE, JsonParser.Event.VALUE_FALSE), - (parser, mapper, event) -> { - switch (event) { - case VALUE_NULL : - return NULL; - case VALUE_STRING : - return FieldValue.of(parser.getString()); - case VALUE_TRUE : - return FieldValue.of(true); - case VALUE_FALSE : - return FieldValue.of(false); - case VALUE_NUMBER : - if (parser.isIntegralNumber()) { - return FieldValue.of(parser.getLong()); - } else { - return FieldValue.of(parser.getBigDecimal().doubleValue()); - } - } - return null; - })); + public static FieldValue of(long value) { + return new FieldValue(Kind.Long, value); + } + + public static FieldValue of(double value) { + return new FieldValue(Kind.Double, value); + } + + public static FieldValue of(boolean value) { + return value ? TRUE : FALSE; + } + + public static FieldValue of(String value) { + return new FieldValue(Kind.String, value); + } + + public static final FieldValue NULL = new FieldValue(Kind.Null, null); + public static final FieldValue TRUE = new FieldValue(Kind.Boolean, Boolean.TRUE); + public static final FieldValue FALSE = new FieldValue(Kind.Boolean, Boolean.FALSE); + + public enum Kind { + Double, + Long, + Boolean, + String, + Null + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + public String _toJsonString() { + switch (_kind) { + case Double: + return String.valueOf(this.doubleValue()); + case Long: + return String.valueOf(this.longValue()); + case Boolean: + return String.valueOf(this.booleanValue()); + case String: + return this.stringValue(); + case Null: + return "null"; + + default: + throw new IllegalStateException("Unknown kind " + _kind); + } + } + + private FieldValue(Builder builder) { + this(builder._kind, builder._value); + } + + private FieldValue(Kind kind, Object value) { + this._kind = ApiTypeHelper.requireNonNull(kind, this, ""); + this._value = kind == Kind.Null ? null : ApiTypeHelper.requireNonNull(value, this, ""); + } + + public static FieldValue of(Consumer fn) { + Builder builder = new Builder(); + fn.accept(builder); + return builder.build(); + } + + /** + * Is this variant instance of kind {@code double}? + */ + public boolean isDouble() { + return _kind == Kind.Double; + } + + /** + * Get the {@code double} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code double} kind. + */ + public double doubleValue() { + return TaggedUnionUtils.get(this, Kind.Double); + } + + /** + * Is this variant instance of kind {@code long}? + */ + public boolean isLong() { + return _kind == Kind.Long; + } + + /** + * Get the {@code long} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code long} kind. + */ + public long longValue() { + return TaggedUnionUtils.get(this, Kind.Long); + } + + /** + * Is this variant instance of kind {@code boolean}? + */ + public boolean isBoolean() { + return _kind == Kind.Boolean; + } + + /** + * Get the {@code boolean} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code boolean} kind. + */ + public boolean booleanValue() { + return TaggedUnionUtils.get(this, Kind.Boolean); + } + + /** + * Is this variant instance of kind {@code string}? + */ + public boolean isString() { + return _kind == Kind.String; + } + + /** + * Get the {@code string} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code string} kind. + */ + public String stringValue() { + return TaggedUnionUtils.get(this, Kind.String); + } + + /** + * Is this variant instance of kind {@code null}? + */ + public boolean isNull() { + return _kind == Kind.Null; + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + switch (_kind) { + case Double: + generator.write(((Double) this._value)); + break; + case Long: + generator.write(((Long) this._value)); + break; + case Boolean: + generator.write(((Boolean) this._value)); + break; + case String: + generator.write(((String) this._value)); + break; + case Null: + generator.writeNull(); + break; + } + } + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + public ObjectBuilder doubleValue(double v) { + this._kind = Kind.Double; + this._value = v; + return this; + } + + public ObjectBuilder longValue(long v) { + this._kind = Kind.Long; + this._value = v; + return this; + } + + public ObjectBuilder booleanValue(boolean v) { + this._kind = Kind.Boolean; + this._value = v; + return this; + } + + public ObjectBuilder stringValue(String v) { + this._kind = Kind.String; + this._value = v; + return this; + } + + public ObjectBuilder nullValue() { + this._kind = Kind.Null; + this._value = null; + return this; + } + + public FieldValue build() { + _checkSingleUse(); + return new FieldValue(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.lazy( + () -> JsonpDeserializer.of( + EnumSet.of( + JsonParser.Event.VALUE_STRING, + JsonParser.Event.VALUE_NUMBER, + JsonParser.Event.VALUE_NULL, + JsonParser.Event.VALUE_TRUE, + JsonParser.Event.VALUE_FALSE + ), + (parser, mapper, event) -> { + switch (event) { + case VALUE_NULL: + return NULL; + case VALUE_STRING: + return FieldValue.of(parser.getString()); + case VALUE_TRUE: + return FieldValue.of(true); + case VALUE_FALSE: + return FieldValue.of(false); + case VALUE_NUMBER: + if (parser.isIntegralNumber()) { + return FieldValue.of(parser.getLong()); + } else { + return FieldValue.of(parser.getBigDecimal().doubleValue()); + } + } + return null; + } + ) + ); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java index ea10424dd4..ece673c2b5 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FielddataStats.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,208 +45,205 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.FielddataStats @JsonpDeserializable public class FielddataStats implements JsonpSerializable { - @Nullable - private final Long evictions; + @Nullable + private final Long evictions; - @Nullable - private final String memorySize; + @Nullable + private final String memorySize; - private final long memorySizeInBytes; + private final long memorySizeInBytes; - private final Map fields; + private final Map fields; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private FielddataStats(Builder builder) { + private FielddataStats(Builder builder) { - this.evictions = builder.evictions; - this.memorySize = builder.memorySize; - this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); - this.fields = ApiTypeHelper.unmodifiable(builder.fields); + this.evictions = builder.evictions; + this.memorySize = builder.memorySize; + this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); + this.fields = ApiTypeHelper.unmodifiable(builder.fields); - } - - public static FielddataStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code evictions} - */ - @Nullable - public final Long evictions() { - return this.evictions; - } - - /** - * API name: {@code memory_size} - */ - @Nullable - public final String memorySize() { - return this.memorySize; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final long memorySizeInBytes() { - return this.memorySizeInBytes; - } - - /** - * API name: {@code fields} - */ - public final Map fields() { - return this.fields; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.evictions != null) { - generator.writeKey("evictions"); - generator.write(this.evictions); - - } - if (this.memorySize != null) { - generator.writeKey("memory_size"); - generator.write(this.memorySize); - - } - generator.writeKey("memory_size_in_bytes"); - generator.write(this.memorySizeInBytes); - - if (ApiTypeHelper.isDefined(this.fields)) { - generator.writeKey("fields"); - generator.writeStartObject(); - for (Map.Entry item0 : this.fields.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FielddataStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private Long evictions; - - @Nullable - private String memorySize; - - private Long memorySizeInBytes; - - @Nullable - private Map fields; - - /** - * API name: {@code evictions} - */ - public final Builder evictions(@Nullable Long value) { - this.evictions = value; - return this; - } - - /** - * API name: {@code memory_size} - */ - public final Builder memorySize(@Nullable String value) { - this.memorySize = value; - return this; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final Builder memorySizeInBytes(long value) { - this.memorySizeInBytes = value; - return this; - } - - /** - * API name: {@code fields} - *

- * Adds all entries of map to fields. - */ - public final Builder fields(Map map) { - this.fields = _mapPutAll(this.fields, map); - return this; - } - - /** - * API name: {@code fields} - *

- * Adds an entry to fields. - */ - public final Builder fields(String key, FieldMemoryUsage value) { - this.fields = _mapPut(this.fields, key, value); - return this; - } - - /** - * API name: {@code fields} - *

- * Adds an entry to fields using a builder lambda. - */ - public final Builder fields(String key, - Function> fn) { - return fields(key, fn.apply(new FieldMemoryUsage.Builder()).build()); - } - - /** - * Builds a {@link FielddataStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FielddataStats build() { - _checkSingleUse(); - - return new FielddataStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FielddataStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FielddataStats::setupFielddataStatsDeserializer); - - protected static void setupFielddataStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::evictions, JsonpDeserializer.longDeserializer(), "evictions"); - op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); - op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes"); - op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(FieldMemoryUsage._DESERIALIZER), "fields"); - - } + } + + public static FielddataStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code evictions} + */ + @Nullable + public final Long evictions() { + return this.evictions; + } + + /** + * API name: {@code memory_size} + */ + @Nullable + public final String memorySize() { + return this.memorySize; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final long memorySizeInBytes() { + return this.memorySizeInBytes; + } + + /** + * API name: {@code fields} + */ + public final Map fields() { + return this.fields; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.evictions != null) { + generator.writeKey("evictions"); + generator.write(this.evictions); + + } + if (this.memorySize != null) { + generator.writeKey("memory_size"); + generator.write(this.memorySize); + + } + generator.writeKey("memory_size_in_bytes"); + generator.write(this.memorySizeInBytes); + + if (ApiTypeHelper.isDefined(this.fields)) { + generator.writeKey("fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.fields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FielddataStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private Long evictions; + + @Nullable + private String memorySize; + + private Long memorySizeInBytes; + + @Nullable + private Map fields; + + /** + * API name: {@code evictions} + */ + public final Builder evictions(@Nullable Long value) { + this.evictions = value; + return this; + } + + /** + * API name: {@code memory_size} + */ + public final Builder memorySize(@Nullable String value) { + this.memorySize = value; + return this; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final Builder memorySizeInBytes(long value) { + this.memorySizeInBytes = value; + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds all entries of map to fields. + */ + public final Builder fields(Map map) { + this.fields = _mapPutAll(this.fields, map); + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds an entry to fields. + */ + public final Builder fields(String key, FieldMemoryUsage value) { + this.fields = _mapPut(this.fields, key, value); + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds an entry to fields using a builder lambda. + */ + public final Builder fields(String key, Function> fn) { + return fields(key, fn.apply(new FieldMemoryUsage.Builder()).build()); + } + + /** + * Builds a {@link FielddataStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FielddataStats build() { + _checkSingleUse(); + + return new FielddataStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FielddataStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + FielddataStats::setupFielddataStatsDeserializer + ); + + protected static void setupFielddataStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::evictions, JsonpDeserializer.longDeserializer(), "evictions"); + op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); + op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes"); + op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(FieldMemoryUsage._DESERIALIZER), "fields"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java index 2747d47c4d..709cc8f81e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/FlushStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,170 +44,169 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.FlushStats @JsonpDeserializable public class FlushStats implements JsonpSerializable { - private final long periodic; + private final long periodic; - private final long total; + private final long total; - @Nullable - private final String totalTime; + @Nullable + private final String totalTime; - private final long totalTimeInMillis; + private final long totalTimeInMillis; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private FlushStats(Builder builder) { + private FlushStats(Builder builder) { - this.periodic = ApiTypeHelper.requireNonNull(builder.periodic, this, "periodic"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - this.totalTime = builder.totalTime; - this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); - - } - - public static FlushStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code periodic} - */ - public final long periodic() { - return this.periodic; - } - - /** - * Required - API name: {@code total} - */ - public final long total() { - return this.total; - } - - /** - * API name: {@code total_time} - */ - @Nullable - public final String totalTime() { - return this.totalTime; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final long totalTimeInMillis() { - return this.totalTimeInMillis; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("periodic"); - generator.write(this.periodic); - - generator.writeKey("total"); - generator.write(this.total); - - if (this.totalTime != null) { - generator.writeKey("total_time"); - generator.write(this.totalTime); - - } - generator.writeKey("total_time_in_millis"); - generator.write(this.totalTimeInMillis); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FlushStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long periodic; - - private Long total; - - @Nullable - private String totalTime; - - private Long totalTimeInMillis; - - /** - * Required - API name: {@code periodic} - */ - public final Builder periodic(long value) { - this.periodic = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(long value) { - this.total = value; - return this; - } - - /** - * API name: {@code total_time} - */ - public final Builder totalTime(@Nullable String value) { - this.totalTime = value; - return this; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final Builder totalTimeInMillis(long value) { - this.totalTimeInMillis = value; - return this; - } - - /** - * Builds a {@link FlushStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FlushStats build() { - _checkSingleUse(); - - return new FlushStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FlushStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FlushStats::setupFlushStatsDeserializer); - - protected static void setupFlushStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::periodic, JsonpDeserializer.longDeserializer(), "periodic"); - op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); - op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); - op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); - - } + this.periodic = ApiTypeHelper.requireNonNull(builder.periodic, this, "periodic"); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.totalTime = builder.totalTime; + this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); + + } + + public static FlushStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code periodic} + */ + public final long periodic() { + return this.periodic; + } + + /** + * Required - API name: {@code total} + */ + public final long total() { + return this.total; + } + + /** + * API name: {@code total_time} + */ + @Nullable + public final String totalTime() { + return this.totalTime; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final long totalTimeInMillis() { + return this.totalTimeInMillis; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("periodic"); + generator.write(this.periodic); + + generator.writeKey("total"); + generator.write(this.total); + + if (this.totalTime != null) { + generator.writeKey("total_time"); + generator.write(this.totalTime); + + } + generator.writeKey("total_time_in_millis"); + generator.write(this.totalTimeInMillis); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FlushStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long periodic; + + private Long total; + + @Nullable + private String totalTime; + + private Long totalTimeInMillis; + + /** + * Required - API name: {@code periodic} + */ + public final Builder periodic(long value) { + this.periodic = value; + return this; + } + + /** + * Required - API name: {@code total} + */ + public final Builder total(long value) { + this.total = value; + return this; + } + + /** + * API name: {@code total_time} + */ + public final Builder totalTime(@Nullable String value) { + this.totalTime = value; + return this; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final Builder totalTimeInMillis(long value) { + this.totalTimeInMillis = value; + return this; + } + + /** + * Builds a {@link FlushStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FlushStats build() { + _checkSingleUse(); + + return new FlushStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FlushStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + FlushStats::setupFlushStatsDeserializer + ); + + protected static void setupFlushStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::periodic, JsonpDeserializer.longDeserializer(), "periodic"); + op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); + op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); + op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java index 7be1836e37..56f23b35d9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -42,8 +44,6 @@ import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.GeoBounds @@ -60,177 +60,180 @@ @JsonpDeserializable public class GeoBounds implements TaggedUnion, JsonpSerializable { - public enum Kind { - Coords, Tlbr, Trbl, Wkt - - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - private GeoBounds(Kind kind, Object value) { - this._kind = kind; - this._value = value; - } - - private GeoBounds(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static GeoBounds of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code coords}? - */ - public boolean isCoords() { - return _kind == Kind.Coords; - } - - /** - * Get the {@code coords} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code coords} kind. - */ - public CoordsGeoBounds coords() { - return TaggedUnionUtils.get(this, Kind.Coords); - } - - /** - * Is this variant instance of kind {@code tlbr}? - */ - public boolean isTlbr() { - return _kind == Kind.Tlbr; - } - - /** - * Get the {@code tlbr} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code tlbr} kind. - */ - public TopLeftBottomRightGeoBounds tlbr() { - return TaggedUnionUtils.get(this, Kind.Tlbr); - } - - /** - * Is this variant instance of kind {@code trbl}? - */ - public boolean isTrbl() { - return _kind == Kind.Trbl; - } - - /** - * Get the {@code trbl} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code trbl} kind. - */ - public TopRightBottomLeftGeoBounds trbl() { - return TaggedUnionUtils.get(this, Kind.Trbl); - } - - /** - * Is this variant instance of kind {@code wkt}? - */ - public boolean isWkt() { - return _kind == Kind.Wkt; - } - - /** - * Get the {@code wkt} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code wkt} kind. - */ - public WktGeoBounds wkt() { - return TaggedUnionUtils.get(this, Kind.Wkt); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } - - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - - public ObjectBuilder coords(CoordsGeoBounds v) { - this._kind = Kind.Coords; - this._value = v; - return this; - } - - public ObjectBuilder coords(Function> fn) { - return this.coords(fn.apply(new CoordsGeoBounds.Builder()).build()); - } - - public ObjectBuilder tlbr(TopLeftBottomRightGeoBounds v) { - this._kind = Kind.Tlbr; - this._value = v; - return this; - } - - public ObjectBuilder tlbr( - Function> fn) { - return this.tlbr(fn.apply(new TopLeftBottomRightGeoBounds.Builder()).build()); - } - - public ObjectBuilder trbl(TopRightBottomLeftGeoBounds v) { - this._kind = Kind.Trbl; - this._value = v; - return this; - } - - public ObjectBuilder trbl( - Function> fn) { - return this.trbl(fn.apply(new TopRightBottomLeftGeoBounds.Builder()).build()); - } - - public ObjectBuilder wkt(WktGeoBounds v) { - this._kind = Kind.Wkt; - this._value = v; - return this; - } - - public ObjectBuilder wkt(Function> fn) { - return this.wkt(fn.apply(new WktGeoBounds.Builder()).build()); - } - - public GeoBounds build() { - _checkSingleUse(); - return new GeoBounds(this); - } - - } - - private static JsonpDeserializer buildGeoBoundsDeserializer() { - return new UnionDeserializer.Builder(GeoBounds::new, false) - .addMember(Kind.Coords, CoordsGeoBounds._DESERIALIZER) - .addMember(Kind.Tlbr, TopLeftBottomRightGeoBounds._DESERIALIZER) - .addMember(Kind.Trbl, TopRightBottomLeftGeoBounds._DESERIALIZER) - .addMember(Kind.Wkt, WktGeoBounds._DESERIALIZER).build(); - } - - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .lazy(GeoBounds::buildGeoBoundsDeserializer); + public enum Kind { + Coords, + Tlbr, + Trbl, + Wkt + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + private GeoBounds(Kind kind, Object value) { + this._kind = kind; + this._value = value; + } + + private GeoBounds(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static GeoBounds of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code coords}? + */ + public boolean isCoords() { + return _kind == Kind.Coords; + } + + /** + * Get the {@code coords} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code coords} kind. + */ + public CoordsGeoBounds coords() { + return TaggedUnionUtils.get(this, Kind.Coords); + } + + /** + * Is this variant instance of kind {@code tlbr}? + */ + public boolean isTlbr() { + return _kind == Kind.Tlbr; + } + + /** + * Get the {@code tlbr} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code tlbr} kind. + */ + public TopLeftBottomRightGeoBounds tlbr() { + return TaggedUnionUtils.get(this, Kind.Tlbr); + } + + /** + * Is this variant instance of kind {@code trbl}? + */ + public boolean isTrbl() { + return _kind == Kind.Trbl; + } + + /** + * Get the {@code trbl} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code trbl} kind. + */ + public TopRightBottomLeftGeoBounds trbl() { + return TaggedUnionUtils.get(this, Kind.Trbl); + } + + /** + * Is this variant instance of kind {@code wkt}? + */ + public boolean isWkt() { + return _kind == Kind.Wkt; + } + + /** + * Get the {@code wkt} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code wkt} kind. + */ + public WktGeoBounds wkt() { + return TaggedUnionUtils.get(this, Kind.Wkt); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } + + } + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + public ObjectBuilder coords(CoordsGeoBounds v) { + this._kind = Kind.Coords; + this._value = v; + return this; + } + + public ObjectBuilder coords(Function> fn) { + return this.coords(fn.apply(new CoordsGeoBounds.Builder()).build()); + } + + public ObjectBuilder tlbr(TopLeftBottomRightGeoBounds v) { + this._kind = Kind.Tlbr; + this._value = v; + return this; + } + + public ObjectBuilder tlbr(Function> fn) { + return this.tlbr(fn.apply(new TopLeftBottomRightGeoBounds.Builder()).build()); + } + + public ObjectBuilder trbl(TopRightBottomLeftGeoBounds v) { + this._kind = Kind.Trbl; + this._value = v; + return this; + } + + public ObjectBuilder trbl(Function> fn) { + return this.trbl(fn.apply(new TopRightBottomLeftGeoBounds.Builder()).build()); + } + + public ObjectBuilder wkt(WktGeoBounds v) { + this._kind = Kind.Wkt; + this._value = v; + return this; + } + + public ObjectBuilder wkt(Function> fn) { + return this.wkt(fn.apply(new WktGeoBounds.Builder()).build()); + } + + public GeoBounds build() { + _checkSingleUse(); + return new GeoBounds(this); + } + + } + + private static JsonpDeserializer buildGeoBoundsDeserializer() { + return new UnionDeserializer.Builder(GeoBounds::new, false).addMember( + Kind.Coords, + CoordsGeoBounds._DESERIALIZER + ) + .addMember(Kind.Tlbr, TopLeftBottomRightGeoBounds._DESERIALIZER) + .addMember(Kind.Trbl, TopRightBottomLeftGeoBounds._DESERIALIZER) + .addMember(Kind.Wkt, WktGeoBounds._DESERIALIZER) + .build(); + } + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.lazy(GeoBounds::buildGeoBoundsDeserializer); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java index 5c8c63f16c..614522f557 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java @@ -36,38 +36,37 @@ * Builders for {@link GeoBounds} variants. */ public class GeoBoundsBuilders { - private GeoBoundsBuilders() { - } + private GeoBoundsBuilders() {} - /** - * Creates a builder for the {@link CoordsGeoBounds coords} {@code GeoBounds} - * variant. - */ - public static CoordsGeoBounds.Builder coords() { - return new CoordsGeoBounds.Builder(); - } + /** + * Creates a builder for the {@link CoordsGeoBounds coords} {@code GeoBounds} + * variant. + */ + public static CoordsGeoBounds.Builder coords() { + return new CoordsGeoBounds.Builder(); + } - /** - * Creates a builder for the {@link TopLeftBottomRightGeoBounds tlbr} - * {@code GeoBounds} variant. - */ - public static TopLeftBottomRightGeoBounds.Builder tlbr() { - return new TopLeftBottomRightGeoBounds.Builder(); - } + /** + * Creates a builder for the {@link TopLeftBottomRightGeoBounds tlbr} + * {@code GeoBounds} variant. + */ + public static TopLeftBottomRightGeoBounds.Builder tlbr() { + return new TopLeftBottomRightGeoBounds.Builder(); + } - /** - * Creates a builder for the {@link TopRightBottomLeftGeoBounds trbl} - * {@code GeoBounds} variant. - */ - public static TopRightBottomLeftGeoBounds.Builder trbl() { - return new TopRightBottomLeftGeoBounds.Builder(); - } + /** + * Creates a builder for the {@link TopRightBottomLeftGeoBounds trbl} + * {@code GeoBounds} variant. + */ + public static TopRightBottomLeftGeoBounds.Builder trbl() { + return new TopRightBottomLeftGeoBounds.Builder(); + } - /** - * Creates a builder for the {@link WktGeoBounds wkt} {@code GeoBounds} variant. - */ - public static WktGeoBounds.Builder wkt() { - return new WktGeoBounds.Builder(); - } + /** + * Creates a builder for the {@link WktGeoBounds wkt} {@code GeoBounds} variant. + */ + public static WktGeoBounds.Builder wkt() { + return new WktGeoBounds.Builder(); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java index c08ae130a6..6aaa338fb3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceSort.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,289 +45,286 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.GeoDistanceSort @JsonpDeserializable public class GeoDistanceSort implements SortOptionsVariant, JsonpSerializable { - private final String field; - - private final List location; - - @Nullable - private final SortMode mode; - - @Nullable - private final GeoDistanceType distanceType; - - @Nullable - private final Boolean ignoreUnmapped; - - @Nullable - private final SortOrder order; - - @Nullable - private final DistanceUnit unit; - - // --------------------------------------------------------------------------------------------- - - private GeoDistanceSort(Builder builder) { - - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - this.location = ApiTypeHelper.unmodifiableRequired(builder.location, this, "location"); - - this.mode = builder.mode; - this.distanceType = builder.distanceType; - this.ignoreUnmapped = builder.ignoreUnmapped; - this.order = builder.order; - this.unit = builder.unit; - - } - - public static GeoDistanceSort of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * SortOptions variant kind. - */ - @Override - public SortOptions.Kind _sortOptionsKind() { - return SortOptions.Kind.GeoDistance; - } - - /** - * Required - - */ - public final String field() { - return this.field; - } - - /** - * Required - - */ - public final List location() { - return this.location; - } - - /** - * API name: {@code mode} - */ - @Nullable - public final SortMode mode() { - return this.mode; - } - - /** - * API name: {@code distance_type} - */ - @Nullable - public final GeoDistanceType distanceType() { - return this.distanceType; - } - - /** - * API name: {@code ignore_unmapped} - */ - @Nullable - public final Boolean ignoreUnmapped() { - return this.ignoreUnmapped; - } - - /** - * API name: {@code order} - */ - @Nullable - public final SortOrder order() { - return this.order; - } - - /** - * API name: {@code unit} - */ - @Nullable - public final DistanceUnit unit() { - return this.unit; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey(this.field); - generator.writeStartArray(); - for (GeoLocation item0 : this.location) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - if (this.mode != null) { - generator.writeKey("mode"); - this.mode.serialize(generator, mapper); - } - if (this.distanceType != null) { - generator.writeKey("distance_type"); - this.distanceType.serialize(generator, mapper); - } - if (this.ignoreUnmapped != null) { - generator.writeKey("ignore_unmapped"); - generator.write(this.ignoreUnmapped); - - } - if (this.order != null) { - generator.writeKey("order"); - this.order.serialize(generator, mapper); - } - if (this.unit != null) { - generator.writeKey("unit"); - this.unit.serialize(generator, mapper); - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link GeoDistanceSort}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String field; - - private List location; - - /** - * Required - - */ - public final Builder field(String value) { - this.field = value; - return this; - } - - /** - * Required - Adds all elements of list to location. - */ - public final Builder location(List list) { - this.location = _listAddAll(this.location, list); - return this; - } - - /** - * Required - Adds one or more values to location. - */ - public final Builder location(GeoLocation value, GeoLocation... values) { - this.location = _listAdd(this.location, value, values); - return this; - } - - /** - * Required - Adds a value to location using a builder lambda. - */ - public final Builder location(Function> fn) { - return location(fn.apply(new GeoLocation.Builder()).build()); - } - - @Nullable - private SortMode mode; - - @Nullable - private GeoDistanceType distanceType; - - @Nullable - private Boolean ignoreUnmapped; - - @Nullable - private SortOrder order; - - @Nullable - private DistanceUnit unit; - - /** - * API name: {@code mode} - */ - public final Builder mode(@Nullable SortMode value) { - this.mode = value; - return this; - } - - /** - * API name: {@code distance_type} - */ - public final Builder distanceType(@Nullable GeoDistanceType value) { - this.distanceType = value; - return this; - } - - /** - * API name: {@code ignore_unmapped} - */ - public final Builder ignoreUnmapped(@Nullable Boolean value) { - this.ignoreUnmapped = value; - return this; - } - - /** - * API name: {@code order} - */ - public final Builder order(@Nullable SortOrder value) { - this.order = value; - return this; - } - - /** - * API name: {@code unit} - */ - public final Builder unit(@Nullable DistanceUnit value) { - this.unit = value; - return this; - } - - /** - * Builds a {@link GeoDistanceSort}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GeoDistanceSort build() { - _checkSingleUse(); - - return new GeoDistanceSort(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link GeoDistanceSort} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - GeoDistanceSort::setupGeoDistanceSortDeserializer); - - protected static void setupGeoDistanceSortDeserializer(ObjectDeserializer op) { - - op.add(Builder::mode, SortMode._DESERIALIZER, "mode"); - op.add(Builder::distanceType, GeoDistanceType._DESERIALIZER, "distance_type"); - op.add(Builder::ignoreUnmapped, JsonpDeserializer.booleanDeserializer(), "ignore_unmapped"); - op.add(Builder::order, SortOrder._DESERIALIZER, "order"); - op.add(Builder::unit, DistanceUnit._DESERIALIZER, "unit"); - - op.setUnknownFieldHandler((builder, name, parser, mapper) -> { - builder.field(name); - builder.location( - JsonpDeserializer.arrayDeserializer(GeoLocation._DESERIALIZER).deserialize(parser, mapper)); - }); - - } + private final String field; + + private final List location; + + @Nullable + private final SortMode mode; + + @Nullable + private final GeoDistanceType distanceType; + + @Nullable + private final Boolean ignoreUnmapped; + + @Nullable + private final SortOrder order; + + @Nullable + private final DistanceUnit unit; + + // --------------------------------------------------------------------------------------------- + + private GeoDistanceSort(Builder builder) { + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.location = ApiTypeHelper.unmodifiableRequired(builder.location, this, "location"); + + this.mode = builder.mode; + this.distanceType = builder.distanceType; + this.ignoreUnmapped = builder.ignoreUnmapped; + this.order = builder.order; + this.unit = builder.unit; + + } + + public static GeoDistanceSort of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SortOptions variant kind. + */ + @Override + public SortOptions.Kind _sortOptionsKind() { + return SortOptions.Kind.GeoDistance; + } + + /** + * Required - + */ + public final String field() { + return this.field; + } + + /** + * Required - + */ + public final List location() { + return this.location; + } + + /** + * API name: {@code mode} + */ + @Nullable + public final SortMode mode() { + return this.mode; + } + + /** + * API name: {@code distance_type} + */ + @Nullable + public final GeoDistanceType distanceType() { + return this.distanceType; + } + + /** + * API name: {@code ignore_unmapped} + */ + @Nullable + public final Boolean ignoreUnmapped() { + return this.ignoreUnmapped; + } + + /** + * API name: {@code order} + */ + @Nullable + public final SortOrder order() { + return this.order; + } + + /** + * API name: {@code unit} + */ + @Nullable + public final DistanceUnit unit() { + return this.unit; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeKey(this.field); + generator.writeStartArray(); + for (GeoLocation item0 : this.location) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + if (this.mode != null) { + generator.writeKey("mode"); + this.mode.serialize(generator, mapper); + } + if (this.distanceType != null) { + generator.writeKey("distance_type"); + this.distanceType.serialize(generator, mapper); + } + if (this.ignoreUnmapped != null) { + generator.writeKey("ignore_unmapped"); + generator.write(this.ignoreUnmapped); + + } + if (this.order != null) { + generator.writeKey("order"); + this.order.serialize(generator, mapper); + } + if (this.unit != null) { + generator.writeKey("unit"); + this.unit.serialize(generator, mapper); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GeoDistanceSort}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String field; + + private List location; + + /** + * Required - + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - Adds all elements of list to location. + */ + public final Builder location(List list) { + this.location = _listAddAll(this.location, list); + return this; + } + + /** + * Required - Adds one or more values to location. + */ + public final Builder location(GeoLocation value, GeoLocation... values) { + this.location = _listAdd(this.location, value, values); + return this; + } + + /** + * Required - Adds a value to location using a builder lambda. + */ + public final Builder location(Function> fn) { + return location(fn.apply(new GeoLocation.Builder()).build()); + } + + @Nullable + private SortMode mode; + + @Nullable + private GeoDistanceType distanceType; + + @Nullable + private Boolean ignoreUnmapped; + + @Nullable + private SortOrder order; + + @Nullable + private DistanceUnit unit; + + /** + * API name: {@code mode} + */ + public final Builder mode(@Nullable SortMode value) { + this.mode = value; + return this; + } + + /** + * API name: {@code distance_type} + */ + public final Builder distanceType(@Nullable GeoDistanceType value) { + this.distanceType = value; + return this; + } + + /** + * API name: {@code ignore_unmapped} + */ + public final Builder ignoreUnmapped(@Nullable Boolean value) { + this.ignoreUnmapped = value; + return this; + } + + /** + * API name: {@code order} + */ + public final Builder order(@Nullable SortOrder value) { + this.order = value; + return this; + } + + /** + * API name: {@code unit} + */ + public final Builder unit(@Nullable DistanceUnit value) { + this.unit = value; + return this; + } + + /** + * Builds a {@link GeoDistanceSort}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GeoDistanceSort build() { + _checkSingleUse(); + + return new GeoDistanceSort(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GeoDistanceSort} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + GeoDistanceSort::setupGeoDistanceSortDeserializer + ); + + protected static void setupGeoDistanceSortDeserializer(ObjectDeserializer op) { + + op.add(Builder::mode, SortMode._DESERIALIZER, "mode"); + op.add(Builder::distanceType, GeoDistanceType._DESERIALIZER, "distance_type"); + op.add(Builder::ignoreUnmapped, JsonpDeserializer.booleanDeserializer(), "ignore_unmapped"); + op.add(Builder::order, SortOrder._DESERIALIZER, "order"); + op.add(Builder::unit, DistanceUnit._DESERIALIZER, "unit"); + + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + builder.field(name); + builder.location(JsonpDeserializer.arrayDeserializer(GeoLocation._DESERIALIZER).deserialize(parser, mapper)); + }); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java index f9b0266251..ff616f352f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoDistanceType.java @@ -37,22 +37,21 @@ @JsonpDeserializable public enum GeoDistanceType implements JsonEnum { - Arc("arc"), + Arc("arc"), - Plane("plane"), + Plane("plane"), - ; + ; - private final String jsonValue; + private final String jsonValue; - GeoDistanceType(String jsonValue) { - this.jsonValue = jsonValue; - } + GeoDistanceType(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - GeoDistanceType.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(GeoDistanceType.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java index 47ba815a26..ddb345f60d 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashLocation.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,92 +43,92 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.GeoHashLocation @JsonpDeserializable public class GeoHashLocation implements JsonpSerializable { - private final String geohash; + private final String geohash; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private GeoHashLocation(Builder builder) { + private GeoHashLocation(Builder builder) { - this.geohash = ApiTypeHelper.requireNonNull(builder.geohash, this, "geohash"); + this.geohash = ApiTypeHelper.requireNonNull(builder.geohash, this, "geohash"); - } + } - public static GeoHashLocation of(Function> fn) { - return fn.apply(new Builder()).build(); - } + public static GeoHashLocation of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code geohash} - */ - public final String geohash() { - return this.geohash; - } + /** + * Required - API name: {@code geohash} + */ + public final String geohash() { + return this.geohash; + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("geohash"); - generator.write(this.geohash); + generator.writeKey("geohash"); + generator.write(this.geohash); - } + } - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - /** - * Builder for {@link GeoHashLocation}. - */ + /** + * Builder for {@link GeoHashLocation}. + */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String geohash; + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String geohash; - /** - * Required - API name: {@code geohash} - */ - public final Builder geohash(String value) { - this.geohash = value; - return this; - } + /** + * Required - API name: {@code geohash} + */ + public final Builder geohash(String value) { + this.geohash = value; + return this; + } - /** - * Builds a {@link GeoHashLocation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GeoHashLocation build() { - _checkSingleUse(); + /** + * Builds a {@link GeoHashLocation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GeoHashLocation build() { + _checkSingleUse(); - return new GeoHashLocation(this); - } - } + return new GeoHashLocation(this); + } + } - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - /** - * Json deserializer for {@link GeoHashLocation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - GeoHashLocation::setupGeoHashLocationDeserializer); + /** + * Json deserializer for {@link GeoHashLocation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + GeoHashLocation::setupGeoHashLocationDeserializer + ); - protected static void setupGeoHashLocationDeserializer(ObjectDeserializer op) { + protected static void setupGeoHashLocationDeserializer(ObjectDeserializer op) { - op.add(Builder::geohash, JsonpDeserializer.stringDeserializer(), "geohash"); + op.add(Builder::geohash, JsonpDeserializer.stringDeserializer(), "geohash"); - } + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java index 9ab1939d53..0b25072c7e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecision.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -42,147 +44,148 @@ import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.GeoHashPrecision /** * A precision that can be expressed as a geohash length between 1 and 12, or a * distance measure like "1km", "10m". - * + * */ @JsonpDeserializable public class GeoHashPrecision implements TaggedUnion, JsonpSerializable { - public enum Kind { - GeohashLength, Distance - - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - private GeoHashPrecision(Kind kind, Object value) { - this._kind = kind; - this._value = value; - } - - public String _toJsonString() { - switch (_kind) { - case GeohashLength : - return this.geohashLength().toString(); - case Distance : - return this.distance(); - - default : - throw new IllegalStateException("Unknown kind " + _kind); - } - } - - private GeoHashPrecision(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static GeoHashPrecision of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code geohash_length}? - */ - public boolean isGeohashLength() { - return _kind == Kind.GeohashLength; - } - - /** - * Get the {@code geohash_length} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code geohash_length} kind. - */ - public Number geohashLength() { - return TaggedUnionUtils.get(this, Kind.GeohashLength); - } - - /** - * Is this variant instance of kind {@code distance}? - */ - public boolean isDistance() { - return _kind == Kind.Distance; - } - - /** - * Get the {@code distance} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code distance} kind. - */ - public String distance() { - return TaggedUnionUtils.get(this, Kind.Distance); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } else { - switch (_kind) { - case GeohashLength : - generator.write(((Number) this._value).doubleValue()); - - break; - case Distance : - generator.write(((String) this._value)); - - break; - } - } - - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - - public ObjectBuilder geohashLength(Number v) { - this._kind = Kind.GeohashLength; - this._value = v; - return this; - } - - public ObjectBuilder distance(String v) { - this._kind = Kind.Distance; - this._value = v; - return this; - } - - public GeoHashPrecision build() { - _checkSingleUse(); - return new GeoHashPrecision(this); - } - - } - - private static JsonpDeserializer buildGeoHashPrecisionDeserializer() { - return new UnionDeserializer.Builder(GeoHashPrecision::new, false) - .addMember(Kind.GeohashLength, JsonpDeserializer.numberDeserializer()) - .addMember(Kind.Distance, JsonpDeserializer.stringDeserializer()).build(); - } - - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .lazy(GeoHashPrecision::buildGeoHashPrecisionDeserializer); + public enum Kind { + GeohashLength, + Distance + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + private GeoHashPrecision(Kind kind, Object value) { + this._kind = kind; + this._value = value; + } + + public String _toJsonString() { + switch (_kind) { + case GeohashLength: + return this.geohashLength().toString(); + case Distance: + return this.distance(); + + default: + throw new IllegalStateException("Unknown kind " + _kind); + } + } + + private GeoHashPrecision(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static GeoHashPrecision of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code geohash_length}? + */ + public boolean isGeohashLength() { + return _kind == Kind.GeohashLength; + } + + /** + * Get the {@code geohash_length} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code geohash_length} kind. + */ + public Number geohashLength() { + return TaggedUnionUtils.get(this, Kind.GeohashLength); + } + + /** + * Is this variant instance of kind {@code distance}? + */ + public boolean isDistance() { + return _kind == Kind.Distance; + } + + /** + * Get the {@code distance} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code distance} kind. + */ + public String distance() { + return TaggedUnionUtils.get(this, Kind.Distance); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } else { + switch (_kind) { + case GeohashLength: + generator.write(((Number) this._value).doubleValue()); + + break; + case Distance: + generator.write(((String) this._value)); + + break; + } + } + + } + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + public ObjectBuilder geohashLength(Number v) { + this._kind = Kind.GeohashLength; + this._value = v; + return this; + } + + public ObjectBuilder distance(String v) { + this._kind = Kind.Distance; + this._value = v; + return this; + } + + public GeoHashPrecision build() { + _checkSingleUse(); + return new GeoHashPrecision(this); + } + + } + + private static JsonpDeserializer buildGeoHashPrecisionDeserializer() { + return new UnionDeserializer.Builder(GeoHashPrecision::new, false).addMember( + Kind.GeohashLength, + JsonpDeserializer.numberDeserializer() + ).addMember(Kind.Distance, JsonpDeserializer.stringDeserializer()).build(); + } + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.lazy( + GeoHashPrecision::buildGeoHashPrecisionDeserializer + ); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java index 1a635a467c..be883f856f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoHashPrecisionBuilders.java @@ -38,10 +38,9 @@ * Variants geohash_length, distance are not available * here as they don't have a dedicated class. Use {@link GeoHashPrecision}'s * builder for these. - * + * */ public class GeoHashPrecisionBuilders { - private GeoHashPrecisionBuilders() { - } + private GeoHashPrecisionBuilders() {} } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java index 872218cbf2..0b21c874f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLine.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,159 +44,161 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; // typedef: _types.GeoLine /** * A GeoJson GeoLine. - * + * */ @JsonpDeserializable public class GeoLine implements JsonpSerializable { - private final String type; - - private final List> coordinates; - - // --------------------------------------------------------------------------------------------- - - private GeoLine(Builder builder) { - - this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - this.coordinates = ApiTypeHelper.unmodifiableRequired(builder.coordinates, this, "coordinates"); - - } - - public static GeoLine of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - Always "LineString" - *

- * API name: {@code type} - */ - public final String type() { - return this.type; - } - - /** - * Required - Array of [lon, lat] coordinates - *

- * API name: {@code coordinates} - */ - public final List> coordinates() { - return this.coordinates; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("type"); - generator.write(this.type); - - if (ApiTypeHelper.isDefined(this.coordinates)) { - generator.writeKey("coordinates"); - generator.writeStartArray(); - for (List item0 : this.coordinates) { - generator.writeStartArray(); - if (item0 != null) { - for (Double item1 : item0) { - generator.write(item1); - - } - } - generator.writeEnd(); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link GeoLine}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String type; - - private List> coordinates; - - /** - * Required - Always "LineString" - *

- * API name: {@code type} - */ - public final Builder type(String value) { - this.type = value; - return this; - } - - /** - * Required - Array of [lon, lat] coordinates - *

- * API name: {@code coordinates} - *

- * Adds all elements of list to coordinates. - */ - public final Builder coordinates(List> list) { - this.coordinates = _listAddAll(this.coordinates, list); - return this; - } - - /** - * Required - Array of [lon, lat] coordinates - *

- * API name: {@code coordinates} - *

- * Adds one or more values to coordinates. - */ - public final Builder coordinates(List value, List... values) { - this.coordinates = _listAdd(this.coordinates, value, values); - return this; - } - - /** - * Builds a {@link GeoLine}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GeoLine build() { - _checkSingleUse(); - - return new GeoLine(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link GeoLine} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - GeoLine::setupGeoLineDeserializer); - - protected static void setupGeoLineDeserializer(ObjectDeserializer op) { - - op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); - op.add(Builder::coordinates, JsonpDeserializer.arrayDeserializer( - JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer())), "coordinates"); - - } + private final String type; + + private final List> coordinates; + + // --------------------------------------------------------------------------------------------- + + private GeoLine(Builder builder) { + + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.coordinates = ApiTypeHelper.unmodifiableRequired(builder.coordinates, this, "coordinates"); + + } + + public static GeoLine of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Always "LineString" + *

+ * API name: {@code type} + */ + public final String type() { + return this.type; + } + + /** + * Required - Array of [lon, lat] coordinates + *

+ * API name: {@code coordinates} + */ + public final List> coordinates() { + return this.coordinates; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("type"); + generator.write(this.type); + + if (ApiTypeHelper.isDefined(this.coordinates)) { + generator.writeKey("coordinates"); + generator.writeStartArray(); + for (List item0 : this.coordinates) { + generator.writeStartArray(); + if (item0 != null) { + for (Double item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GeoLine}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String type; + + private List> coordinates; + + /** + * Required - Always "LineString" + *

+ * API name: {@code type} + */ + public final Builder type(String value) { + this.type = value; + return this; + } + + /** + * Required - Array of [lon, lat] coordinates + *

+ * API name: {@code coordinates} + *

+ * Adds all elements of list to coordinates. + */ + public final Builder coordinates(List> list) { + this.coordinates = _listAddAll(this.coordinates, list); + return this; + } + + /** + * Required - Array of [lon, lat] coordinates + *

+ * API name: {@code coordinates} + *

+ * Adds one or more values to coordinates. + */ + public final Builder coordinates(List value, List... values) { + this.coordinates = _listAdd(this.coordinates, value, values); + return this; + } + + /** + * Builds a {@link GeoLine}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GeoLine build() { + _checkSingleUse(); + + return new GeoLine(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GeoLine} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + GeoLine::setupGeoLineDeserializer + ); + + protected static void setupGeoLineDeserializer(ObjectDeserializer op) { + + op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); + op.add( + Builder::coordinates, + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer())), + "coordinates" + ); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java index 41a8a107a0..f04f86d802 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocation.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -42,9 +45,6 @@ import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; // typedef: _types.GeoLocation @@ -63,185 +63,188 @@ @JsonpDeserializable public class GeoLocation implements TaggedUnion, JsonpSerializable { - public enum Kind { - Coords, Geohash, Latlon, Text - - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - private GeoLocation(Kind kind, Object value) { - this._kind = kind; - this._value = value; - } - - private GeoLocation(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static GeoLocation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code coords}? - */ - public boolean isCoords() { - return _kind == Kind.Coords; - } - - /** - * Get the {@code coords} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code coords} kind. - */ - public List coords() { - return TaggedUnionUtils.get(this, Kind.Coords); - } - - /** - * Is this variant instance of kind {@code geohash}? - */ - public boolean isGeohash() { - return _kind == Kind.Geohash; - } - - /** - * Get the {@code geohash} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code geohash} kind. - */ - public GeoHashLocation geohash() { - return TaggedUnionUtils.get(this, Kind.Geohash); - } - - /** - * Is this variant instance of kind {@code latlon}? - */ - public boolean isLatlon() { - return _kind == Kind.Latlon; - } - - /** - * Get the {@code latlon} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code latlon} kind. - */ - public LatLonGeoLocation latlon() { - return TaggedUnionUtils.get(this, Kind.Latlon); - } - - /** - * Is this variant instance of kind {@code text}? - */ - public boolean isText() { - return _kind == Kind.Text; - } - - /** - * Get the {@code text} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code text} kind. - */ - public String text() { - return TaggedUnionUtils.get(this, Kind.Text); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } else { - switch (_kind) { - case Coords : - generator.writeStartArray(); - for (Double item0 : ((List) this._value)) { - generator.write(item0); - - } - generator.writeEnd(); - - break; - case Text : - generator.write(((String) this._value)); - - break; - } - } - - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - - public ObjectBuilder coords(List v) { - this._kind = Kind.Coords; - this._value = v; - return this; - } - - public ObjectBuilder geohash(GeoHashLocation v) { - this._kind = Kind.Geohash; - this._value = v; - return this; - } - - public ObjectBuilder geohash( - Function> fn) { - return this.geohash(fn.apply(new GeoHashLocation.Builder()).build()); - } - - public ObjectBuilder latlon(LatLonGeoLocation v) { - this._kind = Kind.Latlon; - this._value = v; - return this; - } - - public ObjectBuilder latlon( - Function> fn) { - return this.latlon(fn.apply(new LatLonGeoLocation.Builder()).build()); - } - - public ObjectBuilder text(String v) { - this._kind = Kind.Text; - this._value = v; - return this; - } - - public GeoLocation build() { - _checkSingleUse(); - return new GeoLocation(this); - } - - } - - private static JsonpDeserializer buildGeoLocationDeserializer() { - return new UnionDeserializer.Builder(GeoLocation::new, false) - .addMember(Kind.Coords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer())) - .addMember(Kind.Geohash, GeoHashLocation._DESERIALIZER) - .addMember(Kind.Latlon, LatLonGeoLocation._DESERIALIZER) - .addMember(Kind.Text, JsonpDeserializer.stringDeserializer()).build(); - } - - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .lazy(GeoLocation::buildGeoLocationDeserializer); + public enum Kind { + Coords, + Geohash, + Latlon, + Text + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + private GeoLocation(Kind kind, Object value) { + this._kind = kind; + this._value = value; + } + + private GeoLocation(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static GeoLocation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code coords}? + */ + public boolean isCoords() { + return _kind == Kind.Coords; + } + + /** + * Get the {@code coords} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code coords} kind. + */ + public List coords() { + return TaggedUnionUtils.get(this, Kind.Coords); + } + + /** + * Is this variant instance of kind {@code geohash}? + */ + public boolean isGeohash() { + return _kind == Kind.Geohash; + } + + /** + * Get the {@code geohash} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code geohash} kind. + */ + public GeoHashLocation geohash() { + return TaggedUnionUtils.get(this, Kind.Geohash); + } + + /** + * Is this variant instance of kind {@code latlon}? + */ + public boolean isLatlon() { + return _kind == Kind.Latlon; + } + + /** + * Get the {@code latlon} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code latlon} kind. + */ + public LatLonGeoLocation latlon() { + return TaggedUnionUtils.get(this, Kind.Latlon); + } + + /** + * Is this variant instance of kind {@code text}? + */ + public boolean isText() { + return _kind == Kind.Text; + } + + /** + * Get the {@code text} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code text} kind. + */ + public String text() { + return TaggedUnionUtils.get(this, Kind.Text); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } else { + switch (_kind) { + case Coords: + generator.writeStartArray(); + for (Double item0 : ((List) this._value)) { + generator.write(item0); + + } + generator.writeEnd(); + + break; + case Text: + generator.write(((String) this._value)); + + break; + } + } + + } + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + public ObjectBuilder coords(List v) { + this._kind = Kind.Coords; + this._value = v; + return this; + } + + public ObjectBuilder geohash(GeoHashLocation v) { + this._kind = Kind.Geohash; + this._value = v; + return this; + } + + public ObjectBuilder geohash(Function> fn) { + return this.geohash(fn.apply(new GeoHashLocation.Builder()).build()); + } + + public ObjectBuilder latlon(LatLonGeoLocation v) { + this._kind = Kind.Latlon; + this._value = v; + return this; + } + + public ObjectBuilder latlon(Function> fn) { + return this.latlon(fn.apply(new LatLonGeoLocation.Builder()).build()); + } + + public ObjectBuilder text(String v) { + this._kind = Kind.Text; + this._value = v; + return this; + } + + public GeoLocation build() { + _checkSingleUse(); + return new GeoLocation(this); + } + + } + + private static JsonpDeserializer buildGeoLocationDeserializer() { + return new UnionDeserializer.Builder(GeoLocation::new, false).addMember( + Kind.Coords, + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer()) + ) + .addMember(Kind.Geohash, GeoHashLocation._DESERIALIZER) + .addMember(Kind.Latlon, LatLonGeoLocation._DESERIALIZER) + .addMember(Kind.Text, JsonpDeserializer.stringDeserializer()) + .build(); + } + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.lazy(GeoLocation::buildGeoLocationDeserializer); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java index 602c5f1ff8..7568ad87a6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoLocationBuilders.java @@ -38,26 +38,25 @@ * Variants coords, text are not available here as * they don't have a dedicated class. Use {@link GeoLocation}'s builder for * these. - * + * */ public class GeoLocationBuilders { - private GeoLocationBuilders() { - } + private GeoLocationBuilders() {} - /** - * Creates a builder for the {@link GeoHashLocation geohash} {@code GeoLocation} - * variant. - */ - public static GeoHashLocation.Builder geohash() { - return new GeoHashLocation.Builder(); - } + /** + * Creates a builder for the {@link GeoHashLocation geohash} {@code GeoLocation} + * variant. + */ + public static GeoHashLocation.Builder geohash() { + return new GeoHashLocation.Builder(); + } - /** - * Creates a builder for the {@link LatLonGeoLocation latlon} - * {@code GeoLocation} variant. - */ - public static LatLonGeoLocation.Builder latlon() { - return new LatLonGeoLocation.Builder(); - } + /** + * Creates a builder for the {@link LatLonGeoLocation latlon} + * {@code GeoLocation} variant. + */ + public static LatLonGeoLocation.Builder latlon() { + return new LatLonGeoLocation.Builder(); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java index 1098174b2b..f51d42a238 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoShapeRelation.java @@ -37,26 +37,25 @@ @JsonpDeserializable public enum GeoShapeRelation implements JsonEnum { - Intersects("intersects"), + Intersects("intersects"), - Disjoint("disjoint"), + Disjoint("disjoint"), - Within("within"), + Within("within"), - Contains("contains"), + Contains("contains"), - ; + ; - private final String jsonValue; + private final String jsonValue; - GeoShapeRelation(String jsonValue) { - this.jsonValue = jsonValue; - } + GeoShapeRelation(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - GeoShapeRelation.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(GeoShapeRelation.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java index 42f595cb30..4e53545c95 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/GetStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,325 +44,323 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.GetStats @JsonpDeserializable public class GetStats implements JsonpSerializable { - private final long current; - - @Nullable - private final String existsTime; - - private final long existsTimeInMillis; - - private final long existsTotal; - - @Nullable - private final String missingTime; - - private final long missingTimeInMillis; - - private final long missingTotal; - - @Nullable - private final String time; - - private final long timeInMillis; - - private final long total; - - // --------------------------------------------------------------------------------------------- - - private GetStats(Builder builder) { - - this.current = ApiTypeHelper.requireNonNull(builder.current, this, "current"); - this.existsTime = builder.existsTime; - this.existsTimeInMillis = ApiTypeHelper.requireNonNull(builder.existsTimeInMillis, this, "existsTimeInMillis"); - this.existsTotal = ApiTypeHelper.requireNonNull(builder.existsTotal, this, "existsTotal"); - this.missingTime = builder.missingTime; - this.missingTimeInMillis = ApiTypeHelper.requireNonNull(builder.missingTimeInMillis, this, - "missingTimeInMillis"); - this.missingTotal = ApiTypeHelper.requireNonNull(builder.missingTotal, this, "missingTotal"); - this.time = builder.time; - this.timeInMillis = ApiTypeHelper.requireNonNull(builder.timeInMillis, this, "timeInMillis"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - - } - - public static GetStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code current} - */ - public final long current() { - return this.current; - } - - /** - * API name: {@code exists_time} - */ - @Nullable - public final String existsTime() { - return this.existsTime; - } - - /** - * Required - API name: {@code exists_time_in_millis} - */ - public final long existsTimeInMillis() { - return this.existsTimeInMillis; - } - - /** - * Required - API name: {@code exists_total} - */ - public final long existsTotal() { - return this.existsTotal; - } - - /** - * API name: {@code missing_time} - */ - @Nullable - public final String missingTime() { - return this.missingTime; - } - - /** - * Required - API name: {@code missing_time_in_millis} - */ - public final long missingTimeInMillis() { - return this.missingTimeInMillis; - } - - /** - * Required - API name: {@code missing_total} - */ - public final long missingTotal() { - return this.missingTotal; - } + private final long current; + + @Nullable + private final String existsTime; + + private final long existsTimeInMillis; + + private final long existsTotal; + + @Nullable + private final String missingTime; + + private final long missingTimeInMillis; + + private final long missingTotal; + + @Nullable + private final String time; + + private final long timeInMillis; + + private final long total; + + // --------------------------------------------------------------------------------------------- + + private GetStats(Builder builder) { + + this.current = ApiTypeHelper.requireNonNull(builder.current, this, "current"); + this.existsTime = builder.existsTime; + this.existsTimeInMillis = ApiTypeHelper.requireNonNull(builder.existsTimeInMillis, this, "existsTimeInMillis"); + this.existsTotal = ApiTypeHelper.requireNonNull(builder.existsTotal, this, "existsTotal"); + this.missingTime = builder.missingTime; + this.missingTimeInMillis = ApiTypeHelper.requireNonNull(builder.missingTimeInMillis, this, "missingTimeInMillis"); + this.missingTotal = ApiTypeHelper.requireNonNull(builder.missingTotal, this, "missingTotal"); + this.time = builder.time; + this.timeInMillis = ApiTypeHelper.requireNonNull(builder.timeInMillis, this, "timeInMillis"); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + + } + + public static GetStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code current} + */ + public final long current() { + return this.current; + } + + /** + * API name: {@code exists_time} + */ + @Nullable + public final String existsTime() { + return this.existsTime; + } + + /** + * Required - API name: {@code exists_time_in_millis} + */ + public final long existsTimeInMillis() { + return this.existsTimeInMillis; + } + + /** + * Required - API name: {@code exists_total} + */ + public final long existsTotal() { + return this.existsTotal; + } + + /** + * API name: {@code missing_time} + */ + @Nullable + public final String missingTime() { + return this.missingTime; + } + + /** + * Required - API name: {@code missing_time_in_millis} + */ + public final long missingTimeInMillis() { + return this.missingTimeInMillis; + } + + /** + * Required - API name: {@code missing_total} + */ + public final long missingTotal() { + return this.missingTotal; + } - /** - * API name: {@code time} - */ - @Nullable - public final String time() { - return this.time; - } - - /** - * Required - API name: {@code time_in_millis} - */ - public final long timeInMillis() { - return this.timeInMillis; - } - - /** - * Required - API name: {@code total} - */ - public final long total() { - return this.total; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("current"); - generator.write(this.current); - - if (this.existsTime != null) { - generator.writeKey("exists_time"); - generator.write(this.existsTime); - - } - generator.writeKey("exists_time_in_millis"); - generator.write(this.existsTimeInMillis); - - generator.writeKey("exists_total"); - generator.write(this.existsTotal); - - if (this.missingTime != null) { - generator.writeKey("missing_time"); - generator.write(this.missingTime); - - } - generator.writeKey("missing_time_in_millis"); - generator.write(this.missingTimeInMillis); - - generator.writeKey("missing_total"); - generator.write(this.missingTotal); - - if (this.time != null) { - generator.writeKey("time"); - generator.write(this.time); - - } - generator.writeKey("time_in_millis"); - generator.write(this.timeInMillis); - - generator.writeKey("total"); - generator.write(this.total); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link GetStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long current; - - @Nullable - private String existsTime; - - private Long existsTimeInMillis; - - private Long existsTotal; - - @Nullable - private String missingTime; - - private Long missingTimeInMillis; - - private Long missingTotal; - - @Nullable - private String time; - - private Long timeInMillis; - - private Long total; - - /** - * Required - API name: {@code current} - */ - public final Builder current(long value) { - this.current = value; - return this; - } - - /** - * API name: {@code exists_time} - */ - public final Builder existsTime(@Nullable String value) { - this.existsTime = value; - return this; - } - - /** - * Required - API name: {@code exists_time_in_millis} - */ - public final Builder existsTimeInMillis(long value) { - this.existsTimeInMillis = value; - return this; - } - - /** - * Required - API name: {@code exists_total} - */ - public final Builder existsTotal(long value) { - this.existsTotal = value; - return this; - } - - /** - * API name: {@code missing_time} - */ - public final Builder missingTime(@Nullable String value) { - this.missingTime = value; - return this; - } - - /** - * Required - API name: {@code missing_time_in_millis} - */ - public final Builder missingTimeInMillis(long value) { - this.missingTimeInMillis = value; - return this; - } - - /** - * Required - API name: {@code missing_total} - */ - public final Builder missingTotal(long value) { - this.missingTotal = value; - return this; - } - - /** - * API name: {@code time} - */ - public final Builder time(@Nullable String value) { - this.time = value; - return this; - } - - /** - * Required - API name: {@code time_in_millis} - */ - public final Builder timeInMillis(long value) { - this.timeInMillis = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(long value) { - this.total = value; - return this; - } - - /** - * Builds a {@link GetStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GetStats build() { - _checkSingleUse(); - - return new GetStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link GetStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - GetStats::setupGetStatsDeserializer); - - protected static void setupGetStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::current, JsonpDeserializer.longDeserializer(), "current"); - op.add(Builder::existsTime, JsonpDeserializer.stringDeserializer(), "exists_time"); - op.add(Builder::existsTimeInMillis, JsonpDeserializer.longDeserializer(), "exists_time_in_millis"); - op.add(Builder::existsTotal, JsonpDeserializer.longDeserializer(), "exists_total"); - op.add(Builder::missingTime, JsonpDeserializer.stringDeserializer(), "missing_time"); - op.add(Builder::missingTimeInMillis, JsonpDeserializer.longDeserializer(), "missing_time_in_millis"); - op.add(Builder::missingTotal, JsonpDeserializer.longDeserializer(), "missing_total"); - op.add(Builder::time, JsonpDeserializer.stringDeserializer(), "time"); - op.add(Builder::timeInMillis, JsonpDeserializer.longDeserializer(), "time_in_millis"); - op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); - - } + /** + * API name: {@code time} + */ + @Nullable + public final String time() { + return this.time; + } + + /** + * Required - API name: {@code time_in_millis} + */ + public final long timeInMillis() { + return this.timeInMillis; + } + + /** + * Required - API name: {@code total} + */ + public final long total() { + return this.total; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("current"); + generator.write(this.current); + + if (this.existsTime != null) { + generator.writeKey("exists_time"); + generator.write(this.existsTime); + + } + generator.writeKey("exists_time_in_millis"); + generator.write(this.existsTimeInMillis); + + generator.writeKey("exists_total"); + generator.write(this.existsTotal); + + if (this.missingTime != null) { + generator.writeKey("missing_time"); + generator.write(this.missingTime); + + } + generator.writeKey("missing_time_in_millis"); + generator.write(this.missingTimeInMillis); + + generator.writeKey("missing_total"); + generator.write(this.missingTotal); + + if (this.time != null) { + generator.writeKey("time"); + generator.write(this.time); + + } + generator.writeKey("time_in_millis"); + generator.write(this.timeInMillis); + + generator.writeKey("total"); + generator.write(this.total); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long current; + + @Nullable + private String existsTime; + + private Long existsTimeInMillis; + + private Long existsTotal; + + @Nullable + private String missingTime; + + private Long missingTimeInMillis; + + private Long missingTotal; + + @Nullable + private String time; + + private Long timeInMillis; + + private Long total; + + /** + * Required - API name: {@code current} + */ + public final Builder current(long value) { + this.current = value; + return this; + } + + /** + * API name: {@code exists_time} + */ + public final Builder existsTime(@Nullable String value) { + this.existsTime = value; + return this; + } + + /** + * Required - API name: {@code exists_time_in_millis} + */ + public final Builder existsTimeInMillis(long value) { + this.existsTimeInMillis = value; + return this; + } + + /** + * Required - API name: {@code exists_total} + */ + public final Builder existsTotal(long value) { + this.existsTotal = value; + return this; + } + + /** + * API name: {@code missing_time} + */ + public final Builder missingTime(@Nullable String value) { + this.missingTime = value; + return this; + } + + /** + * Required - API name: {@code missing_time_in_millis} + */ + public final Builder missingTimeInMillis(long value) { + this.missingTimeInMillis = value; + return this; + } + + /** + * Required - API name: {@code missing_total} + */ + public final Builder missingTotal(long value) { + this.missingTotal = value; + return this; + } + + /** + * API name: {@code time} + */ + public final Builder time(@Nullable String value) { + this.time = value; + return this; + } + + /** + * Required - API name: {@code time_in_millis} + */ + public final Builder timeInMillis(long value) { + this.timeInMillis = value; + return this; + } + + /** + * Required - API name: {@code total} + */ + public final Builder total(long value) { + this.total = value; + return this; + } + + /** + * Builds a {@link GetStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetStats build() { + _checkSingleUse(); + + return new GetStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GetStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + GetStats::setupGetStatsDeserializer + ); + + protected static void setupGetStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::current, JsonpDeserializer.longDeserializer(), "current"); + op.add(Builder::existsTime, JsonpDeserializer.stringDeserializer(), "exists_time"); + op.add(Builder::existsTimeInMillis, JsonpDeserializer.longDeserializer(), "exists_time_in_millis"); + op.add(Builder::existsTotal, JsonpDeserializer.longDeserializer(), "exists_total"); + op.add(Builder::missingTime, JsonpDeserializer.stringDeserializer(), "missing_time"); + op.add(Builder::missingTimeInMillis, JsonpDeserializer.longDeserializer(), "missing_time_in_millis"); + op.add(Builder::missingTotal, JsonpDeserializer.longDeserializer(), "missing_total"); + op.add(Builder::time, JsonpDeserializer.stringDeserializer(), "time"); + op.add(Builder::timeInMillis, JsonpDeserializer.longDeserializer(), "time_in_millis"); + op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java index 371497cf65..09a9914a63 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/HealthStatus.java @@ -37,42 +37,41 @@ @JsonpDeserializable public enum HealthStatus implements JsonEnum { - /** - * All shards are assigned. - */ - Green("green", "GREEN"), + /** + * All shards are assigned. + */ + Green("green", "GREEN"), - /** - * All primary shards are assigned, but one or more replica shards are - * unassigned. If a node in the cluster fails, some data could be unavailable - * until that node is repaired. - */ - Yellow("yellow", "YELLOW"), + /** + * All primary shards are assigned, but one or more replica shards are + * unassigned. If a node in the cluster fails, some data could be unavailable + * until that node is repaired. + */ + Yellow("yellow", "YELLOW"), - /** - * One or more primary shards are unassigned, so some data is unavailable. This - * can occur briefly during cluster startup as primary shards are assigned. - */ - Red("red", "RED"), + /** + * One or more primary shards are unassigned, so some data is unavailable. This + * can occur briefly during cluster startup as primary shards are assigned. + */ + Red("red", "RED"), - ; + ; - private final String jsonValue; - private final String[] aliases; + private final String jsonValue; + private final String[] aliases; - HealthStatus(String jsonValue, String... aliases) { - this.jsonValue = jsonValue; - this.aliases = aliases; - } + HealthStatus(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public String[] aliases() { - return this.aliases; - } + public String[] aliases() { + return this.aliases; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - HealthStatus.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(HealthStatus.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java index 85dd47c932..9c81681f7a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndexingStats.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,453 +45,450 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.IndexingStats @JsonpDeserializable public class IndexingStats implements JsonpSerializable { - private final long indexCurrent; + private final long indexCurrent; - private final long deleteCurrent; - - @Nullable - private final String deleteTime; + private final long deleteCurrent; + + @Nullable + private final String deleteTime; - private final long deleteTimeInMillis; - - private final long deleteTotal; - - private final boolean isThrottled; - - private final long noopUpdateTotal; - - @Nullable - private final String throttleTime; - - private final long throttleTimeInMillis; - - @Nullable - private final String indexTime; - - private final long indexTimeInMillis; - - private final long indexTotal; - - private final long indexFailed; - - private final Map types; - - // --------------------------------------------------------------------------------------------- - - private IndexingStats(Builder builder) { - - this.indexCurrent = ApiTypeHelper.requireNonNull(builder.indexCurrent, this, "indexCurrent"); - this.deleteCurrent = ApiTypeHelper.requireNonNull(builder.deleteCurrent, this, "deleteCurrent"); - this.deleteTime = builder.deleteTime; - this.deleteTimeInMillis = ApiTypeHelper.requireNonNull(builder.deleteTimeInMillis, this, "deleteTimeInMillis"); - this.deleteTotal = ApiTypeHelper.requireNonNull(builder.deleteTotal, this, "deleteTotal"); - this.isThrottled = ApiTypeHelper.requireNonNull(builder.isThrottled, this, "isThrottled"); - this.noopUpdateTotal = ApiTypeHelper.requireNonNull(builder.noopUpdateTotal, this, "noopUpdateTotal"); - this.throttleTime = builder.throttleTime; - this.throttleTimeInMillis = ApiTypeHelper.requireNonNull(builder.throttleTimeInMillis, this, - "throttleTimeInMillis"); - this.indexTime = builder.indexTime; - this.indexTimeInMillis = ApiTypeHelper.requireNonNull(builder.indexTimeInMillis, this, "indexTimeInMillis"); - this.indexTotal = ApiTypeHelper.requireNonNull(builder.indexTotal, this, "indexTotal"); - this.indexFailed = ApiTypeHelper.requireNonNull(builder.indexFailed, this, "indexFailed"); - this.types = ApiTypeHelper.unmodifiable(builder.types); - - } - - public static IndexingStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code index_current} - */ - public final long indexCurrent() { - return this.indexCurrent; - } - - /** - * Required - API name: {@code delete_current} - */ - public final long deleteCurrent() { - return this.deleteCurrent; - } - - /** - * API name: {@code delete_time} - */ - @Nullable - public final String deleteTime() { - return this.deleteTime; - } - - /** - * Required - API name: {@code delete_time_in_millis} - */ - public final long deleteTimeInMillis() { - return this.deleteTimeInMillis; - } - - /** - * Required - API name: {@code delete_total} - */ - public final long deleteTotal() { - return this.deleteTotal; - } - - /** - * Required - API name: {@code is_throttled} - */ - public final boolean isThrottled() { - return this.isThrottled; - } - - /** - * Required - API name: {@code noop_update_total} - */ - public final long noopUpdateTotal() { - return this.noopUpdateTotal; - } - - /** - * API name: {@code throttle_time} - */ - @Nullable - public final String throttleTime() { - return this.throttleTime; - } - - /** - * Required - API name: {@code throttle_time_in_millis} - */ - public final long throttleTimeInMillis() { - return this.throttleTimeInMillis; - } - - /** - * API name: {@code index_time} - */ - @Nullable - public final String indexTime() { - return this.indexTime; - } - - /** - * Required - API name: {@code index_time_in_millis} - */ - public final long indexTimeInMillis() { - return this.indexTimeInMillis; - } - - /** - * Required - API name: {@code index_total} - */ - public final long indexTotal() { - return this.indexTotal; - } - - /** - * Required - API name: {@code index_failed} - */ - public final long indexFailed() { - return this.indexFailed; - } - - /** - * API name: {@code types} - */ - public final Map types() { - return this.types; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("index_current"); - generator.write(this.indexCurrent); - - generator.writeKey("delete_current"); - generator.write(this.deleteCurrent); - - if (this.deleteTime != null) { - generator.writeKey("delete_time"); - generator.write(this.deleteTime); - - } - generator.writeKey("delete_time_in_millis"); - generator.write(this.deleteTimeInMillis); - - generator.writeKey("delete_total"); - generator.write(this.deleteTotal); - - generator.writeKey("is_throttled"); - generator.write(this.isThrottled); - - generator.writeKey("noop_update_total"); - generator.write(this.noopUpdateTotal); - - if (this.throttleTime != null) { - generator.writeKey("throttle_time"); - generator.write(this.throttleTime); - - } - generator.writeKey("throttle_time_in_millis"); - generator.write(this.throttleTimeInMillis); - - if (this.indexTime != null) { - generator.writeKey("index_time"); - generator.write(this.indexTime); - - } - generator.writeKey("index_time_in_millis"); - generator.write(this.indexTimeInMillis); - - generator.writeKey("index_total"); - generator.write(this.indexTotal); - - generator.writeKey("index_failed"); - generator.write(this.indexFailed); - - if (ApiTypeHelper.isDefined(this.types)) { - generator.writeKey("types"); - generator.writeStartObject(); - for (Map.Entry item0 : this.types.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link IndexingStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long indexCurrent; - - private Long deleteCurrent; - - @Nullable - private String deleteTime; - - private Long deleteTimeInMillis; - - private Long deleteTotal; - - private Boolean isThrottled; - - private Long noopUpdateTotal; - - @Nullable - private String throttleTime; - - private Long throttleTimeInMillis; - - @Nullable - private String indexTime; - - private Long indexTimeInMillis; - - private Long indexTotal; - - private Long indexFailed; - - @Nullable - private Map types; - - /** - * Required - API name: {@code index_current} - */ - public final Builder indexCurrent(long value) { - this.indexCurrent = value; - return this; - } - - /** - * Required - API name: {@code delete_current} - */ - public final Builder deleteCurrent(long value) { - this.deleteCurrent = value; - return this; - } - - /** - * API name: {@code delete_time} - */ - public final Builder deleteTime(@Nullable String value) { - this.deleteTime = value; - return this; - } - - /** - * Required - API name: {@code delete_time_in_millis} - */ - public final Builder deleteTimeInMillis(long value) { - this.deleteTimeInMillis = value; - return this; - } - - /** - * Required - API name: {@code delete_total} - */ - public final Builder deleteTotal(long value) { - this.deleteTotal = value; - return this; - } - - /** - * Required - API name: {@code is_throttled} - */ - public final Builder isThrottled(boolean value) { - this.isThrottled = value; - return this; - } - - /** - * Required - API name: {@code noop_update_total} - */ - public final Builder noopUpdateTotal(long value) { - this.noopUpdateTotal = value; - return this; - } - - /** - * API name: {@code throttle_time} - */ - public final Builder throttleTime(@Nullable String value) { - this.throttleTime = value; - return this; - } - - /** - * Required - API name: {@code throttle_time_in_millis} - */ - public final Builder throttleTimeInMillis(long value) { - this.throttleTimeInMillis = value; - return this; - } - - /** - * API name: {@code index_time} - */ - public final Builder indexTime(@Nullable String value) { - this.indexTime = value; - return this; - } - - /** - * Required - API name: {@code index_time_in_millis} - */ - public final Builder indexTimeInMillis(long value) { - this.indexTimeInMillis = value; - return this; - } - - /** - * Required - API name: {@code index_total} - */ - public final Builder indexTotal(long value) { - this.indexTotal = value; - return this; - } - - /** - * Required - API name: {@code index_failed} - */ - public final Builder indexFailed(long value) { - this.indexFailed = value; - return this; - } - - /** - * API name: {@code types} - *

- * Adds all entries of map to types. - */ - public final Builder types(Map map) { - this.types = _mapPutAll(this.types, map); - return this; - } - - /** - * API name: {@code types} - *

- * Adds an entry to types. - */ - public final Builder types(String key, IndexingStats value) { - this.types = _mapPut(this.types, key, value); - return this; - } - - /** - * API name: {@code types} - *

- * Adds an entry to types using a builder lambda. - */ - public final Builder types(String key, Function> fn) { - return types(key, fn.apply(new IndexingStats.Builder()).build()); - } - - /** - * Builds a {@link IndexingStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public IndexingStats build() { - _checkSingleUse(); - - return new IndexingStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link IndexingStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - IndexingStats::setupIndexingStatsDeserializer); - - protected static void setupIndexingStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::indexCurrent, JsonpDeserializer.longDeserializer(), "index_current"); - op.add(Builder::deleteCurrent, JsonpDeserializer.longDeserializer(), "delete_current"); - op.add(Builder::deleteTime, JsonpDeserializer.stringDeserializer(), "delete_time"); - op.add(Builder::deleteTimeInMillis, JsonpDeserializer.longDeserializer(), "delete_time_in_millis"); - op.add(Builder::deleteTotal, JsonpDeserializer.longDeserializer(), "delete_total"); - op.add(Builder::isThrottled, JsonpDeserializer.booleanDeserializer(), "is_throttled"); - op.add(Builder::noopUpdateTotal, JsonpDeserializer.longDeserializer(), "noop_update_total"); - op.add(Builder::throttleTime, JsonpDeserializer.stringDeserializer(), "throttle_time"); - op.add(Builder::throttleTimeInMillis, JsonpDeserializer.longDeserializer(), "throttle_time_in_millis"); - op.add(Builder::indexTime, JsonpDeserializer.stringDeserializer(), "index_time"); - op.add(Builder::indexTimeInMillis, JsonpDeserializer.longDeserializer(), "index_time_in_millis"); - op.add(Builder::indexTotal, JsonpDeserializer.longDeserializer(), "index_total"); - op.add(Builder::indexFailed, JsonpDeserializer.longDeserializer(), "index_failed"); - op.add(Builder::types, JsonpDeserializer.stringMapDeserializer(IndexingStats._DESERIALIZER), "types"); - - } + private final long deleteTimeInMillis; + + private final long deleteTotal; + + private final boolean isThrottled; + + private final long noopUpdateTotal; + + @Nullable + private final String throttleTime; + + private final long throttleTimeInMillis; + + @Nullable + private final String indexTime; + + private final long indexTimeInMillis; + + private final long indexTotal; + + private final long indexFailed; + + private final Map types; + + // --------------------------------------------------------------------------------------------- + + private IndexingStats(Builder builder) { + + this.indexCurrent = ApiTypeHelper.requireNonNull(builder.indexCurrent, this, "indexCurrent"); + this.deleteCurrent = ApiTypeHelper.requireNonNull(builder.deleteCurrent, this, "deleteCurrent"); + this.deleteTime = builder.deleteTime; + this.deleteTimeInMillis = ApiTypeHelper.requireNonNull(builder.deleteTimeInMillis, this, "deleteTimeInMillis"); + this.deleteTotal = ApiTypeHelper.requireNonNull(builder.deleteTotal, this, "deleteTotal"); + this.isThrottled = ApiTypeHelper.requireNonNull(builder.isThrottled, this, "isThrottled"); + this.noopUpdateTotal = ApiTypeHelper.requireNonNull(builder.noopUpdateTotal, this, "noopUpdateTotal"); + this.throttleTime = builder.throttleTime; + this.throttleTimeInMillis = ApiTypeHelper.requireNonNull(builder.throttleTimeInMillis, this, "throttleTimeInMillis"); + this.indexTime = builder.indexTime; + this.indexTimeInMillis = ApiTypeHelper.requireNonNull(builder.indexTimeInMillis, this, "indexTimeInMillis"); + this.indexTotal = ApiTypeHelper.requireNonNull(builder.indexTotal, this, "indexTotal"); + this.indexFailed = ApiTypeHelper.requireNonNull(builder.indexFailed, this, "indexFailed"); + this.types = ApiTypeHelper.unmodifiable(builder.types); + + } + + public static IndexingStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code index_current} + */ + public final long indexCurrent() { + return this.indexCurrent; + } + + /** + * Required - API name: {@code delete_current} + */ + public final long deleteCurrent() { + return this.deleteCurrent; + } + + /** + * API name: {@code delete_time} + */ + @Nullable + public final String deleteTime() { + return this.deleteTime; + } + + /** + * Required - API name: {@code delete_time_in_millis} + */ + public final long deleteTimeInMillis() { + return this.deleteTimeInMillis; + } + + /** + * Required - API name: {@code delete_total} + */ + public final long deleteTotal() { + return this.deleteTotal; + } + + /** + * Required - API name: {@code is_throttled} + */ + public final boolean isThrottled() { + return this.isThrottled; + } + + /** + * Required - API name: {@code noop_update_total} + */ + public final long noopUpdateTotal() { + return this.noopUpdateTotal; + } + + /** + * API name: {@code throttle_time} + */ + @Nullable + public final String throttleTime() { + return this.throttleTime; + } + + /** + * Required - API name: {@code throttle_time_in_millis} + */ + public final long throttleTimeInMillis() { + return this.throttleTimeInMillis; + } + + /** + * API name: {@code index_time} + */ + @Nullable + public final String indexTime() { + return this.indexTime; + } + + /** + * Required - API name: {@code index_time_in_millis} + */ + public final long indexTimeInMillis() { + return this.indexTimeInMillis; + } + + /** + * Required - API name: {@code index_total} + */ + public final long indexTotal() { + return this.indexTotal; + } + + /** + * Required - API name: {@code index_failed} + */ + public final long indexFailed() { + return this.indexFailed; + } + + /** + * API name: {@code types} + */ + public final Map types() { + return this.types; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("index_current"); + generator.write(this.indexCurrent); + + generator.writeKey("delete_current"); + generator.write(this.deleteCurrent); + + if (this.deleteTime != null) { + generator.writeKey("delete_time"); + generator.write(this.deleteTime); + + } + generator.writeKey("delete_time_in_millis"); + generator.write(this.deleteTimeInMillis); + + generator.writeKey("delete_total"); + generator.write(this.deleteTotal); + + generator.writeKey("is_throttled"); + generator.write(this.isThrottled); + + generator.writeKey("noop_update_total"); + generator.write(this.noopUpdateTotal); + + if (this.throttleTime != null) { + generator.writeKey("throttle_time"); + generator.write(this.throttleTime); + + } + generator.writeKey("throttle_time_in_millis"); + generator.write(this.throttleTimeInMillis); + + if (this.indexTime != null) { + generator.writeKey("index_time"); + generator.write(this.indexTime); + + } + generator.writeKey("index_time_in_millis"); + generator.write(this.indexTimeInMillis); + + generator.writeKey("index_total"); + generator.write(this.indexTotal); + + generator.writeKey("index_failed"); + generator.write(this.indexFailed); + + if (ApiTypeHelper.isDefined(this.types)) { + generator.writeKey("types"); + generator.writeStartObject(); + for (Map.Entry item0 : this.types.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IndexingStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long indexCurrent; + + private Long deleteCurrent; + + @Nullable + private String deleteTime; + + private Long deleteTimeInMillis; + + private Long deleteTotal; + + private Boolean isThrottled; + + private Long noopUpdateTotal; + + @Nullable + private String throttleTime; + + private Long throttleTimeInMillis; + + @Nullable + private String indexTime; + + private Long indexTimeInMillis; + + private Long indexTotal; + + private Long indexFailed; + + @Nullable + private Map types; + + /** + * Required - API name: {@code index_current} + */ + public final Builder indexCurrent(long value) { + this.indexCurrent = value; + return this; + } + + /** + * Required - API name: {@code delete_current} + */ + public final Builder deleteCurrent(long value) { + this.deleteCurrent = value; + return this; + } + + /** + * API name: {@code delete_time} + */ + public final Builder deleteTime(@Nullable String value) { + this.deleteTime = value; + return this; + } + + /** + * Required - API name: {@code delete_time_in_millis} + */ + public final Builder deleteTimeInMillis(long value) { + this.deleteTimeInMillis = value; + return this; + } + + /** + * Required - API name: {@code delete_total} + */ + public final Builder deleteTotal(long value) { + this.deleteTotal = value; + return this; + } + + /** + * Required - API name: {@code is_throttled} + */ + public final Builder isThrottled(boolean value) { + this.isThrottled = value; + return this; + } + + /** + * Required - API name: {@code noop_update_total} + */ + public final Builder noopUpdateTotal(long value) { + this.noopUpdateTotal = value; + return this; + } + + /** + * API name: {@code throttle_time} + */ + public final Builder throttleTime(@Nullable String value) { + this.throttleTime = value; + return this; + } + + /** + * Required - API name: {@code throttle_time_in_millis} + */ + public final Builder throttleTimeInMillis(long value) { + this.throttleTimeInMillis = value; + return this; + } + + /** + * API name: {@code index_time} + */ + public final Builder indexTime(@Nullable String value) { + this.indexTime = value; + return this; + } + + /** + * Required - API name: {@code index_time_in_millis} + */ + public final Builder indexTimeInMillis(long value) { + this.indexTimeInMillis = value; + return this; + } + + /** + * Required - API name: {@code index_total} + */ + public final Builder indexTotal(long value) { + this.indexTotal = value; + return this; + } + + /** + * Required - API name: {@code index_failed} + */ + public final Builder indexFailed(long value) { + this.indexFailed = value; + return this; + } + + /** + * API name: {@code types} + *

+ * Adds all entries of map to types. + */ + public final Builder types(Map map) { + this.types = _mapPutAll(this.types, map); + return this; + } + + /** + * API name: {@code types} + *

+ * Adds an entry to types. + */ + public final Builder types(String key, IndexingStats value) { + this.types = _mapPut(this.types, key, value); + return this; + } + + /** + * API name: {@code types} + *

+ * Adds an entry to types using a builder lambda. + */ + public final Builder types(String key, Function> fn) { + return types(key, fn.apply(new IndexingStats.Builder()).build()); + } + + /** + * Builds a {@link IndexingStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IndexingStats build() { + _checkSingleUse(); + + return new IndexingStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IndexingStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + IndexingStats::setupIndexingStatsDeserializer + ); + + protected static void setupIndexingStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::indexCurrent, JsonpDeserializer.longDeserializer(), "index_current"); + op.add(Builder::deleteCurrent, JsonpDeserializer.longDeserializer(), "delete_current"); + op.add(Builder::deleteTime, JsonpDeserializer.stringDeserializer(), "delete_time"); + op.add(Builder::deleteTimeInMillis, JsonpDeserializer.longDeserializer(), "delete_time_in_millis"); + op.add(Builder::deleteTotal, JsonpDeserializer.longDeserializer(), "delete_total"); + op.add(Builder::isThrottled, JsonpDeserializer.booleanDeserializer(), "is_throttled"); + op.add(Builder::noopUpdateTotal, JsonpDeserializer.longDeserializer(), "noop_update_total"); + op.add(Builder::throttleTime, JsonpDeserializer.stringDeserializer(), "throttle_time"); + op.add(Builder::throttleTimeInMillis, JsonpDeserializer.longDeserializer(), "throttle_time_in_millis"); + op.add(Builder::indexTime, JsonpDeserializer.stringDeserializer(), "index_time"); + op.add(Builder::indexTimeInMillis, JsonpDeserializer.longDeserializer(), "index_time_in_millis"); + op.add(Builder::indexTotal, JsonpDeserializer.longDeserializer(), "index_total"); + op.add(Builder::indexFailed, JsonpDeserializer.longDeserializer(), "index_failed"); + op.add(Builder::types, JsonpDeserializer.stringMapDeserializer(IndexingStats._DESERIALIZER), "types"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java index 3c72c61935..ba251d885a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/IndicesResponseBase.java @@ -32,78 +32,76 @@ package org.opensearch.client.opensearch._types; -import org.opensearch.client.json.JsonpMapper; -import org.opensearch.client.json.ObjectDeserializer; -import org.opensearch.client.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; - import java.util.function.Function; import javax.annotation.Nullable; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ObjectBuilder; // typedef: _types.IndicesResponseBase - public abstract class IndicesResponseBase extends AcknowledgedResponseBase { - @Nullable - private final ShardStatistics shards; + @Nullable + private final ShardStatistics shards; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - protected IndicesResponseBase(AbstractBuilder builder) { - super(builder); + protected IndicesResponseBase(AbstractBuilder builder) { + super(builder); - this.shards = builder.shards; + this.shards = builder.shards; - } + } - /** - * API name: {@code _shards} - */ - @Nullable - public final ShardStatistics shards() { - return this.shards; - } + /** + * API name: {@code _shards} + */ + @Nullable + public final ShardStatistics shards() { + return this.shards; + } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - super.serializeInternal(generator, mapper); - if (this.shards != null) { - generator.writeKey("_shards"); - this.shards.serialize(generator, mapper); + super.serializeInternal(generator, mapper); + if (this.shards != null) { + generator.writeKey("_shards"); + this.shards.serialize(generator, mapper); - } + } - } + } - protected abstract static class AbstractBuilder> - extends - AcknowledgedResponseBase.AbstractBuilder { - @Nullable - private ShardStatistics shards; + protected abstract static class AbstractBuilder> extends + AcknowledgedResponseBase.AbstractBuilder { + @Nullable + private ShardStatistics shards; - /** - * API name: {@code _shards} - */ - public final BuilderT shards(@Nullable ShardStatistics value) { - this.shards = value; - return self(); - } + /** + * API name: {@code _shards} + */ + public final BuilderT shards(@Nullable ShardStatistics value) { + this.shards = value; + return self(); + } - /** - * API name: {@code _shards} - */ - public final BuilderT shards(Function> fn) { - return this.shards(fn.apply(new ShardStatistics.Builder()).build()); - } + /** + * API name: {@code _shards} + */ + public final BuilderT shards(Function> fn) { + return this.shards(fn.apply(new ShardStatistics.Builder()).build()); + } - } + } - // --------------------------------------------------------------------------------------------- - protected static > void setupIndicesResponseBaseDeserializer( - ObjectDeserializer op) { - setupAcknowledgedResponseBaseDeserializer(op); - op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); + // --------------------------------------------------------------------------------------------- + protected static > void setupIndicesResponseBaseDeserializer( + ObjectDeserializer op + ) { + setupAcknowledgedResponseBaseDeserializer(op); + op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); - } + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java index 57ae78d5b1..cdebb2c397 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineGet.java @@ -32,6 +32,12 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; +import java.util.function.Supplier; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -43,321 +49,317 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.HashMap; -import java.util.Map; -import java.util.function.Function; -import java.util.function.Supplier; -import javax.annotation.Nullable; // typedef: _types.InlineGet - public class InlineGet implements JsonpSerializable { - private final Map metadata; - - private final Map fields; - - private final boolean found; - - @Nullable - private final Long seqNo; - - @Nullable - private final Long primaryTerm; - - @Nullable - private final String routing; - - private final TDocument source; - - @Nullable - private final JsonpSerializer tDocumentSerializer; - - // --------------------------------------------------------------------------------------------- - - private InlineGet(Builder builder) { - - this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); - - this.fields = ApiTypeHelper.unmodifiable(builder.fields); - this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found"); - this.seqNo = builder.seqNo; - this.primaryTerm = builder.primaryTerm; - this.routing = builder.routing; - this.source = ApiTypeHelper.requireNonNull(builder.source, this, "source"); - this.tDocumentSerializer = builder.tDocumentSerializer; - - } - - public static InlineGet of( - Function, ObjectBuilder>> fn) { - return fn.apply(new Builder<>()).build(); - } - - /** - * Document metadata - */ - public final Map metadata() { - return this.metadata; - } - - /** - * API name: {@code fields} - */ - public final Map fields() { - return this.fields; - } - - /** - * Required - API name: {@code found} - */ - public final boolean found() { - return this.found; - } - - /** - * API name: {@code _seq_no} - */ - @Nullable - public final Long seqNo() { - return this.seqNo; - } - - /** - * API name: {@code _primary_term} - */ - @Nullable - public final Long primaryTerm() { - return this.primaryTerm; - } - - /** - * API name: {@code _routing} - */ - @Nullable - public final String routing() { - return this.routing; - } - - /** - * Required - API name: {@code _source} - */ - public final TDocument source() { - return this.source; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - for (Map.Entry item0 : this.metadata.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - - if (ApiTypeHelper.isDefined(this.fields)) { - generator.writeKey("fields"); - generator.writeStartObject(); - for (Map.Entry item0 : this.fields.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("found"); - generator.write(this.found); - - if (this.seqNo != null) { - generator.writeKey("_seq_no"); - generator.write(this.seqNo); - - } - if (this.primaryTerm != null) { - generator.writeKey("_primary_term"); - generator.write(this.primaryTerm); - - } - if (this.routing != null) { - generator.writeKey("_routing"); - generator.write(this.routing); - - } - generator.writeKey("_source"); - JsonpUtils.serialize(this.source, generator, tDocumentSerializer, mapper); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link InlineGet}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { - @Nullable - private Map metadata = new HashMap<>(); - - /** - * Document metadata - *

- * Adds all entries of map to metadata. - */ - public final Builder metadata(Map map) { - this.metadata = _mapPutAll(this.metadata, map); - return this; - } - - /** - * Document metadata - *

- * Adds an entry to metadata. - */ - public final Builder metadata(String key, JsonData value) { - this.metadata = _mapPut(this.metadata, key, value); - return this; - } - - @Nullable - private Map fields; - - private Boolean found; - - @Nullable - private Long seqNo; - - @Nullable - private Long primaryTerm; - - @Nullable - private String routing; - - private TDocument source; - - @Nullable - private JsonpSerializer tDocumentSerializer; - - /** - * API name: {@code fields} - *

- * Adds all entries of map to fields. - */ - public final Builder fields(Map map) { - this.fields = _mapPutAll(this.fields, map); - return this; - } - - /** - * API name: {@code fields} - *

- * Adds an entry to fields. - */ - public final Builder fields(String key, JsonData value) { - this.fields = _mapPut(this.fields, key, value); - return this; - } - - /** - * Required - API name: {@code found} - */ - public final Builder found(boolean value) { - this.found = value; - return this; - } - - /** - * API name: {@code _seq_no} - */ - public final Builder seqNo(@Nullable Long value) { - this.seqNo = value; - return this; - } - - /** - * API name: {@code _primary_term} - */ - public final Builder primaryTerm(@Nullable Long value) { - this.primaryTerm = value; - return this; - } - - /** - * API name: {@code _routing} - */ - public final Builder routing(@Nullable String value) { - this.routing = value; - return this; - } - - /** - * Required - API name: {@code _source} - */ - public final Builder source(TDocument value) { - this.source = value; - return this; - } - - /** - * Serializer for TDocument. If not set, an attempt will be made to find a - * serializer from the JSON context. - */ - public final Builder tDocumentSerializer(@Nullable JsonpSerializer value) { - this.tDocumentSerializer = value; - return this; - } - - /** - * Builds a {@link InlineGet}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public InlineGet build() { - _checkSingleUse(); - - return new InlineGet(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Create a JSON deserializer for InlineGet - */ - public static JsonpDeserializer> createInlineGetDeserializer( - JsonpDeserializer tDocumentDeserializer) { - return ObjectBuilderDeserializer.createForObject((Supplier>) Builder::new, - op -> InlineGet.setupInlineGetDeserializer(op, tDocumentDeserializer)); - }; - - protected static void setupInlineGetDeserializer(ObjectDeserializer> op, - JsonpDeserializer tDocumentDeserializer) { - - op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "fields"); - op.add(Builder::found, JsonpDeserializer.booleanDeserializer(), "found"); - op.add(Builder::seqNo, JsonpDeserializer.longDeserializer(), "_seq_no"); - op.add(Builder::primaryTerm, JsonpDeserializer.longDeserializer(), "_primary_term"); - op.add(Builder::routing, JsonpDeserializer.stringDeserializer(), "_routing"); - op.add(Builder::source, tDocumentDeserializer, "_source"); - - op.setUnknownFieldHandler((builder, name, parser, mapper) -> { - if (builder.metadata == null) { - builder.metadata = new HashMap<>(); - } - builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); - }); - - } + private final Map metadata; + + private final Map fields; + + private final boolean found; + + @Nullable + private final Long seqNo; + + @Nullable + private final Long primaryTerm; + + @Nullable + private final String routing; + + private final TDocument source; + + @Nullable + private final JsonpSerializer tDocumentSerializer; + + // --------------------------------------------------------------------------------------------- + + private InlineGet(Builder builder) { + + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + + this.fields = ApiTypeHelper.unmodifiable(builder.fields); + this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found"); + this.seqNo = builder.seqNo; + this.primaryTerm = builder.primaryTerm; + this.routing = builder.routing; + this.source = ApiTypeHelper.requireNonNull(builder.source, this, "source"); + this.tDocumentSerializer = builder.tDocumentSerializer; + + } + + public static InlineGet of(Function, ObjectBuilder>> fn) { + return fn.apply(new Builder<>()).build(); + } + + /** + * Document metadata + */ + public final Map metadata() { + return this.metadata; + } + + /** + * API name: {@code fields} + */ + public final Map fields() { + return this.fields; + } + + /** + * Required - API name: {@code found} + */ + public final boolean found() { + return this.found; + } + + /** + * API name: {@code _seq_no} + */ + @Nullable + public final Long seqNo() { + return this.seqNo; + } + + /** + * API name: {@code _primary_term} + */ + @Nullable + public final Long primaryTerm() { + return this.primaryTerm; + } + + /** + * API name: {@code _routing} + */ + @Nullable + public final String routing() { + return this.routing; + } + + /** + * Required - API name: {@code _source} + */ + public final TDocument source() { + return this.source; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + + if (ApiTypeHelper.isDefined(this.fields)) { + generator.writeKey("fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.fields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("found"); + generator.write(this.found); + + if (this.seqNo != null) { + generator.writeKey("_seq_no"); + generator.write(this.seqNo); + + } + if (this.primaryTerm != null) { + generator.writeKey("_primary_term"); + generator.write(this.primaryTerm); + + } + if (this.routing != null) { + generator.writeKey("_routing"); + generator.write(this.routing); + + } + generator.writeKey("_source"); + JsonpUtils.serialize(this.source, generator, tDocumentSerializer, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link InlineGet}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + @Nullable + private Map metadata = new HashMap<>(); + + /** + * Document metadata + *

+ * Adds all entries of map to metadata. + */ + public final Builder metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return this; + } + + /** + * Document metadata + *

+ * Adds an entry to metadata. + */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + @Nullable + private Map fields; + + private Boolean found; + + @Nullable + private Long seqNo; + + @Nullable + private Long primaryTerm; + + @Nullable + private String routing; + + private TDocument source; + + @Nullable + private JsonpSerializer tDocumentSerializer; + + /** + * API name: {@code fields} + *

+ * Adds all entries of map to fields. + */ + public final Builder fields(Map map) { + this.fields = _mapPutAll(this.fields, map); + return this; + } + + /** + * API name: {@code fields} + *

+ * Adds an entry to fields. + */ + public final Builder fields(String key, JsonData value) { + this.fields = _mapPut(this.fields, key, value); + return this; + } + + /** + * Required - API name: {@code found} + */ + public final Builder found(boolean value) { + this.found = value; + return this; + } + + /** + * API name: {@code _seq_no} + */ + public final Builder seqNo(@Nullable Long value) { + this.seqNo = value; + return this; + } + + /** + * API name: {@code _primary_term} + */ + public final Builder primaryTerm(@Nullable Long value) { + this.primaryTerm = value; + return this; + } + + /** + * API name: {@code _routing} + */ + public final Builder routing(@Nullable String value) { + this.routing = value; + return this; + } + + /** + * Required - API name: {@code _source} + */ + public final Builder source(TDocument value) { + this.source = value; + return this; + } + + /** + * Serializer for TDocument. If not set, an attempt will be made to find a + * serializer from the JSON context. + */ + public final Builder tDocumentSerializer(@Nullable JsonpSerializer value) { + this.tDocumentSerializer = value; + return this; + } + + /** + * Builds a {@link InlineGet}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public InlineGet build() { + _checkSingleUse(); + + return new InlineGet(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Create a JSON deserializer for InlineGet + */ + public static JsonpDeserializer> createInlineGetDeserializer( + JsonpDeserializer tDocumentDeserializer + ) { + return ObjectBuilderDeserializer.createForObject( + (Supplier>) Builder::new, + op -> InlineGet.setupInlineGetDeserializer(op, tDocumentDeserializer) + ); + }; + + protected static void setupInlineGetDeserializer( + ObjectDeserializer> op, + JsonpDeserializer tDocumentDeserializer + ) { + + op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "fields"); + op.add(Builder::found, JsonpDeserializer.booleanDeserializer(), "found"); + op.add(Builder::seqNo, JsonpDeserializer.longDeserializer(), "_seq_no"); + op.add(Builder::primaryTerm, JsonpDeserializer.longDeserializer(), "_primary_term"); + op.add(Builder::routing, JsonpDeserializer.stringDeserializer(), "_routing"); + op.add(Builder::source, tDocumentDeserializer, "_source"); + + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + if (builder.metadata == null) { + builder.metadata = new HashMap<>(); + } + builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); + }); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java index f6aafdd58f..be2177029b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/InlineScript.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -39,169 +43,166 @@ import org.opensearch.client.json.ObjectDeserializer; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.InlineScript @JsonpDeserializable public class InlineScript extends ScriptBase { - @Nullable - private final String lang; - - private final Map options; - - private final String source; - - // --------------------------------------------------------------------------------------------- - - private InlineScript(Builder builder) { - super(builder); - - this.lang = builder.lang; - this.options = ApiTypeHelper.unmodifiable(builder.options); - this.source = ApiTypeHelper.requireNonNull(builder.source, this, "source"); - - } - - public static InlineScript of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code lang} - */ - @Nullable - public final String lang() { - return this.lang; - } - - /** - * API name: {@code options} - */ - public final Map options() { - return this.options; - } - - /** - * Required - API name: {@code source} - */ - public final String source() { - return this.source; - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - super.serializeInternal(generator, mapper); - if (this.lang != null) { - generator.writeKey("lang"); - generator.write(this.lang); - - } - if (ApiTypeHelper.isDefined(this.options)) { - generator.writeKey("options"); - generator.writeStartObject(); - for (Map.Entry item0 : this.options.entrySet()) { - generator.writeKey(item0.getKey()); - generator.write(item0.getValue()); - - } - generator.writeEnd(); - - } - generator.writeKey("source"); - generator.write(this.source); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link InlineScript}. - */ - - public static class Builder extends ScriptBase.AbstractBuilder implements ObjectBuilder { - @Nullable - private String lang; - - @Nullable - private Map options; - - private String source; - - /** - * API name: {@code lang} - */ - public final Builder lang(@Nullable String value) { - this.lang = value; - return this; - } - - /** - * API name: {@code options} - *

- * Adds all entries of map to options. - */ - public final Builder options(Map map) { - this.options = _mapPutAll(this.options, map); - return this; - } - - /** - * API name: {@code options} - *

- * Adds an entry to options. - */ - public final Builder options(String key, String value) { - this.options = _mapPut(this.options, key, value); - return this; - } - - /** - * Required - API name: {@code source} - */ - public final Builder source(String value) { - this.source = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link InlineScript}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public InlineScript build() { - _checkSingleUse(); - - return new InlineScript(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link InlineScript} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - InlineScript::setupInlineScriptDeserializer); - - protected static void setupInlineScriptDeserializer(ObjectDeserializer op) { - ScriptBase.setupScriptBaseDeserializer(op); - op.add(Builder::lang, JsonpDeserializer.stringDeserializer(), "lang"); - op.add(Builder::options, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), - "options"); - op.add(Builder::source, JsonpDeserializer.stringDeserializer(), "source"); - - op.shortcutProperty("source"); - - } + @Nullable + private final String lang; + + private final Map options; + + private final String source; + + // --------------------------------------------------------------------------------------------- + + private InlineScript(Builder builder) { + super(builder); + + this.lang = builder.lang; + this.options = ApiTypeHelper.unmodifiable(builder.options); + this.source = ApiTypeHelper.requireNonNull(builder.source, this, "source"); + + } + + public static InlineScript of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code lang} + */ + @Nullable + public final String lang() { + return this.lang; + } + + /** + * API name: {@code options} + */ + public final Map options() { + return this.options; + } + + /** + * Required - API name: {@code source} + */ + public final String source() { + return this.source; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (this.lang != null) { + generator.writeKey("lang"); + generator.write(this.lang); + + } + if (ApiTypeHelper.isDefined(this.options)) { + generator.writeKey("options"); + generator.writeStartObject(); + for (Map.Entry item0 : this.options.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } + generator.writeKey("source"); + generator.write(this.source); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link InlineScript}. + */ + + public static class Builder extends ScriptBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String lang; + + @Nullable + private Map options; + + private String source; + + /** + * API name: {@code lang} + */ + public final Builder lang(@Nullable String value) { + this.lang = value; + return this; + } + + /** + * API name: {@code options} + *

+ * Adds all entries of map to options. + */ + public final Builder options(Map map) { + this.options = _mapPutAll(this.options, map); + return this; + } + + /** + * API name: {@code options} + *

+ * Adds an entry to options. + */ + public final Builder options(String key, String value) { + this.options = _mapPut(this.options, key, value); + return this; + } + + /** + * Required - API name: {@code source} + */ + public final Builder source(String value) { + this.source = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link InlineScript}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public InlineScript build() { + _checkSingleUse(); + + return new InlineScript(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link InlineScript} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + InlineScript::setupInlineScriptDeserializer + ); + + protected static void setupInlineScriptDeserializer(ObjectDeserializer op) { + ScriptBase.setupScriptBaseDeserializer(op); + op.add(Builder::lang, JsonpDeserializer.stringDeserializer(), "lang"); + op.add(Builder::options, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "options"); + op.add(Builder::source, JsonpDeserializer.stringDeserializer(), "source"); + + op.shortcutProperty("source"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java index d100024525..986416874a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LatLonGeoLocation.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,116 +43,116 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.LatLonGeoLocation @JsonpDeserializable public class LatLonGeoLocation implements JsonpSerializable { - private final double lat; - - private final double lon; - - // --------------------------------------------------------------------------------------------- + private final double lat; - private LatLonGeoLocation(Builder builder) { + private final double lon; + + // --------------------------------------------------------------------------------------------- - this.lat = ApiTypeHelper.requireNonNull(builder.lat, this, "lat"); - this.lon = ApiTypeHelper.requireNonNull(builder.lon, this, "lon"); + private LatLonGeoLocation(Builder builder) { - } + this.lat = ApiTypeHelper.requireNonNull(builder.lat, this, "lat"); + this.lon = ApiTypeHelper.requireNonNull(builder.lon, this, "lon"); - public static LatLonGeoLocation of(Function> fn) { - return fn.apply(new Builder()).build(); - } + } - /** - * Required - API name: {@code lat} - */ - public final double lat() { - return this.lat; - } + public static LatLonGeoLocation of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code lon} - */ - public final double lon() { - return this.lon; - } + /** + * Required - API name: {@code lat} + */ + public final double lat() { + return this.lat; + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } + /** + * Required - API name: {@code lon} + */ + public final double lon() { + return this.lon; + } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } - generator.writeKey("lat"); - generator.write(this.lat); + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("lon"); - generator.write(this.lon); + generator.writeKey("lat"); + generator.write(this.lat); - } + generator.writeKey("lon"); + generator.write(this.lon); - // --------------------------------------------------------------------------------------------- + } - /** - * Builder for {@link LatLonGeoLocation}. - */ + // --------------------------------------------------------------------------------------------- - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Double lat; + /** + * Builder for {@link LatLonGeoLocation}. + */ - private Double lon; + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Double lat; - /** - * Required - API name: {@code lat} - */ - public final Builder lat(double value) { - this.lat = value; - return this; - } + private Double lon; - /** - * Required - API name: {@code lon} - */ - public final Builder lon(double value) { - this.lon = value; - return this; - } + /** + * Required - API name: {@code lat} + */ + public final Builder lat(double value) { + this.lat = value; + return this; + } - /** - * Builds a {@link LatLonGeoLocation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public LatLonGeoLocation build() { - _checkSingleUse(); + /** + * Required - API name: {@code lon} + */ + public final Builder lon(double value) { + this.lon = value; + return this; + } - return new LatLonGeoLocation(this); - } - } + /** + * Builds a {@link LatLonGeoLocation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LatLonGeoLocation build() { + _checkSingleUse(); - // --------------------------------------------------------------------------------------------- + return new LatLonGeoLocation(this); + } + } - /** - * Json deserializer for {@link LatLonGeoLocation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, LatLonGeoLocation::setupLatLonGeoLocationDeserializer); + // --------------------------------------------------------------------------------------------- - protected static void setupLatLonGeoLocationDeserializer(ObjectDeserializer op) { + /** + * Json deserializer for {@link LatLonGeoLocation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + LatLonGeoLocation::setupLatLonGeoLocationDeserializer + ); - op.add(Builder::lat, JsonpDeserializer.doubleDeserializer(), "lat"); - op.add(Builder::lon, JsonpDeserializer.doubleDeserializer(), "lon"); + protected static void setupLatLonGeoLocationDeserializer(ObjectDeserializer op) { - } + op.add(Builder::lat, JsonpDeserializer.doubleDeserializer(), "lat"); + op.add(Builder::lon, JsonpDeserializer.doubleDeserializer(), "lon"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java index 0987308078..a7df990bb7 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Level.java @@ -37,23 +37,23 @@ @JsonpDeserializable public enum Level implements JsonEnum { - Cluster("cluster"), + Cluster("cluster"), - Indices("indices"), + Indices("indices"), - Shards("shards"), + Shards("shards"), - ; + ; - private final String jsonValue; + private final String jsonValue; - Level(String jsonValue) { - this.jsonValue = jsonValue; - } + Level(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Level.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Level.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java index 85e8b718e2..71cd0307ce 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/LifecycleOperationMode.java @@ -37,24 +37,25 @@ @JsonpDeserializable public enum LifecycleOperationMode implements JsonEnum { - Running("RUNNING"), + Running("RUNNING"), - Stopping("STOPPING"), + Stopping("STOPPING"), - Stopped("STOPPED"), + Stopped("STOPPED"), - ; + ; - private final String jsonValue; + private final String jsonValue; - LifecycleOperationMode(String jsonValue) { - this.jsonValue = jsonValue; - } + LifecycleOperationMode(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - LifecycleOperationMode.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + LifecycleOperationMode.values() + ); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java index d98b62be8a..7a09b9de4a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/MergesStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,487 +44,486 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.MergesStats @JsonpDeserializable public class MergesStats implements JsonpSerializable { - private final long current; - - private final long currentDocs; + private final long current; - @Nullable - private final String currentSize; + private final long currentDocs; + + @Nullable + private final String currentSize; - private final long currentSizeInBytes; - - private final long total; - - @Nullable - private final String totalAutoThrottle; - - private final long totalAutoThrottleInBytes; - - private final long totalDocs; - - @Nullable - private final String totalSize; - - private final long totalSizeInBytes; - - @Nullable - private final String totalStoppedTime; - - private final long totalStoppedTimeInMillis; - - @Nullable - private final String totalThrottledTime; - - private final long totalThrottledTimeInMillis; - - @Nullable - private final String totalTime; - - private final long totalTimeInMillis; - - // --------------------------------------------------------------------------------------------- - - private MergesStats(Builder builder) { - - this.current = ApiTypeHelper.requireNonNull(builder.current, this, "current"); - this.currentDocs = ApiTypeHelper.requireNonNull(builder.currentDocs, this, "currentDocs"); - this.currentSize = builder.currentSize; - this.currentSizeInBytes = ApiTypeHelper.requireNonNull(builder.currentSizeInBytes, this, "currentSizeInBytes"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - this.totalAutoThrottle = builder.totalAutoThrottle; - this.totalAutoThrottleInBytes = ApiTypeHelper.requireNonNull(builder.totalAutoThrottleInBytes, this, - "totalAutoThrottleInBytes"); - this.totalDocs = ApiTypeHelper.requireNonNull(builder.totalDocs, this, "totalDocs"); - this.totalSize = builder.totalSize; - this.totalSizeInBytes = ApiTypeHelper.requireNonNull(builder.totalSizeInBytes, this, "totalSizeInBytes"); - this.totalStoppedTime = builder.totalStoppedTime; - this.totalStoppedTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalStoppedTimeInMillis, this, - "totalStoppedTimeInMillis"); - this.totalThrottledTime = builder.totalThrottledTime; - this.totalThrottledTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalThrottledTimeInMillis, this, - "totalThrottledTimeInMillis"); - this.totalTime = builder.totalTime; - this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); - - } - - public static MergesStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code current} - */ - public final long current() { - return this.current; - } - - /** - * Required - API name: {@code current_docs} - */ - public final long currentDocs() { - return this.currentDocs; - } - - /** - * API name: {@code current_size} - */ - @Nullable - public final String currentSize() { - return this.currentSize; - } - - /** - * Required - API name: {@code current_size_in_bytes} - */ - public final long currentSizeInBytes() { - return this.currentSizeInBytes; - } - - /** - * Required - API name: {@code total} - */ - public final long total() { - return this.total; - } - - /** - * API name: {@code total_auto_throttle} - */ - @Nullable - public final String totalAutoThrottle() { - return this.totalAutoThrottle; - } - - /** - * Required - API name: {@code total_auto_throttle_in_bytes} - */ - public final long totalAutoThrottleInBytes() { - return this.totalAutoThrottleInBytes; - } - - /** - * Required - API name: {@code total_docs} - */ - public final long totalDocs() { - return this.totalDocs; - } - - /** - * API name: {@code total_size} - */ - @Nullable - public final String totalSize() { - return this.totalSize; - } - - /** - * Required - API name: {@code total_size_in_bytes} - */ - public final long totalSizeInBytes() { - return this.totalSizeInBytes; - } - - /** - * API name: {@code total_stopped_time} - */ - @Nullable - public final String totalStoppedTime() { - return this.totalStoppedTime; - } - - /** - * Required - API name: {@code total_stopped_time_in_millis} - */ - public final long totalStoppedTimeInMillis() { - return this.totalStoppedTimeInMillis; - } - - /** - * API name: {@code total_throttled_time} - */ - @Nullable - public final String totalThrottledTime() { - return this.totalThrottledTime; - } - - /** - * Required - API name: {@code total_throttled_time_in_millis} - */ - public final long totalThrottledTimeInMillis() { - return this.totalThrottledTimeInMillis; - } - - /** - * API name: {@code total_time} - */ - @Nullable - public final String totalTime() { - return this.totalTime; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final long totalTimeInMillis() { - return this.totalTimeInMillis; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("current"); - generator.write(this.current); - - generator.writeKey("current_docs"); - generator.write(this.currentDocs); - - if (this.currentSize != null) { - generator.writeKey("current_size"); - generator.write(this.currentSize); - - } - generator.writeKey("current_size_in_bytes"); - generator.write(this.currentSizeInBytes); - - generator.writeKey("total"); - generator.write(this.total); - - if (this.totalAutoThrottle != null) { - generator.writeKey("total_auto_throttle"); - generator.write(this.totalAutoThrottle); - - } - generator.writeKey("total_auto_throttle_in_bytes"); - generator.write(this.totalAutoThrottleInBytes); - - generator.writeKey("total_docs"); - generator.write(this.totalDocs); - - if (this.totalSize != null) { - generator.writeKey("total_size"); - generator.write(this.totalSize); - - } - generator.writeKey("total_size_in_bytes"); - generator.write(this.totalSizeInBytes); - - if (this.totalStoppedTime != null) { - generator.writeKey("total_stopped_time"); - generator.write(this.totalStoppedTime); - - } - generator.writeKey("total_stopped_time_in_millis"); - generator.write(this.totalStoppedTimeInMillis); - - if (this.totalThrottledTime != null) { - generator.writeKey("total_throttled_time"); - generator.write(this.totalThrottledTime); - - } - generator.writeKey("total_throttled_time_in_millis"); - generator.write(this.totalThrottledTimeInMillis); - - if (this.totalTime != null) { - generator.writeKey("total_time"); - generator.write(this.totalTime); - - } - generator.writeKey("total_time_in_millis"); - generator.write(this.totalTimeInMillis); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link MergesStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long current; - - private Long currentDocs; - - @Nullable - private String currentSize; - - private Long currentSizeInBytes; - - private Long total; - - @Nullable - private String totalAutoThrottle; - - private Long totalAutoThrottleInBytes; - - private Long totalDocs; - - @Nullable - private String totalSize; - - private Long totalSizeInBytes; - - @Nullable - private String totalStoppedTime; - - private Long totalStoppedTimeInMillis; - - @Nullable - private String totalThrottledTime; - - private Long totalThrottledTimeInMillis; - - @Nullable - private String totalTime; - - private Long totalTimeInMillis; - - /** - * Required - API name: {@code current} - */ - public final Builder current(long value) { - this.current = value; - return this; - } - - /** - * Required - API name: {@code current_docs} - */ - public final Builder currentDocs(long value) { - this.currentDocs = value; - return this; - } - - /** - * API name: {@code current_size} - */ - public final Builder currentSize(@Nullable String value) { - this.currentSize = value; - return this; - } - - /** - * Required - API name: {@code current_size_in_bytes} - */ - public final Builder currentSizeInBytes(long value) { - this.currentSizeInBytes = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(long value) { - this.total = value; - return this; - } - - /** - * API name: {@code total_auto_throttle} - */ - public final Builder totalAutoThrottle(@Nullable String value) { - this.totalAutoThrottle = value; - return this; - } - - /** - * Required - API name: {@code total_auto_throttle_in_bytes} - */ - public final Builder totalAutoThrottleInBytes(long value) { - this.totalAutoThrottleInBytes = value; - return this; - } - - /** - * Required - API name: {@code total_docs} - */ - public final Builder totalDocs(long value) { - this.totalDocs = value; - return this; - } - - /** - * API name: {@code total_size} - */ - public final Builder totalSize(@Nullable String value) { - this.totalSize = value; - return this; - } - - /** - * Required - API name: {@code total_size_in_bytes} - */ - public final Builder totalSizeInBytes(long value) { - this.totalSizeInBytes = value; - return this; - } - - /** - * API name: {@code total_stopped_time} - */ - public final Builder totalStoppedTime(@Nullable String value) { - this.totalStoppedTime = value; - return this; - } - - /** - * Required - API name: {@code total_stopped_time_in_millis} - */ - public final Builder totalStoppedTimeInMillis(long value) { - this.totalStoppedTimeInMillis = value; - return this; - } - - /** - * API name: {@code total_throttled_time} - */ - public final Builder totalThrottledTime(@Nullable String value) { - this.totalThrottledTime = value; - return this; - } - - /** - * Required - API name: {@code total_throttled_time_in_millis} - */ - public final Builder totalThrottledTimeInMillis(long value) { - this.totalThrottledTimeInMillis = value; - return this; - } - - /** - * API name: {@code total_time} - */ - public final Builder totalTime(@Nullable String value) { - this.totalTime = value; - return this; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final Builder totalTimeInMillis(long value) { - this.totalTimeInMillis = value; - return this; - } - - /** - * Builds a {@link MergesStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public MergesStats build() { - _checkSingleUse(); - - return new MergesStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link MergesStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - MergesStats::setupMergesStatsDeserializer); - - protected static void setupMergesStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::current, JsonpDeserializer.longDeserializer(), "current"); - op.add(Builder::currentDocs, JsonpDeserializer.longDeserializer(), "current_docs"); - op.add(Builder::currentSize, JsonpDeserializer.stringDeserializer(), "current_size"); - op.add(Builder::currentSizeInBytes, JsonpDeserializer.longDeserializer(), "current_size_in_bytes"); - op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); - op.add(Builder::totalAutoThrottle, JsonpDeserializer.stringDeserializer(), "total_auto_throttle"); - op.add(Builder::totalAutoThrottleInBytes, JsonpDeserializer.longDeserializer(), "total_auto_throttle_in_bytes"); - op.add(Builder::totalDocs, JsonpDeserializer.longDeserializer(), "total_docs"); - op.add(Builder::totalSize, JsonpDeserializer.stringDeserializer(), "total_size"); - op.add(Builder::totalSizeInBytes, JsonpDeserializer.longDeserializer(), "total_size_in_bytes"); - op.add(Builder::totalStoppedTime, JsonpDeserializer.stringDeserializer(), "total_stopped_time"); - op.add(Builder::totalStoppedTimeInMillis, JsonpDeserializer.longDeserializer(), "total_stopped_time_in_millis"); - op.add(Builder::totalThrottledTime, JsonpDeserializer.stringDeserializer(), "total_throttled_time"); - op.add(Builder::totalThrottledTimeInMillis, JsonpDeserializer.longDeserializer(), - "total_throttled_time_in_millis"); - op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); - op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); - - } + private final long currentSizeInBytes; + + private final long total; + + @Nullable + private final String totalAutoThrottle; + + private final long totalAutoThrottleInBytes; + + private final long totalDocs; + + @Nullable + private final String totalSize; + + private final long totalSizeInBytes; + + @Nullable + private final String totalStoppedTime; + + private final long totalStoppedTimeInMillis; + + @Nullable + private final String totalThrottledTime; + + private final long totalThrottledTimeInMillis; + + @Nullable + private final String totalTime; + + private final long totalTimeInMillis; + + // --------------------------------------------------------------------------------------------- + + private MergesStats(Builder builder) { + + this.current = ApiTypeHelper.requireNonNull(builder.current, this, "current"); + this.currentDocs = ApiTypeHelper.requireNonNull(builder.currentDocs, this, "currentDocs"); + this.currentSize = builder.currentSize; + this.currentSizeInBytes = ApiTypeHelper.requireNonNull(builder.currentSizeInBytes, this, "currentSizeInBytes"); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.totalAutoThrottle = builder.totalAutoThrottle; + this.totalAutoThrottleInBytes = ApiTypeHelper.requireNonNull(builder.totalAutoThrottleInBytes, this, "totalAutoThrottleInBytes"); + this.totalDocs = ApiTypeHelper.requireNonNull(builder.totalDocs, this, "totalDocs"); + this.totalSize = builder.totalSize; + this.totalSizeInBytes = ApiTypeHelper.requireNonNull(builder.totalSizeInBytes, this, "totalSizeInBytes"); + this.totalStoppedTime = builder.totalStoppedTime; + this.totalStoppedTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalStoppedTimeInMillis, this, "totalStoppedTimeInMillis"); + this.totalThrottledTime = builder.totalThrottledTime; + this.totalThrottledTimeInMillis = ApiTypeHelper.requireNonNull( + builder.totalThrottledTimeInMillis, + this, + "totalThrottledTimeInMillis" + ); + this.totalTime = builder.totalTime; + this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); + + } + + public static MergesStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code current} + */ + public final long current() { + return this.current; + } + + /** + * Required - API name: {@code current_docs} + */ + public final long currentDocs() { + return this.currentDocs; + } + + /** + * API name: {@code current_size} + */ + @Nullable + public final String currentSize() { + return this.currentSize; + } + + /** + * Required - API name: {@code current_size_in_bytes} + */ + public final long currentSizeInBytes() { + return this.currentSizeInBytes; + } + + /** + * Required - API name: {@code total} + */ + public final long total() { + return this.total; + } + + /** + * API name: {@code total_auto_throttle} + */ + @Nullable + public final String totalAutoThrottle() { + return this.totalAutoThrottle; + } + + /** + * Required - API name: {@code total_auto_throttle_in_bytes} + */ + public final long totalAutoThrottleInBytes() { + return this.totalAutoThrottleInBytes; + } + + /** + * Required - API name: {@code total_docs} + */ + public final long totalDocs() { + return this.totalDocs; + } + + /** + * API name: {@code total_size} + */ + @Nullable + public final String totalSize() { + return this.totalSize; + } + + /** + * Required - API name: {@code total_size_in_bytes} + */ + public final long totalSizeInBytes() { + return this.totalSizeInBytes; + } + + /** + * API name: {@code total_stopped_time} + */ + @Nullable + public final String totalStoppedTime() { + return this.totalStoppedTime; + } + + /** + * Required - API name: {@code total_stopped_time_in_millis} + */ + public final long totalStoppedTimeInMillis() { + return this.totalStoppedTimeInMillis; + } + + /** + * API name: {@code total_throttled_time} + */ + @Nullable + public final String totalThrottledTime() { + return this.totalThrottledTime; + } + + /** + * Required - API name: {@code total_throttled_time_in_millis} + */ + public final long totalThrottledTimeInMillis() { + return this.totalThrottledTimeInMillis; + } + + /** + * API name: {@code total_time} + */ + @Nullable + public final String totalTime() { + return this.totalTime; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final long totalTimeInMillis() { + return this.totalTimeInMillis; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("current"); + generator.write(this.current); + + generator.writeKey("current_docs"); + generator.write(this.currentDocs); + + if (this.currentSize != null) { + generator.writeKey("current_size"); + generator.write(this.currentSize); + + } + generator.writeKey("current_size_in_bytes"); + generator.write(this.currentSizeInBytes); + + generator.writeKey("total"); + generator.write(this.total); + + if (this.totalAutoThrottle != null) { + generator.writeKey("total_auto_throttle"); + generator.write(this.totalAutoThrottle); + + } + generator.writeKey("total_auto_throttle_in_bytes"); + generator.write(this.totalAutoThrottleInBytes); + + generator.writeKey("total_docs"); + generator.write(this.totalDocs); + + if (this.totalSize != null) { + generator.writeKey("total_size"); + generator.write(this.totalSize); + + } + generator.writeKey("total_size_in_bytes"); + generator.write(this.totalSizeInBytes); + + if (this.totalStoppedTime != null) { + generator.writeKey("total_stopped_time"); + generator.write(this.totalStoppedTime); + + } + generator.writeKey("total_stopped_time_in_millis"); + generator.write(this.totalStoppedTimeInMillis); + + if (this.totalThrottledTime != null) { + generator.writeKey("total_throttled_time"); + generator.write(this.totalThrottledTime); + + } + generator.writeKey("total_throttled_time_in_millis"); + generator.write(this.totalThrottledTimeInMillis); + + if (this.totalTime != null) { + generator.writeKey("total_time"); + generator.write(this.totalTime); + + } + generator.writeKey("total_time_in_millis"); + generator.write(this.totalTimeInMillis); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link MergesStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long current; + + private Long currentDocs; + + @Nullable + private String currentSize; + + private Long currentSizeInBytes; + + private Long total; + + @Nullable + private String totalAutoThrottle; + + private Long totalAutoThrottleInBytes; + + private Long totalDocs; + + @Nullable + private String totalSize; + + private Long totalSizeInBytes; + + @Nullable + private String totalStoppedTime; + + private Long totalStoppedTimeInMillis; + + @Nullable + private String totalThrottledTime; + + private Long totalThrottledTimeInMillis; + + @Nullable + private String totalTime; + + private Long totalTimeInMillis; + + /** + * Required - API name: {@code current} + */ + public final Builder current(long value) { + this.current = value; + return this; + } + + /** + * Required - API name: {@code current_docs} + */ + public final Builder currentDocs(long value) { + this.currentDocs = value; + return this; + } + + /** + * API name: {@code current_size} + */ + public final Builder currentSize(@Nullable String value) { + this.currentSize = value; + return this; + } + + /** + * Required - API name: {@code current_size_in_bytes} + */ + public final Builder currentSizeInBytes(long value) { + this.currentSizeInBytes = value; + return this; + } + + /** + * Required - API name: {@code total} + */ + public final Builder total(long value) { + this.total = value; + return this; + } + + /** + * API name: {@code total_auto_throttle} + */ + public final Builder totalAutoThrottle(@Nullable String value) { + this.totalAutoThrottle = value; + return this; + } + + /** + * Required - API name: {@code total_auto_throttle_in_bytes} + */ + public final Builder totalAutoThrottleInBytes(long value) { + this.totalAutoThrottleInBytes = value; + return this; + } + + /** + * Required - API name: {@code total_docs} + */ + public final Builder totalDocs(long value) { + this.totalDocs = value; + return this; + } + + /** + * API name: {@code total_size} + */ + public final Builder totalSize(@Nullable String value) { + this.totalSize = value; + return this; + } + + /** + * Required - API name: {@code total_size_in_bytes} + */ + public final Builder totalSizeInBytes(long value) { + this.totalSizeInBytes = value; + return this; + } + + /** + * API name: {@code total_stopped_time} + */ + public final Builder totalStoppedTime(@Nullable String value) { + this.totalStoppedTime = value; + return this; + } + + /** + * Required - API name: {@code total_stopped_time_in_millis} + */ + public final Builder totalStoppedTimeInMillis(long value) { + this.totalStoppedTimeInMillis = value; + return this; + } + + /** + * API name: {@code total_throttled_time} + */ + public final Builder totalThrottledTime(@Nullable String value) { + this.totalThrottledTime = value; + return this; + } + + /** + * Required - API name: {@code total_throttled_time_in_millis} + */ + public final Builder totalThrottledTimeInMillis(long value) { + this.totalThrottledTimeInMillis = value; + return this; + } + + /** + * API name: {@code total_time} + */ + public final Builder totalTime(@Nullable String value) { + this.totalTime = value; + return this; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final Builder totalTimeInMillis(long value) { + this.totalTimeInMillis = value; + return this; + } + + /** + * Builds a {@link MergesStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public MergesStats build() { + _checkSingleUse(); + + return new MergesStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link MergesStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + MergesStats::setupMergesStatsDeserializer + ); + + protected static void setupMergesStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::current, JsonpDeserializer.longDeserializer(), "current"); + op.add(Builder::currentDocs, JsonpDeserializer.longDeserializer(), "current_docs"); + op.add(Builder::currentSize, JsonpDeserializer.stringDeserializer(), "current_size"); + op.add(Builder::currentSizeInBytes, JsonpDeserializer.longDeserializer(), "current_size_in_bytes"); + op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); + op.add(Builder::totalAutoThrottle, JsonpDeserializer.stringDeserializer(), "total_auto_throttle"); + op.add(Builder::totalAutoThrottleInBytes, JsonpDeserializer.longDeserializer(), "total_auto_throttle_in_bytes"); + op.add(Builder::totalDocs, JsonpDeserializer.longDeserializer(), "total_docs"); + op.add(Builder::totalSize, JsonpDeserializer.stringDeserializer(), "total_size"); + op.add(Builder::totalSizeInBytes, JsonpDeserializer.longDeserializer(), "total_size_in_bytes"); + op.add(Builder::totalStoppedTime, JsonpDeserializer.stringDeserializer(), "total_stopped_time"); + op.add(Builder::totalStoppedTimeInMillis, JsonpDeserializer.longDeserializer(), "total_stopped_time_in_millis"); + op.add(Builder::totalThrottledTime, JsonpDeserializer.stringDeserializer(), "total_throttled_time"); + op.add(Builder::totalThrottledTimeInMillis, JsonpDeserializer.longDeserializer(), "total_throttled_time_in_millis"); + op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); + op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java index b1f16ea6bb..366abbca50 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NestedSortValue.java @@ -32,205 +32,206 @@ package org.opensearch.client.opensearch._types; -import org.opensearch.client.opensearch._types.query_dsl.Query; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.query_dsl.Query; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.NestedSortValue @JsonpDeserializable public class NestedSortValue implements JsonpSerializable { - @Nullable - private final Query filter; - - @Nullable - private final Integer maxChildren; + @Nullable + private final Query filter; + + @Nullable + private final Integer maxChildren; - @Nullable - private final NestedSortValue nested; - - private final String path; - - // --------------------------------------------------------------------------------------------- - - private NestedSortValue(Builder builder) { - - this.filter = builder.filter; - this.maxChildren = builder.maxChildren; - this.nested = builder.nested; - this.path = ApiTypeHelper.requireNonNull(builder.path, this, "path"); - - } - - public static NestedSortValue of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code filter} - */ - @Nullable - public final Query filter() { - return this.filter; - } - - /** - * API name: {@code max_children} - */ - @Nullable - public final Integer maxChildren() { - return this.maxChildren; - } - - /** - * API name: {@code nested} - */ - @Nullable - public final NestedSortValue nested() { - return this.nested; - } - - /** - * Required - API name: {@code path} - */ - public final String path() { - return this.path; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.filter != null) { - generator.writeKey("filter"); - this.filter.serialize(generator, mapper); - - } - if (this.maxChildren != null) { - generator.writeKey("max_children"); - generator.write(this.maxChildren); - - } - if (this.nested != null) { - generator.writeKey("nested"); - this.nested.serialize(generator, mapper); - - } - generator.writeKey("path"); - generator.write(this.path); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link NestedSortValue}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private Query filter; - - @Nullable - private Integer maxChildren; - - @Nullable - private NestedSortValue nested; - - private String path; - - /** - * API name: {@code filter} - */ - public final Builder filter(@Nullable Query value) { - this.filter = value; - return this; - } - - /** - * API name: {@code filter} - */ - public final Builder filter(Function> fn) { - return this.filter(fn.apply(new Query.Builder()).build()); - } - - /** - * API name: {@code max_children} - */ - public final Builder maxChildren(@Nullable Integer value) { - this.maxChildren = value; - return this; - } - - /** - * API name: {@code nested} - */ - public final Builder nested(@Nullable NestedSortValue value) { - this.nested = value; - return this; - } - - /** - * API name: {@code nested} - */ - public final Builder nested(Function> fn) { - return this.nested(fn.apply(new NestedSortValue.Builder()).build()); - } - - /** - * Required - API name: {@code path} - */ - public final Builder path(String value) { - this.path = value; - return this; - } - - /** - * Builds a {@link NestedSortValue}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public NestedSortValue build() { - _checkSingleUse(); - - return new NestedSortValue(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link NestedSortValue} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - NestedSortValue::setupNestedSortValueDeserializer); - - protected static void setupNestedSortValueDeserializer(ObjectDeserializer op) { - - op.add(Builder::filter, Query._DESERIALIZER, "filter"); - op.add(Builder::maxChildren, JsonpDeserializer.integerDeserializer(), "max_children"); - op.add(Builder::nested, NestedSortValue._DESERIALIZER, "nested"); - op.add(Builder::path, JsonpDeserializer.stringDeserializer(), "path"); - - } + @Nullable + private final NestedSortValue nested; + + private final String path; + + // --------------------------------------------------------------------------------------------- + + private NestedSortValue(Builder builder) { + + this.filter = builder.filter; + this.maxChildren = builder.maxChildren; + this.nested = builder.nested; + this.path = ApiTypeHelper.requireNonNull(builder.path, this, "path"); + + } + + public static NestedSortValue of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code filter} + */ + @Nullable + public final Query filter() { + return this.filter; + } + + /** + * API name: {@code max_children} + */ + @Nullable + public final Integer maxChildren() { + return this.maxChildren; + } + + /** + * API name: {@code nested} + */ + @Nullable + public final NestedSortValue nested() { + return this.nested; + } + + /** + * Required - API name: {@code path} + */ + public final String path() { + return this.path; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.filter != null) { + generator.writeKey("filter"); + this.filter.serialize(generator, mapper); + + } + if (this.maxChildren != null) { + generator.writeKey("max_children"); + generator.write(this.maxChildren); + + } + if (this.nested != null) { + generator.writeKey("nested"); + this.nested.serialize(generator, mapper); + + } + generator.writeKey("path"); + generator.write(this.path); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NestedSortValue}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private Query filter; + + @Nullable + private Integer maxChildren; + + @Nullable + private NestedSortValue nested; + + private String path; + + /** + * API name: {@code filter} + */ + public final Builder filter(@Nullable Query value) { + this.filter = value; + return this; + } + + /** + * API name: {@code filter} + */ + public final Builder filter(Function> fn) { + return this.filter(fn.apply(new Query.Builder()).build()); + } + + /** + * API name: {@code max_children} + */ + public final Builder maxChildren(@Nullable Integer value) { + this.maxChildren = value; + return this; + } + + /** + * API name: {@code nested} + */ + public final Builder nested(@Nullable NestedSortValue value) { + this.nested = value; + return this; + } + + /** + * API name: {@code nested} + */ + public final Builder nested(Function> fn) { + return this.nested(fn.apply(new NestedSortValue.Builder()).build()); + } + + /** + * Required - API name: {@code path} + */ + public final Builder path(String value) { + this.path = value; + return this; + } + + /** + * Builds a {@link NestedSortValue}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NestedSortValue build() { + _checkSingleUse(); + + return new NestedSortValue(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NestedSortValue} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + NestedSortValue::setupNestedSortValueDeserializer + ); + + protected static void setupNestedSortValueDeserializer(ObjectDeserializer op) { + + op.add(Builder::filter, Query._DESERIALIZER, "filter"); + op.add(Builder::maxChildren, JsonpDeserializer.integerDeserializer(), "max_children"); + op.add(Builder::nested, NestedSortValue._DESERIALIZER, "nested"); + op.add(Builder::path, JsonpDeserializer.stringDeserializer(), "path"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java index 53f19e7382..ac02a7b1d3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeAttributes.java @@ -32,6 +32,11 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,283 +46,279 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.NodeAttributes @JsonpDeserializable public class NodeAttributes implements JsonpSerializable { - private final Map attributes; - - private final String ephemeralId; - - @Nullable - private final String id; - - private final String name; - - private final String transportAddress; - - private final List roles; - - // --------------------------------------------------------------------------------------------- - - private NodeAttributes(Builder builder) { - - this.attributes = ApiTypeHelper.unmodifiableRequired(builder.attributes, this, "attributes"); - this.ephemeralId = ApiTypeHelper.requireNonNull(builder.ephemeralId, this, "ephemeralId"); - this.id = builder.id; - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.transportAddress = ApiTypeHelper.requireNonNull(builder.transportAddress, this, "transportAddress"); - this.roles = ApiTypeHelper.unmodifiable(builder.roles); - - } - - public static NodeAttributes of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - Lists node attributes. - *

- * API name: {@code attributes} - */ - public final Map attributes() { - return this.attributes; - } - - /** - * Required - The ephemeral ID of the node. - *

- * API name: {@code ephemeral_id} - */ - public final String ephemeralId() { - return this.ephemeralId; - } - - /** - * The unique identifier of the node. - *

- * API name: {@code id} - */ - @Nullable - public final String id() { - return this.id; - } - - /** - * Required - The unique identifier of the node. - *

- * API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * Required - The host and port where transport HTTP connections are accepted. - *

- * API name: {@code transport_address} - */ - public final String transportAddress() { - return this.transportAddress; - } - - /** - * API name: {@code roles} - */ - public final List roles() { - return this.roles; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.attributes)) { - generator.writeKey("attributes"); - generator.writeStartObject(); - for (Map.Entry item0 : this.attributes.entrySet()) { - generator.writeKey(item0.getKey()); - generator.write(item0.getValue()); - - } - generator.writeEnd(); - - } - generator.writeKey("ephemeral_id"); - generator.write(this.ephemeralId); - - if (this.id != null) { - generator.writeKey("id"); - generator.write(this.id); - - } - generator.writeKey("name"); - generator.write(this.name); - - generator.writeKey("transport_address"); - generator.write(this.transportAddress); - - if (ApiTypeHelper.isDefined(this.roles)) { - generator.writeKey("roles"); - generator.writeStartArray(); - for (NodeRole item0 : this.roles) { - item0.serialize(generator, mapper); - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link NodeAttributes}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Map attributes; - - private String ephemeralId; - - @Nullable - private String id; - - private String name; - - private String transportAddress; - - @Nullable - private List roles; - - /** - * Required - Lists node attributes. - *

- * API name: {@code attributes} - *

- * Adds all entries of map to attributes. - */ - public final Builder attributes(Map map) { - this.attributes = _mapPutAll(this.attributes, map); - return this; - } - - /** - * Required - Lists node attributes. - *

- * API name: {@code attributes} - *

- * Adds an entry to attributes. - */ - public final Builder attributes(String key, String value) { - this.attributes = _mapPut(this.attributes, key, value); - return this; - } - - /** - * Required - The ephemeral ID of the node. - *

- * API name: {@code ephemeral_id} - */ - public final Builder ephemeralId(String value) { - this.ephemeralId = value; - return this; - } - - /** - * The unique identifier of the node. - *

- * API name: {@code id} - */ - public final Builder id(@Nullable String value) { - this.id = value; - return this; - } - - /** - * Required - The unique identifier of the node. - *

- * API name: {@code name} - */ - public final Builder name(String value) { - this.name = value; - return this; - } - - /** - * Required - The host and port where transport HTTP connections are accepted. - *

- * API name: {@code transport_address} - */ - public final Builder transportAddress(String value) { - this.transportAddress = value; - return this; - } - - /** - * API name: {@code roles} - *

- * Adds all elements of list to roles. - */ - public final Builder roles(List list) { - this.roles = _listAddAll(this.roles, list); - return this; - } - - /** - * API name: {@code roles} - *

- * Adds one or more values to roles. - */ - public final Builder roles(NodeRole value, NodeRole... values) { - this.roles = _listAdd(this.roles, value, values); - return this; - } - - /** - * Builds a {@link NodeAttributes}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public NodeAttributes build() { - _checkSingleUse(); - - return new NodeAttributes(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link NodeAttributes} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - NodeAttributes::setupNodeAttributesDeserializer); - - protected static void setupNodeAttributesDeserializer(ObjectDeserializer op) { - - op.add(Builder::attributes, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), - "attributes"); - op.add(Builder::ephemeralId, JsonpDeserializer.stringDeserializer(), "ephemeral_id"); - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::transportAddress, JsonpDeserializer.stringDeserializer(), "transport_address"); - op.add(Builder::roles, JsonpDeserializer.arrayDeserializer(NodeRole._DESERIALIZER), "roles"); - - } + private final Map attributes; + + private final String ephemeralId; + + @Nullable + private final String id; + + private final String name; + + private final String transportAddress; + + private final List roles; + + // --------------------------------------------------------------------------------------------- + + private NodeAttributes(Builder builder) { + + this.attributes = ApiTypeHelper.unmodifiableRequired(builder.attributes, this, "attributes"); + this.ephemeralId = ApiTypeHelper.requireNonNull(builder.ephemeralId, this, "ephemeralId"); + this.id = builder.id; + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.transportAddress = ApiTypeHelper.requireNonNull(builder.transportAddress, this, "transportAddress"); + this.roles = ApiTypeHelper.unmodifiable(builder.roles); + + } + + public static NodeAttributes of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Lists node attributes. + *

+ * API name: {@code attributes} + */ + public final Map attributes() { + return this.attributes; + } + + /** + * Required - The ephemeral ID of the node. + *

+ * API name: {@code ephemeral_id} + */ + public final String ephemeralId() { + return this.ephemeralId; + } + + /** + * The unique identifier of the node. + *

+ * API name: {@code id} + */ + @Nullable + public final String id() { + return this.id; + } + + /** + * Required - The unique identifier of the node. + *

+ * API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - The host and port where transport HTTP connections are accepted. + *

+ * API name: {@code transport_address} + */ + public final String transportAddress() { + return this.transportAddress; + } + + /** + * API name: {@code roles} + */ + public final List roles() { + return this.roles; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.attributes)) { + generator.writeKey("attributes"); + generator.writeStartObject(); + for (Map.Entry item0 : this.attributes.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } + generator.writeKey("ephemeral_id"); + generator.write(this.ephemeralId); + + if (this.id != null) { + generator.writeKey("id"); + generator.write(this.id); + + } + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("transport_address"); + generator.write(this.transportAddress); + + if (ApiTypeHelper.isDefined(this.roles)) { + generator.writeKey("roles"); + generator.writeStartArray(); + for (NodeRole item0 : this.roles) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NodeAttributes}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Map attributes; + + private String ephemeralId; + + @Nullable + private String id; + + private String name; + + private String transportAddress; + + @Nullable + private List roles; + + /** + * Required - Lists node attributes. + *

+ * API name: {@code attributes} + *

+ * Adds all entries of map to attributes. + */ + public final Builder attributes(Map map) { + this.attributes = _mapPutAll(this.attributes, map); + return this; + } + + /** + * Required - Lists node attributes. + *

+ * API name: {@code attributes} + *

+ * Adds an entry to attributes. + */ + public final Builder attributes(String key, String value) { + this.attributes = _mapPut(this.attributes, key, value); + return this; + } + + /** + * Required - The ephemeral ID of the node. + *

+ * API name: {@code ephemeral_id} + */ + public final Builder ephemeralId(String value) { + this.ephemeralId = value; + return this; + } + + /** + * The unique identifier of the node. + *

+ * API name: {@code id} + */ + public final Builder id(@Nullable String value) { + this.id = value; + return this; + } + + /** + * Required - The unique identifier of the node. + *

+ * API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - The host and port where transport HTTP connections are accepted. + *

+ * API name: {@code transport_address} + */ + public final Builder transportAddress(String value) { + this.transportAddress = value; + return this; + } + + /** + * API name: {@code roles} + *

+ * Adds all elements of list to roles. + */ + public final Builder roles(List list) { + this.roles = _listAddAll(this.roles, list); + return this; + } + + /** + * API name: {@code roles} + *

+ * Adds one or more values to roles. + */ + public final Builder roles(NodeRole value, NodeRole... values) { + this.roles = _listAdd(this.roles, value, values); + return this; + } + + /** + * Builds a {@link NodeAttributes}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NodeAttributes build() { + _checkSingleUse(); + + return new NodeAttributes(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NodeAttributes} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + NodeAttributes::setupNodeAttributesDeserializer + ); + + protected static void setupNodeAttributesDeserializer(ObjectDeserializer op) { + + op.add(Builder::attributes, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "attributes"); + op.add(Builder::ephemeralId, JsonpDeserializer.stringDeserializer(), "ephemeral_id"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::transportAddress, JsonpDeserializer.stringDeserializer(), "transport_address"); + op.add(Builder::roles, JsonpDeserializer.arrayDeserializer(NodeRole._DESERIALIZER), "roles"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java index f00cbc9146..530603353f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java @@ -37,48 +37,48 @@ @JsonpDeserializable public enum NodeRole implements JsonEnum { - @Deprecated - Master("master"), + @Deprecated + Master("master"), - ClusterManager("cluster_manager"), + ClusterManager("cluster_manager"), - Data("data"), + Data("data"), - DataCold("data_cold"), + DataCold("data_cold"), - DataContent("data_content"), + DataContent("data_content"), - DataFrozen("data_frozen"), + DataFrozen("data_frozen"), - DataHot("data_hot"), + DataHot("data_hot"), - DataWarm("data_warm"), + DataWarm("data_warm"), - Client("client"), + Client("client"), - Ingest("ingest"), + Ingest("ingest"), - Ml("ml"), + Ml("ml"), - VotingOnly("voting_only"), + VotingOnly("voting_only"), - Transform("transform"), + Transform("transform"), - RemoteClusterClient("remote_cluster_client"), + RemoteClusterClient("remote_cluster_client"), - CoordinatingOnly("coordinating_only"), + CoordinatingOnly("coordinating_only"), - ; + ; - private final String jsonValue; + private final String jsonValue; - NodeRole(String jsonValue) { - this.jsonValue = jsonValue; - } + NodeRole(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(NodeRole.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(NodeRole.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java index 1c77110356..2e504aa517 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeShard.java @@ -32,336 +32,334 @@ package org.opensearch.client.opensearch._types; -import org.opensearch.client.opensearch.cluster.allocation_explain.UnassignedInformation; -import org.opensearch.client.opensearch.indices.stats.ShardRoutingState; +import jakarta.json.stream.JsonGenerator; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; import org.opensearch.client.json.ObjectBuilderDeserializer; import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch.cluster.allocation_explain.UnassignedInformation; +import org.opensearch.client.opensearch.indices.stats.ShardRoutingState; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.Map; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.NodeShard @JsonpDeserializable public class NodeShard implements JsonpSerializable { - private final ShardRoutingState state; - - private final boolean primary; - - @Nullable - private final String node; - - private final int shard; - - private final String index; - - private final Map allocationId; - - private final Map recoverySource; - - @Nullable - private final UnassignedInformation unassignedInfo; - - // --------------------------------------------------------------------------------------------- - - private NodeShard(Builder builder) { - - this.state = ApiTypeHelper.requireNonNull(builder.state, this, "state"); - this.primary = ApiTypeHelper.requireNonNull(builder.primary, this, "primary"); - this.node = builder.node; - this.shard = ApiTypeHelper.requireNonNull(builder.shard, this, "shard"); - this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); - this.allocationId = ApiTypeHelper.unmodifiable(builder.allocationId); - this.recoverySource = ApiTypeHelper.unmodifiable(builder.recoverySource); - this.unassignedInfo = builder.unassignedInfo; - - } - - public static NodeShard of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code state} - */ - public final ShardRoutingState state() { - return this.state; - } - - /** - * Required - API name: {@code primary} - */ - public final boolean primary() { - return this.primary; - } - - /** - * API name: {@code node} - */ - @Nullable - public final String node() { - return this.node; - } - - /** - * Required - API name: {@code shard} - */ - public final int shard() { - return this.shard; - } - - /** - * Required - API name: {@code index} - */ - public final String index() { - return this.index; - } - - /** - * API name: {@code allocation_id} - */ - public final Map allocationId() { - return this.allocationId; - } - - /** - * API name: {@code recovery_source} - */ - public final Map recoverySource() { - return this.recoverySource; - } - - /** - * API name: {@code unassigned_info} - */ - @Nullable - public final UnassignedInformation unassignedInfo() { - return this.unassignedInfo; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("state"); - this.state.serialize(generator, mapper); - generator.writeKey("primary"); - generator.write(this.primary); - - if (this.node != null) { - generator.writeKey("node"); - generator.write(this.node); - - } - generator.writeKey("shard"); - generator.write(this.shard); - - generator.writeKey("index"); - generator.write(this.index); - - if (ApiTypeHelper.isDefined(this.allocationId)) { - generator.writeKey("allocation_id"); - generator.writeStartObject(); - for (Map.Entry item0 : this.allocationId.entrySet()) { - generator.writeKey(item0.getKey()); - generator.write(item0.getValue()); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.recoverySource)) { - generator.writeKey("recovery_source"); - generator.writeStartObject(); - for (Map.Entry item0 : this.recoverySource.entrySet()) { - generator.writeKey(item0.getKey()); - generator.write(item0.getValue()); - - } - generator.writeEnd(); - - } - if (this.unassignedInfo != null) { - generator.writeKey("unassigned_info"); - this.unassignedInfo.serialize(generator, mapper); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link NodeShard}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private ShardRoutingState state; - - private Boolean primary; - - @Nullable - private String node; - - private Integer shard; - - private String index; - - @Nullable - private Map allocationId; - - @Nullable - private Map recoverySource; - - @Nullable - private UnassignedInformation unassignedInfo; - - /** - * Required - API name: {@code state} - */ - public final Builder state(ShardRoutingState value) { - this.state = value; - return this; - } - - /** - * Required - API name: {@code primary} - */ - public final Builder primary(boolean value) { - this.primary = value; - return this; - } - - /** - * API name: {@code node} - */ - public final Builder node(@Nullable String value) { - this.node = value; - return this; - } - - /** - * Required - API name: {@code shard} - */ - public final Builder shard(int value) { - this.shard = value; - return this; - } - - /** - * Required - API name: {@code index} - */ - public final Builder index(String value) { - this.index = value; - return this; - } - - /** - * API name: {@code allocation_id} - *

- * Adds all entries of map to allocationId. - */ - public final Builder allocationId(Map map) { - this.allocationId = _mapPutAll(this.allocationId, map); - return this; - } - - /** - * API name: {@code allocation_id} - *

- * Adds an entry to allocationId. - */ - public final Builder allocationId(String key, String value) { - this.allocationId = _mapPut(this.allocationId, key, value); - return this; - } - - /** - * API name: {@code recovery_source} - *

- * Adds all entries of map to recoverySource. - */ - public final Builder recoverySource(Map map) { - this.recoverySource = _mapPutAll(this.recoverySource, map); - return this; - } - - /** - * API name: {@code recovery_source} - *

- * Adds an entry to recoverySource. - */ - public final Builder recoverySource(String key, String value) { - this.recoverySource = _mapPut(this.recoverySource, key, value); - return this; - } - - /** - * API name: {@code unassigned_info} - */ - public final Builder unassignedInfo(@Nullable UnassignedInformation value) { - this.unassignedInfo = value; - return this; - } - - /** - * API name: {@code unassigned_info} - */ - public final Builder unassignedInfo( - Function> fn) { - return this.unassignedInfo(fn.apply(new UnassignedInformation.Builder()).build()); - } - - /** - * Builds a {@link NodeShard}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public NodeShard build() { - _checkSingleUse(); - - return new NodeShard(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link NodeShard} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - NodeShard::setupNodeShardDeserializer); - - protected static void setupNodeShardDeserializer(ObjectDeserializer op) { - - op.add(Builder::state, ShardRoutingState._DESERIALIZER, "state"); - op.add(Builder::primary, JsonpDeserializer.booleanDeserializer(), "primary"); - op.add(Builder::node, JsonpDeserializer.stringDeserializer(), "node"); - op.add(Builder::shard, JsonpDeserializer.integerDeserializer(), "shard"); - op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index"); - op.add(Builder::allocationId, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), - "allocation_id"); - op.add(Builder::recoverySource, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), - "recovery_source"); - op.add(Builder::unassignedInfo, UnassignedInformation._DESERIALIZER, "unassigned_info"); - - } + private final ShardRoutingState state; + + private final boolean primary; + + @Nullable + private final String node; + + private final int shard; + + private final String index; + + private final Map allocationId; + + private final Map recoverySource; + + @Nullable + private final UnassignedInformation unassignedInfo; + + // --------------------------------------------------------------------------------------------- + + private NodeShard(Builder builder) { + + this.state = ApiTypeHelper.requireNonNull(builder.state, this, "state"); + this.primary = ApiTypeHelper.requireNonNull(builder.primary, this, "primary"); + this.node = builder.node; + this.shard = ApiTypeHelper.requireNonNull(builder.shard, this, "shard"); + this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); + this.allocationId = ApiTypeHelper.unmodifiable(builder.allocationId); + this.recoverySource = ApiTypeHelper.unmodifiable(builder.recoverySource); + this.unassignedInfo = builder.unassignedInfo; + + } + + public static NodeShard of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code state} + */ + public final ShardRoutingState state() { + return this.state; + } + + /** + * Required - API name: {@code primary} + */ + public final boolean primary() { + return this.primary; + } + + /** + * API name: {@code node} + */ + @Nullable + public final String node() { + return this.node; + } + + /** + * Required - API name: {@code shard} + */ + public final int shard() { + return this.shard; + } + + /** + * Required - API name: {@code index} + */ + public final String index() { + return this.index; + } + + /** + * API name: {@code allocation_id} + */ + public final Map allocationId() { + return this.allocationId; + } + + /** + * API name: {@code recovery_source} + */ + public final Map recoverySource() { + return this.recoverySource; + } + + /** + * API name: {@code unassigned_info} + */ + @Nullable + public final UnassignedInformation unassignedInfo() { + return this.unassignedInfo; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("state"); + this.state.serialize(generator, mapper); + generator.writeKey("primary"); + generator.write(this.primary); + + if (this.node != null) { + generator.writeKey("node"); + generator.write(this.node); + + } + generator.writeKey("shard"); + generator.write(this.shard); + + generator.writeKey("index"); + generator.write(this.index); + + if (ApiTypeHelper.isDefined(this.allocationId)) { + generator.writeKey("allocation_id"); + generator.writeStartObject(); + for (Map.Entry item0 : this.allocationId.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.recoverySource)) { + generator.writeKey("recovery_source"); + generator.writeStartObject(); + for (Map.Entry item0 : this.recoverySource.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } + if (this.unassignedInfo != null) { + generator.writeKey("unassigned_info"); + this.unassignedInfo.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NodeShard}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private ShardRoutingState state; + + private Boolean primary; + + @Nullable + private String node; + + private Integer shard; + + private String index; + + @Nullable + private Map allocationId; + + @Nullable + private Map recoverySource; + + @Nullable + private UnassignedInformation unassignedInfo; + + /** + * Required - API name: {@code state} + */ + public final Builder state(ShardRoutingState value) { + this.state = value; + return this; + } + + /** + * Required - API name: {@code primary} + */ + public final Builder primary(boolean value) { + this.primary = value; + return this; + } + + /** + * API name: {@code node} + */ + public final Builder node(@Nullable String value) { + this.node = value; + return this; + } + + /** + * Required - API name: {@code shard} + */ + public final Builder shard(int value) { + this.shard = value; + return this; + } + + /** + * Required - API name: {@code index} + */ + public final Builder index(String value) { + this.index = value; + return this; + } + + /** + * API name: {@code allocation_id} + *

+ * Adds all entries of map to allocationId. + */ + public final Builder allocationId(Map map) { + this.allocationId = _mapPutAll(this.allocationId, map); + return this; + } + + /** + * API name: {@code allocation_id} + *

+ * Adds an entry to allocationId. + */ + public final Builder allocationId(String key, String value) { + this.allocationId = _mapPut(this.allocationId, key, value); + return this; + } + + /** + * API name: {@code recovery_source} + *

+ * Adds all entries of map to recoverySource. + */ + public final Builder recoverySource(Map map) { + this.recoverySource = _mapPutAll(this.recoverySource, map); + return this; + } + + /** + * API name: {@code recovery_source} + *

+ * Adds an entry to recoverySource. + */ + public final Builder recoverySource(String key, String value) { + this.recoverySource = _mapPut(this.recoverySource, key, value); + return this; + } + + /** + * API name: {@code unassigned_info} + */ + public final Builder unassignedInfo(@Nullable UnassignedInformation value) { + this.unassignedInfo = value; + return this; + } + + /** + * API name: {@code unassigned_info} + */ + public final Builder unassignedInfo(Function> fn) { + return this.unassignedInfo(fn.apply(new UnassignedInformation.Builder()).build()); + } + + /** + * Builds a {@link NodeShard}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NodeShard build() { + _checkSingleUse(); + + return new NodeShard(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NodeShard} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + NodeShard::setupNodeShardDeserializer + ); + + protected static void setupNodeShardDeserializer(ObjectDeserializer op) { + + op.add(Builder::state, ShardRoutingState._DESERIALIZER, "state"); + op.add(Builder::primary, JsonpDeserializer.booleanDeserializer(), "primary"); + op.add(Builder::node, JsonpDeserializer.stringDeserializer(), "node"); + op.add(Builder::shard, JsonpDeserializer.integerDeserializer(), "shard"); + op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index"); + op.add(Builder::allocationId, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "allocation_id"); + op.add(Builder::recoverySource, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "recovery_source"); + op.add(Builder::unassignedInfo, UnassignedInformation._DESERIALIZER, "unassigned_info"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java index ea17496835..61bc2e5fc1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeStatistics.java @@ -32,6 +32,10 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,211 +45,209 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.NodeStatistics @JsonpDeserializable public class NodeStatistics implements JsonpSerializable { - private final List failures; - - private final int total; - - private final int successful; + private final List failures; + + private final int total; + + private final int successful; - private final int failed; + private final int failed; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private NodeStatistics(Builder builder) { - - this.failures = ApiTypeHelper.unmodifiable(builder.failures); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - this.successful = ApiTypeHelper.requireNonNull(builder.successful, this, "successful"); - this.failed = ApiTypeHelper.requireNonNull(builder.failed, this, "failed"); - - } - - public static NodeStatistics of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code failures} - */ - public final List failures() { - return this.failures; - } - - /** - * Required - Total number of nodes selected by the request. - *

- * API name: {@code total} - */ - public final int total() { - return this.total; - } - - /** - * Required - Number of nodes that responded successfully to the request. - *

- * API name: {@code successful} - */ - public final int successful() { - return this.successful; - } - - /** - * Required - Number of nodes that rejected the request or failed to respond. If - * this value is not 0, a reason for the rejection or failure is included in the - * response. - *

- * API name: {@code failed} - */ - public final int failed() { - return this.failed; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.failures)) { - generator.writeKey("failures"); - generator.writeStartArray(); - for (ErrorCause item0 : this.failures) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("total"); - generator.write(this.total); - - generator.writeKey("successful"); - generator.write(this.successful); - - generator.writeKey("failed"); - generator.write(this.failed); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link NodeStatistics}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private List failures; - - private Integer total; - - private Integer successful; - - private Integer failed; - - /** - * API name: {@code failures} - *

- * Adds all elements of list to failures. - */ - public final Builder failures(List list) { - this.failures = _listAddAll(this.failures, list); - return this; - } - - /** - * API name: {@code failures} - *

- * Adds one or more values to failures. - */ - public final Builder failures(ErrorCause value, ErrorCause... values) { - this.failures = _listAdd(this.failures, value, values); - return this; - } - - /** - * API name: {@code failures} - *

- * Adds a value to failures using a builder lambda. - */ - public final Builder failures(Function> fn) { - return failures(fn.apply(new ErrorCause.Builder()).build()); - } - - /** - * Required - Total number of nodes selected by the request. - *

- * API name: {@code total} - */ - public final Builder total(int value) { - this.total = value; - return this; - } - - /** - * Required - Number of nodes that responded successfully to the request. - *

- * API name: {@code successful} - */ - public final Builder successful(int value) { - this.successful = value; - return this; - } - - /** - * Required - Number of nodes that rejected the request or failed to respond. If - * this value is not 0, a reason for the rejection or failure is included in the - * response. - *

- * API name: {@code failed} - */ - public final Builder failed(int value) { - this.failed = value; - return this; - } - - /** - * Builds a {@link NodeStatistics}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public NodeStatistics build() { - _checkSingleUse(); - - return new NodeStatistics(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link NodeStatistics} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - NodeStatistics::setupNodeStatisticsDeserializer); - - protected static void setupNodeStatisticsDeserializer(ObjectDeserializer op) { - - op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "failures"); - op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total"); - op.add(Builder::successful, JsonpDeserializer.integerDeserializer(), "successful"); - op.add(Builder::failed, JsonpDeserializer.integerDeserializer(), "failed"); - - } + private NodeStatistics(Builder builder) { + + this.failures = ApiTypeHelper.unmodifiable(builder.failures); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.successful = ApiTypeHelper.requireNonNull(builder.successful, this, "successful"); + this.failed = ApiTypeHelper.requireNonNull(builder.failed, this, "failed"); + + } + + public static NodeStatistics of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code failures} + */ + public final List failures() { + return this.failures; + } + + /** + * Required - Total number of nodes selected by the request. + *

+ * API name: {@code total} + */ + public final int total() { + return this.total; + } + + /** + * Required - Number of nodes that responded successfully to the request. + *

+ * API name: {@code successful} + */ + public final int successful() { + return this.successful; + } + + /** + * Required - Number of nodes that rejected the request or failed to respond. If + * this value is not 0, a reason for the rejection or failure is included in the + * response. + *

+ * API name: {@code failed} + */ + public final int failed() { + return this.failed; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.failures)) { + generator.writeKey("failures"); + generator.writeStartArray(); + for (ErrorCause item0 : this.failures) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("total"); + generator.write(this.total); + + generator.writeKey("successful"); + generator.write(this.successful); + + generator.writeKey("failed"); + generator.write(this.failed); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NodeStatistics}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private List failures; + + private Integer total; + + private Integer successful; + + private Integer failed; + + /** + * API name: {@code failures} + *

+ * Adds all elements of list to failures. + */ + public final Builder failures(List list) { + this.failures = _listAddAll(this.failures, list); + return this; + } + + /** + * API name: {@code failures} + *

+ * Adds one or more values to failures. + */ + public final Builder failures(ErrorCause value, ErrorCause... values) { + this.failures = _listAdd(this.failures, value, values); + return this; + } + + /** + * API name: {@code failures} + *

+ * Adds a value to failures using a builder lambda. + */ + public final Builder failures(Function> fn) { + return failures(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * Required - Total number of nodes selected by the request. + *

+ * API name: {@code total} + */ + public final Builder total(int value) { + this.total = value; + return this; + } + + /** + * Required - Number of nodes that responded successfully to the request. + *

+ * API name: {@code successful} + */ + public final Builder successful(int value) { + this.successful = value; + return this; + } + + /** + * Required - Number of nodes that rejected the request or failed to respond. If + * this value is not 0, a reason for the rejection or failure is included in the + * response. + *

+ * API name: {@code failed} + */ + public final Builder failed(int value) { + this.failed = value; + return this; + } + + /** + * Builds a {@link NodeStatistics}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NodeStatistics build() { + _checkSingleUse(); + + return new NodeStatistics(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NodeStatistics} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + NodeStatistics::setupNodeStatisticsDeserializer + ); + + protected static void setupNodeStatisticsDeserializer(ObjectDeserializer op) { + + op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "failures"); + op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total"); + op.add(Builder::successful, JsonpDeserializer.integerDeserializer(), "successful"); + op.add(Builder::failed, JsonpDeserializer.integerDeserializer(), "failed"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java index e415250039..0a3151caa2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpType.java @@ -37,21 +37,21 @@ @JsonpDeserializable public enum OpType implements JsonEnum { - Index("index"), + Index("index"), - Create("create"), + Create("create"), - ; + ; - private final String jsonValue; + private final String jsonValue; - OpType(String jsonValue) { - this.jsonValue = jsonValue; - } + OpType(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(OpType.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(OpType.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchException.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchException.java index 993d68989d..e2addab959 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchException.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchException.java @@ -42,32 +42,32 @@ */ public class OpenSearchException extends RuntimeException { - private final ErrorResponse response; + private final ErrorResponse response; - public OpenSearchException(ErrorResponse response) { - super("Request failed: [" + response.error().type() + "] " + response.error().reason()); - this.response = response; - } + public OpenSearchException(ErrorResponse response) { + super("Request failed: [" + response.error().type() + "] " + response.error().reason()); + this.response = response; + } - /** - * The error response sent by Elasticsearch - */ - public ErrorResponse response() { - return this.response; - } + /** + * The error response sent by Elasticsearch + */ + public ErrorResponse response() { + return this.response; + } - /** - * The cause of the error. Shortcut for {@code response().error()}. - */ - public ErrorCause error() { - return this.response.error(); - } + /** + * The cause of the error. Shortcut for {@code response().error()}. + */ + public ErrorCause error() { + return this.response.error(); + } - /** - * Status code returned by Elasticsearch. Shortcut for - * {@code response().status()}. - */ - public int status() { - return this.response.status(); - } + /** + * Status code returned by Elasticsearch. Shortcut for + * {@code response().status()}. + */ + public int status() { + return this.response.status(); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java index 3995461826..12f9e60a7e 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,310 +43,313 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; @JsonpDeserializable public final class OpenSearchVersionInfo implements JsonpSerializable { - private final String buildDate; - - private final String buildFlavor; - - private final String buildHash; - - private final boolean buildSnapshot; - - private final String buildType; - - private final String distribution; - - private final String luceneVersion; - - private final String minimumIndexCompatibilityVersion; - - private final String minimumWireCompatibilityVersion; - - private final String number; - - // --------------------------------------------------------------------------------------------- - - private OpenSearchVersionInfo(Builder builder) { - - this.buildDate = ApiTypeHelper.requireNonNull(builder.buildDate, this, "buildDate"); - this.buildFlavor = builder.buildFlavor; - this.buildHash = ApiTypeHelper.requireNonNull(builder.buildHash, this, "buildHash"); - this.buildSnapshot = ApiTypeHelper.requireNonNull(builder.buildSnapshot, this, "buildSnapshot"); - this.buildType = ApiTypeHelper.requireNonNull(builder.buildType, this, "buildType"); - this.distribution = ApiTypeHelper.requireNonNull(builder.distribution, this, "distribution"); - this.luceneVersion = ApiTypeHelper.requireNonNull(builder.luceneVersion, this, "luceneVersion"); - this.minimumIndexCompatibilityVersion = ApiTypeHelper.requireNonNull(builder.minimumIndexCompatibilityVersion, - this, "minimumIndexCompatibilityVersion"); - this.minimumWireCompatibilityVersion = ApiTypeHelper.requireNonNull(builder.minimumWireCompatibilityVersion, - this, "minimumWireCompatibilityVersion"); - this.number = ApiTypeHelper.requireNonNull(builder.number, this, "number"); - - } - - public static OpenSearchVersionInfo of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code build_date} - */ - public String buildDate() { - return this.buildDate; - } - - /** - * API name: {@code build_flavor} - */ - public String buildFlavor() { - return this.buildFlavor; - } - - /** - * API name: {@code build_hash} - */ - public String buildHash() { - return this.buildHash; - } - - /** - * Required - API name: {@code build_snapshot} - */ - public boolean buildSnapshot() { - return this.buildSnapshot; - } - - /** - * Required - API name: {@code build_type} - */ - public String buildType() { - return this.buildType; - } - - /** - * API name: {@code distribution} - */ - public String distribution() { - return this.distribution; - } - - /** - * API name: {@code lucene_version} - */ - public String luceneVersion() { - return this.luceneVersion; - } + private final String buildDate; + + private final String buildFlavor; + + private final String buildHash; + + private final boolean buildSnapshot; + + private final String buildType; + + private final String distribution; + + private final String luceneVersion; + + private final String minimumIndexCompatibilityVersion; + + private final String minimumWireCompatibilityVersion; + + private final String number; + + // --------------------------------------------------------------------------------------------- + + private OpenSearchVersionInfo(Builder builder) { + + this.buildDate = ApiTypeHelper.requireNonNull(builder.buildDate, this, "buildDate"); + this.buildFlavor = builder.buildFlavor; + this.buildHash = ApiTypeHelper.requireNonNull(builder.buildHash, this, "buildHash"); + this.buildSnapshot = ApiTypeHelper.requireNonNull(builder.buildSnapshot, this, "buildSnapshot"); + this.buildType = ApiTypeHelper.requireNonNull(builder.buildType, this, "buildType"); + this.distribution = ApiTypeHelper.requireNonNull(builder.distribution, this, "distribution"); + this.luceneVersion = ApiTypeHelper.requireNonNull(builder.luceneVersion, this, "luceneVersion"); + this.minimumIndexCompatibilityVersion = ApiTypeHelper.requireNonNull( + builder.minimumIndexCompatibilityVersion, + this, + "minimumIndexCompatibilityVersion" + ); + this.minimumWireCompatibilityVersion = ApiTypeHelper.requireNonNull( + builder.minimumWireCompatibilityVersion, + this, + "minimumWireCompatibilityVersion" + ); + this.number = ApiTypeHelper.requireNonNull(builder.number, this, "number"); + + } + + public static OpenSearchVersionInfo of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code build_date} + */ + public String buildDate() { + return this.buildDate; + } + + /** + * API name: {@code build_flavor} + */ + public String buildFlavor() { + return this.buildFlavor; + } + + /** + * API name: {@code build_hash} + */ + public String buildHash() { + return this.buildHash; + } + + /** + * Required - API name: {@code build_snapshot} + */ + public boolean buildSnapshot() { + return this.buildSnapshot; + } + + /** + * Required - API name: {@code build_type} + */ + public String buildType() { + return this.buildType; + } - /** - * Required - API name: {@code minimum_index_compatibility_version} - */ - public String minimumIndexCompatibilityVersion() { - return this.minimumIndexCompatibilityVersion; - } + /** + * API name: {@code distribution} + */ + public String distribution() { + return this.distribution; + } - /** - * Required - API name: {@code minimum_wire_compatibility_version} - */ - public String minimumWireCompatibilityVersion() { - return this.minimumWireCompatibilityVersion; - } + /** + * API name: {@code lucene_version} + */ + public String luceneVersion() { + return this.luceneVersion; + } - /** - * Required - API name: {@code number} - */ - public String number() { - return this.number; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("build_date"); - generator.write(this.buildDate); - - generator.writeKey("build_flavor"); - generator.write(this.buildFlavor); - - generator.writeKey("build_hash"); - generator.write(this.buildHash); - - generator.writeKey("build_snapshot"); - generator.write(this.buildSnapshot); - - generator.writeKey("build_type"); - generator.write(this.buildType); - - generator.writeKey("distribution"); - generator.write(this.distribution); - - generator.writeKey("lucene_version"); - generator.write(this.luceneVersion); - - generator.writeKey("minimum_index_compatibility_version"); - generator.write(this.minimumIndexCompatibilityVersion); - - generator.writeKey("minimum_wire_compatibility_version"); - generator.write(this.minimumWireCompatibilityVersion); - - generator.writeKey("number"); - generator.write(this.number); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link OpenSearchVersionInfo}. - */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String buildDate; - - private String buildFlavor; - - private String buildHash; - - private Boolean buildSnapshot; - - private String buildType; - - private String distribution; - - private String luceneVersion; - - private String minimumIndexCompatibilityVersion; - - private String minimumWireCompatibilityVersion; - - private String number; - - /** - * Required - API name: {@code build_date} - */ - public final Builder buildDate(String value) { - this.buildDate = value; - return this; - } - - /** - * API name: {@code build_flavor} - */ - public Builder buildFlavor(String value) { - this.buildFlavor = value; - return this; - } - - /** - * API name: {@code build_hash} - */ - public final Builder buildHash(String value) { - this.buildHash = value; - return this; - } - - /** - * Required - API name: {@code build_snapshot} - */ - public final Builder buildSnapshot(boolean value) { - this.buildSnapshot = value; - return this; - } - - /** - * Required - API name: {@code build_type} - */ - public final Builder buildType(String value) { - this.buildType = value; - return this; - } - - /** - * API name: {@code distribution} - */ - public Builder distribution(String value) { - this.distribution = value; - return this; - } - - /** - * API name: {@code lucene_version} - */ - public final Builder luceneVersion(String value) { - this.luceneVersion = value; - return this; - } - - /** - * Required - API name: {@code minimum_index_compatibility_version} - */ - public final Builder minimumIndexCompatibilityVersion(String value) { - this.minimumIndexCompatibilityVersion = value; - return this; - } - - /** - * Required - API name: {@code minimum_wire_compatibility_version} - */ - public final Builder minimumWireCompatibilityVersion(String value) { - this.minimumWireCompatibilityVersion = value; - return this; - } - - /** - * Required - API name: {@code number} - */ - public final Builder number(String value) { - this.number = value; - return this; - } - - /** - * Builds a {@link OpenSearchVersionInfo}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - - public OpenSearchVersionInfo build() { - _checkSingleUse(); - return new OpenSearchVersionInfo(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for OpenSearchVersionInfo - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, OpenSearchVersionInfo::setupOpenSearchVersionInfoDeserializer); - - protected static void setupOpenSearchVersionInfoDeserializer( - ObjectDeserializer op) { - - op.add(Builder::buildDate, JsonpDeserializer.stringDeserializer(), "build_date"); - op.add(Builder::buildFlavor, JsonpDeserializer.stringDeserializer(), "build_flavor"); - op.add(Builder::buildHash, JsonpDeserializer.stringDeserializer(), "build_hash"); - op.add(Builder::buildSnapshot, JsonpDeserializer.booleanDeserializer(), "build_snapshot"); - op.add(Builder::buildType, JsonpDeserializer.stringDeserializer(), "build_type"); - op.add(Builder::distribution, JsonpDeserializer.stringDeserializer(), "distribution"); - op.add(Builder::luceneVersion, JsonpDeserializer.stringDeserializer(), "lucene_version"); - op.add(Builder::minimumIndexCompatibilityVersion, JsonpDeserializer.stringDeserializer(), - "minimum_index_compatibility_version"); - op.add(Builder::minimumWireCompatibilityVersion, JsonpDeserializer.stringDeserializer(), - "minimum_wire_compatibility_version"); - op.add(Builder::number, JsonpDeserializer.stringDeserializer(), "number"); - - } + /** + * Required - API name: {@code minimum_index_compatibility_version} + */ + public String minimumIndexCompatibilityVersion() { + return this.minimumIndexCompatibilityVersion; + } + + /** + * Required - API name: {@code minimum_wire_compatibility_version} + */ + public String minimumWireCompatibilityVersion() { + return this.minimumWireCompatibilityVersion; + } + + /** + * Required - API name: {@code number} + */ + public String number() { + return this.number; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("build_date"); + generator.write(this.buildDate); + + generator.writeKey("build_flavor"); + generator.write(this.buildFlavor); + + generator.writeKey("build_hash"); + generator.write(this.buildHash); + + generator.writeKey("build_snapshot"); + generator.write(this.buildSnapshot); + + generator.writeKey("build_type"); + generator.write(this.buildType); + + generator.writeKey("distribution"); + generator.write(this.distribution); + + generator.writeKey("lucene_version"); + generator.write(this.luceneVersion); + + generator.writeKey("minimum_index_compatibility_version"); + generator.write(this.minimumIndexCompatibilityVersion); + + generator.writeKey("minimum_wire_compatibility_version"); + generator.write(this.minimumWireCompatibilityVersion); + + generator.writeKey("number"); + generator.write(this.number); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link OpenSearchVersionInfo}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String buildDate; + + private String buildFlavor; + + private String buildHash; + + private Boolean buildSnapshot; + + private String buildType; + + private String distribution; + + private String luceneVersion; + + private String minimumIndexCompatibilityVersion; + + private String minimumWireCompatibilityVersion; + + private String number; + + /** + * Required - API name: {@code build_date} + */ + public final Builder buildDate(String value) { + this.buildDate = value; + return this; + } + + /** + * API name: {@code build_flavor} + */ + public Builder buildFlavor(String value) { + this.buildFlavor = value; + return this; + } + + /** + * API name: {@code build_hash} + */ + public final Builder buildHash(String value) { + this.buildHash = value; + return this; + } + + /** + * Required - API name: {@code build_snapshot} + */ + public final Builder buildSnapshot(boolean value) { + this.buildSnapshot = value; + return this; + } + + /** + * Required - API name: {@code build_type} + */ + public final Builder buildType(String value) { + this.buildType = value; + return this; + } + + /** + * API name: {@code distribution} + */ + public Builder distribution(String value) { + this.distribution = value; + return this; + } + + /** + * API name: {@code lucene_version} + */ + public final Builder luceneVersion(String value) { + this.luceneVersion = value; + return this; + } + + /** + * Required - API name: {@code minimum_index_compatibility_version} + */ + public final Builder minimumIndexCompatibilityVersion(String value) { + this.minimumIndexCompatibilityVersion = value; + return this; + } + + /** + * Required - API name: {@code minimum_wire_compatibility_version} + */ + public final Builder minimumWireCompatibilityVersion(String value) { + this.minimumWireCompatibilityVersion = value; + return this; + } + + /** + * Required - API name: {@code number} + */ + public final Builder number(String value) { + this.number = value; + return this; + } + + /** + * Builds a {@link OpenSearchVersionInfo}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + + public OpenSearchVersionInfo build() { + _checkSingleUse(); + return new OpenSearchVersionInfo(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for OpenSearchVersionInfo + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + OpenSearchVersionInfo::setupOpenSearchVersionInfoDeserializer + ); + + protected static void setupOpenSearchVersionInfoDeserializer(ObjectDeserializer op) { + + op.add(Builder::buildDate, JsonpDeserializer.stringDeserializer(), "build_date"); + op.add(Builder::buildFlavor, JsonpDeserializer.stringDeserializer(), "build_flavor"); + op.add(Builder::buildHash, JsonpDeserializer.stringDeserializer(), "build_hash"); + op.add(Builder::buildSnapshot, JsonpDeserializer.booleanDeserializer(), "build_snapshot"); + op.add(Builder::buildType, JsonpDeserializer.stringDeserializer(), "build_type"); + op.add(Builder::distribution, JsonpDeserializer.stringDeserializer(), "distribution"); + op.add(Builder::luceneVersion, JsonpDeserializer.stringDeserializer(), "lucene_version"); + op.add(Builder::minimumIndexCompatibilityVersion, JsonpDeserializer.stringDeserializer(), "minimum_index_compatibility_version"); + op.add(Builder::minimumWireCompatibilityVersion, JsonpDeserializer.stringDeserializer(), "minimum_wire_compatibility_version"); + op.add(Builder::number, JsonpDeserializer.stringDeserializer(), "number"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java index d421b224fe..9ed07791d4 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/PluginStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,282 +44,278 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.function.Function; // typedef: _types.PluginStats @JsonpDeserializable public class PluginStats implements JsonpSerializable { - private final String classname; - - private final String description; - - private final String opensearchVersion; - - private final List extendedPlugins; - - private final boolean hasNativeController; - - private final String javaVersion; - - private final String name; - - private final String version; - - // --------------------------------------------------------------------------------------------- - - private PluginStats(Builder builder) { - - this.classname = ApiTypeHelper.requireNonNull(builder.classname, this, "classname"); - this.description = ApiTypeHelper.requireNonNull(builder.description, this, "description"); - this.opensearchVersion = ApiTypeHelper.requireNonNull(builder.opensearchVersion, this, - "opensearchVersion"); - this.extendedPlugins = ApiTypeHelper.unmodifiableRequired(builder.extendedPlugins, this, "extendedPlugins"); - this.hasNativeController = ApiTypeHelper.requireNonNull(builder.hasNativeController, this, - "hasNativeController"); - this.javaVersion = ApiTypeHelper.requireNonNull(builder.javaVersion, this, "javaVersion"); - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version"); - - } - - public static PluginStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code classname} - */ - public final String classname() { - return this.classname; - } - - /** - * Required - API name: {@code description} - */ - public final String description() { - return this.description; - } + private final String classname; + + private final String description; + + private final String opensearchVersion; + + private final List extendedPlugins; + + private final boolean hasNativeController; + + private final String javaVersion; + + private final String name; + + private final String version; + + // --------------------------------------------------------------------------------------------- + + private PluginStats(Builder builder) { + + this.classname = ApiTypeHelper.requireNonNull(builder.classname, this, "classname"); + this.description = ApiTypeHelper.requireNonNull(builder.description, this, "description"); + this.opensearchVersion = ApiTypeHelper.requireNonNull(builder.opensearchVersion, this, "opensearchVersion"); + this.extendedPlugins = ApiTypeHelper.unmodifiableRequired(builder.extendedPlugins, this, "extendedPlugins"); + this.hasNativeController = ApiTypeHelper.requireNonNull(builder.hasNativeController, this, "hasNativeController"); + this.javaVersion = ApiTypeHelper.requireNonNull(builder.javaVersion, this, "javaVersion"); + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version"); + + } + + public static PluginStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code classname} + */ + public final String classname() { + return this.classname; + } + + /** + * Required - API name: {@code description} + */ + public final String description() { + return this.description; + } - /** - * API name: {@code opensearch_version} - */ - public String opensearchVersion() { - return this.opensearchVersion; - } + /** + * API name: {@code opensearch_version} + */ + public String opensearchVersion() { + return this.opensearchVersion; + } - /** - * Required - API name: {@code extended_plugins} - */ - public final List extendedPlugins() { - return this.extendedPlugins; - } + /** + * Required - API name: {@code extended_plugins} + */ + public final List extendedPlugins() { + return this.extendedPlugins; + } - /** - * Required - API name: {@code has_native_controller} - */ - public final boolean hasNativeController() { - return this.hasNativeController; - } + /** + * Required - API name: {@code has_native_controller} + */ + public final boolean hasNativeController() { + return this.hasNativeController; + } - /** - * Required - API name: {@code java_version} - */ - public final String javaVersion() { - return this.javaVersion; - } + /** + * Required - API name: {@code java_version} + */ + public final String javaVersion() { + return this.javaVersion; + } - /** - * Required - API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * Required - API name: {@code version} - */ - public final String version() { - return this.version; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("classname"); - generator.write(this.classname); - - generator.writeKey("description"); - generator.write(this.description); - - generator.writeKey("opensearch_version"); - generator.write(this.opensearchVersion); - - if (ApiTypeHelper.isDefined(this.extendedPlugins)) { - generator.writeKey("extended_plugins"); - generator.writeStartArray(); - for (String item0 : this.extendedPlugins) { - generator.write(item0); - - } - generator.writeEnd(); - - } - generator.writeKey("has_native_controller"); - generator.write(this.hasNativeController); - - generator.writeKey("java_version"); - generator.write(this.javaVersion); - - generator.writeKey("name"); - generator.write(this.name); - - generator.writeKey("version"); - generator.write(this.version); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link PluginStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private String classname; - - private String description; - - private String opensearchVersion; - - private List extendedPlugins; - - private Boolean hasNativeController; - - private String javaVersion; - - private String name; - - private String version; - - /** - * Required - API name: {@code classname} - */ - public final Builder classname(String value) { - this.classname = value; - return this; - } - - /** - * Required - API name: {@code description} - */ - public final Builder description(String value) { - this.description = value; - return this; - } - - /** - * Required - API name: {@code opensearch_version} - */ - public final Builder opensearchVersion(String value) { - this.opensearchVersion = value; - return this; - } - - /** - * Required - API name: {@code extended_plugins} - *

- * Adds all elements of list to extendedPlugins. - */ - public final Builder extendedPlugins(List list) { - this.extendedPlugins = _listAddAll(this.extendedPlugins, list); - return this; - } - - /** - * Required - API name: {@code extended_plugins} - *

- * Adds one or more values to extendedPlugins. - */ - public final Builder extendedPlugins(String value, String... values) { - this.extendedPlugins = _listAdd(this.extendedPlugins, value, values); - return this; - } - - /** - * Required - API name: {@code has_native_controller} - */ - public final Builder hasNativeController(boolean value) { - this.hasNativeController = value; - return this; - } - - /** - * Required - API name: {@code java_version} - */ - public final Builder javaVersion(String value) { - this.javaVersion = value; - return this; - } - - /** - * Required - API name: {@code name} - */ - public final Builder name(String value) { - this.name = value; - return this; - } - - /** - * Required - API name: {@code version} - */ - public final Builder version(String value) { - this.version = value; - return this; - } - - /** - * Builds a {@link PluginStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public PluginStats build() { - _checkSingleUse(); - - return new PluginStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link PluginStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - PluginStats::setupPluginStatsDeserializer); - - protected static void setupPluginStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::classname, JsonpDeserializer.stringDeserializer(), "classname"); - op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); - op.add(Builder::opensearchVersion, JsonpDeserializer.stringDeserializer(), "opensearch_version"); - op.add(Builder::extendedPlugins, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "extended_plugins"); - op.add(Builder::hasNativeController, JsonpDeserializer.booleanDeserializer(), "has_native_controller"); - op.add(Builder::javaVersion, JsonpDeserializer.stringDeserializer(), "java_version"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::version, JsonpDeserializer.stringDeserializer(), "version"); - - } + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - API name: {@code version} + */ + public final String version() { + return this.version; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("classname"); + generator.write(this.classname); + + generator.writeKey("description"); + generator.write(this.description); + + generator.writeKey("opensearch_version"); + generator.write(this.opensearchVersion); + + if (ApiTypeHelper.isDefined(this.extendedPlugins)) { + generator.writeKey("extended_plugins"); + generator.writeStartArray(); + for (String item0 : this.extendedPlugins) { + generator.write(item0); + + } + generator.writeEnd(); + + } + generator.writeKey("has_native_controller"); + generator.write(this.hasNativeController); + + generator.writeKey("java_version"); + generator.write(this.javaVersion); + + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("version"); + generator.write(this.version); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PluginStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String classname; + + private String description; + + private String opensearchVersion; + + private List extendedPlugins; + + private Boolean hasNativeController; + + private String javaVersion; + + private String name; + + private String version; + + /** + * Required - API name: {@code classname} + */ + public final Builder classname(String value) { + this.classname = value; + return this; + } + + /** + * Required - API name: {@code description} + */ + public final Builder description(String value) { + this.description = value; + return this; + } + + /** + * Required - API name: {@code opensearch_version} + */ + public final Builder opensearchVersion(String value) { + this.opensearchVersion = value; + return this; + } + + /** + * Required - API name: {@code extended_plugins} + *

+ * Adds all elements of list to extendedPlugins. + */ + public final Builder extendedPlugins(List list) { + this.extendedPlugins = _listAddAll(this.extendedPlugins, list); + return this; + } + + /** + * Required - API name: {@code extended_plugins} + *

+ * Adds one or more values to extendedPlugins. + */ + public final Builder extendedPlugins(String value, String... values) { + this.extendedPlugins = _listAdd(this.extendedPlugins, value, values); + return this; + } + + /** + * Required - API name: {@code has_native_controller} + */ + public final Builder hasNativeController(boolean value) { + this.hasNativeController = value; + return this; + } + + /** + * Required - API name: {@code java_version} + */ + public final Builder javaVersion(String value) { + this.javaVersion = value; + return this; + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - API name: {@code version} + */ + public final Builder version(String value) { + this.version = value; + return this; + } + + /** + * Builds a {@link PluginStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PluginStats build() { + _checkSingleUse(); + + return new PluginStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PluginStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + PluginStats::setupPluginStatsDeserializer + ); + + protected static void setupPluginStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::classname, JsonpDeserializer.stringDeserializer(), "classname"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::opensearchVersion, JsonpDeserializer.stringDeserializer(), "opensearch_version"); + op.add(Builder::extendedPlugins, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "extended_plugins"); + op.add(Builder::hasNativeController, JsonpDeserializer.booleanDeserializer(), "has_native_controller"); + op.add(Builder::javaVersion, JsonpDeserializer.stringDeserializer(), "java_version"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::version, JsonpDeserializer.stringDeserializer(), "version"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java index 6b3df16c7e..d5ba4b1224 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/QueryCacheStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,266 +44,265 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.QueryCacheStats @JsonpDeserializable public class QueryCacheStats implements JsonpSerializable { - private final int cacheCount; - - private final int cacheSize; - - private final int evictions; - - private final int hitCount; - - @Nullable - private final String memorySize; - - private final int memorySizeInBytes; - - private final int missCount; - - private final int totalCount; - - // --------------------------------------------------------------------------------------------- - - private QueryCacheStats(Builder builder) { - - this.cacheCount = ApiTypeHelper.requireNonNull(builder.cacheCount, this, "cacheCount"); - this.cacheSize = ApiTypeHelper.requireNonNull(builder.cacheSize, this, "cacheSize"); - this.evictions = ApiTypeHelper.requireNonNull(builder.evictions, this, "evictions"); - this.hitCount = ApiTypeHelper.requireNonNull(builder.hitCount, this, "hitCount"); - this.memorySize = builder.memorySize; - this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); - this.missCount = ApiTypeHelper.requireNonNull(builder.missCount, this, "missCount"); - this.totalCount = ApiTypeHelper.requireNonNull(builder.totalCount, this, "totalCount"); - - } - - public static QueryCacheStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code cache_count} - */ - public final int cacheCount() { - return this.cacheCount; - } + private final int cacheCount; + + private final int cacheSize; + + private final int evictions; + + private final int hitCount; + + @Nullable + private final String memorySize; + + private final int memorySizeInBytes; + + private final int missCount; + + private final int totalCount; + + // --------------------------------------------------------------------------------------------- + + private QueryCacheStats(Builder builder) { + + this.cacheCount = ApiTypeHelper.requireNonNull(builder.cacheCount, this, "cacheCount"); + this.cacheSize = ApiTypeHelper.requireNonNull(builder.cacheSize, this, "cacheSize"); + this.evictions = ApiTypeHelper.requireNonNull(builder.evictions, this, "evictions"); + this.hitCount = ApiTypeHelper.requireNonNull(builder.hitCount, this, "hitCount"); + this.memorySize = builder.memorySize; + this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); + this.missCount = ApiTypeHelper.requireNonNull(builder.missCount, this, "missCount"); + this.totalCount = ApiTypeHelper.requireNonNull(builder.totalCount, this, "totalCount"); + + } + + public static QueryCacheStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code cache_count} + */ + public final int cacheCount() { + return this.cacheCount; + } - /** - * Required - API name: {@code cache_size} - */ - public final int cacheSize() { - return this.cacheSize; - } + /** + * Required - API name: {@code cache_size} + */ + public final int cacheSize() { + return this.cacheSize; + } - /** - * Required - API name: {@code evictions} - */ - public final int evictions() { - return this.evictions; - } + /** + * Required - API name: {@code evictions} + */ + public final int evictions() { + return this.evictions; + } - /** - * Required - API name: {@code hit_count} - */ - public final int hitCount() { - return this.hitCount; - } + /** + * Required - API name: {@code hit_count} + */ + public final int hitCount() { + return this.hitCount; + } - /** - * API name: {@code memory_size} - */ - @Nullable - public final String memorySize() { - return this.memorySize; - } + /** + * API name: {@code memory_size} + */ + @Nullable + public final String memorySize() { + return this.memorySize; + } - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final int memorySizeInBytes() { - return this.memorySizeInBytes; - } + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final int memorySizeInBytes() { + return this.memorySizeInBytes; + } - /** - * Required - API name: {@code miss_count} - */ - public final int missCount() { - return this.missCount; - } - - /** - * Required - API name: {@code total_count} - */ - public final int totalCount() { - return this.totalCount; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("cache_count"); - generator.write(this.cacheCount); - - generator.writeKey("cache_size"); - generator.write(this.cacheSize); - - generator.writeKey("evictions"); - generator.write(this.evictions); - - generator.writeKey("hit_count"); - generator.write(this.hitCount); - - if (this.memorySize != null) { - generator.writeKey("memory_size"); - generator.write(this.memorySize); - - } - generator.writeKey("memory_size_in_bytes"); - generator.write(this.memorySizeInBytes); - - generator.writeKey("miss_count"); - generator.write(this.missCount); - - generator.writeKey("total_count"); - generator.write(this.totalCount); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link QueryCacheStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Integer cacheCount; - - private Integer cacheSize; - - private Integer evictions; - - private Integer hitCount; - - @Nullable - private String memorySize; - - private Integer memorySizeInBytes; - - private Integer missCount; - - private Integer totalCount; - - /** - * Required - API name: {@code cache_count} - */ - public final Builder cacheCount(int value) { - this.cacheCount = value; - return this; - } - - /** - * Required - API name: {@code cache_size} - */ - public final Builder cacheSize(int value) { - this.cacheSize = value; - return this; - } - - /** - * Required - API name: {@code evictions} - */ - public final Builder evictions(int value) { - this.evictions = value; - return this; - } - - /** - * Required - API name: {@code hit_count} - */ - public final Builder hitCount(int value) { - this.hitCount = value; - return this; - } - - /** - * API name: {@code memory_size} - */ - public final Builder memorySize(@Nullable String value) { - this.memorySize = value; - return this; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final Builder memorySizeInBytes(int value) { - this.memorySizeInBytes = value; - return this; - } - - /** - * Required - API name: {@code miss_count} - */ - public final Builder missCount(int value) { - this.missCount = value; - return this; - } - - /** - * Required - API name: {@code total_count} - */ - public final Builder totalCount(int value) { - this.totalCount = value; - return this; - } - - /** - * Builds a {@link QueryCacheStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public QueryCacheStats build() { - _checkSingleUse(); - - return new QueryCacheStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link QueryCacheStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - QueryCacheStats::setupQueryCacheStatsDeserializer); - - protected static void setupQueryCacheStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::cacheCount, JsonpDeserializer.integerDeserializer(), "cache_count"); - op.add(Builder::cacheSize, JsonpDeserializer.integerDeserializer(), "cache_size"); - op.add(Builder::evictions, JsonpDeserializer.integerDeserializer(), "evictions"); - op.add(Builder::hitCount, JsonpDeserializer.integerDeserializer(), "hit_count"); - op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); - op.add(Builder::memorySizeInBytes, JsonpDeserializer.integerDeserializer(), "memory_size_in_bytes"); - op.add(Builder::missCount, JsonpDeserializer.integerDeserializer(), "miss_count"); - op.add(Builder::totalCount, JsonpDeserializer.integerDeserializer(), "total_count"); - - } + /** + * Required - API name: {@code miss_count} + */ + public final int missCount() { + return this.missCount; + } + + /** + * Required - API name: {@code total_count} + */ + public final int totalCount() { + return this.totalCount; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("cache_count"); + generator.write(this.cacheCount); + + generator.writeKey("cache_size"); + generator.write(this.cacheSize); + + generator.writeKey("evictions"); + generator.write(this.evictions); + + generator.writeKey("hit_count"); + generator.write(this.hitCount); + + if (this.memorySize != null) { + generator.writeKey("memory_size"); + generator.write(this.memorySize); + + } + generator.writeKey("memory_size_in_bytes"); + generator.write(this.memorySizeInBytes); + + generator.writeKey("miss_count"); + generator.write(this.missCount); + + generator.writeKey("total_count"); + generator.write(this.totalCount); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link QueryCacheStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Integer cacheCount; + + private Integer cacheSize; + + private Integer evictions; + + private Integer hitCount; + + @Nullable + private String memorySize; + + private Integer memorySizeInBytes; + + private Integer missCount; + + private Integer totalCount; + + /** + * Required - API name: {@code cache_count} + */ + public final Builder cacheCount(int value) { + this.cacheCount = value; + return this; + } + + /** + * Required - API name: {@code cache_size} + */ + public final Builder cacheSize(int value) { + this.cacheSize = value; + return this; + } + + /** + * Required - API name: {@code evictions} + */ + public final Builder evictions(int value) { + this.evictions = value; + return this; + } + + /** + * Required - API name: {@code hit_count} + */ + public final Builder hitCount(int value) { + this.hitCount = value; + return this; + } + + /** + * API name: {@code memory_size} + */ + public final Builder memorySize(@Nullable String value) { + this.memorySize = value; + return this; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final Builder memorySizeInBytes(int value) { + this.memorySizeInBytes = value; + return this; + } + + /** + * Required - API name: {@code miss_count} + */ + public final Builder missCount(int value) { + this.missCount = value; + return this; + } + + /** + * Required - API name: {@code total_count} + */ + public final Builder totalCount(int value) { + this.totalCount = value; + return this; + } + + /** + * Builds a {@link QueryCacheStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public QueryCacheStats build() { + _checkSingleUse(); + + return new QueryCacheStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link QueryCacheStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + QueryCacheStats::setupQueryCacheStatsDeserializer + ); + + protected static void setupQueryCacheStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::cacheCount, JsonpDeserializer.integerDeserializer(), "cache_count"); + op.add(Builder::cacheSize, JsonpDeserializer.integerDeserializer(), "cache_size"); + op.add(Builder::evictions, JsonpDeserializer.integerDeserializer(), "evictions"); + op.add(Builder::hitCount, JsonpDeserializer.integerDeserializer(), "hit_count"); + op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); + op.add(Builder::memorySizeInBytes, JsonpDeserializer.integerDeserializer(), "memory_size_in_bytes"); + op.add(Builder::missCount, JsonpDeserializer.integerDeserializer(), "miss_count"); + op.add(Builder::totalCount, JsonpDeserializer.integerDeserializer(), "total_count"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java index 475d640048..80f4d182ff 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RecoveryStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,171 +44,169 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.RecoveryStats @JsonpDeserializable public class RecoveryStats implements JsonpSerializable { - private final long currentAsSource; + private final long currentAsSource; - private final long currentAsTarget; + private final long currentAsTarget; - @Nullable - private final String throttleTime; + @Nullable + private final String throttleTime; - private final long throttleTimeInMillis; + private final long throttleTimeInMillis; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private RecoveryStats(Builder builder) { + private RecoveryStats(Builder builder) { - this.currentAsSource = ApiTypeHelper.requireNonNull(builder.currentAsSource, this, "currentAsSource"); - this.currentAsTarget = ApiTypeHelper.requireNonNull(builder.currentAsTarget, this, "currentAsTarget"); - this.throttleTime = builder.throttleTime; - this.throttleTimeInMillis = ApiTypeHelper.requireNonNull(builder.throttleTimeInMillis, this, - "throttleTimeInMillis"); - - } - - public static RecoveryStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code current_as_source} - */ - public final long currentAsSource() { - return this.currentAsSource; - } - - /** - * Required - API name: {@code current_as_target} - */ - public final long currentAsTarget() { - return this.currentAsTarget; - } - - /** - * API name: {@code throttle_time} - */ - @Nullable - public final String throttleTime() { - return this.throttleTime; - } - - /** - * Required - API name: {@code throttle_time_in_millis} - */ - public final long throttleTimeInMillis() { - return this.throttleTimeInMillis; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("current_as_source"); - generator.write(this.currentAsSource); - - generator.writeKey("current_as_target"); - generator.write(this.currentAsTarget); - - if (this.throttleTime != null) { - generator.writeKey("throttle_time"); - generator.write(this.throttleTime); - - } - generator.writeKey("throttle_time_in_millis"); - generator.write(this.throttleTimeInMillis); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link RecoveryStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long currentAsSource; - - private Long currentAsTarget; - - @Nullable - private String throttleTime; - - private Long throttleTimeInMillis; - - /** - * Required - API name: {@code current_as_source} - */ - public final Builder currentAsSource(long value) { - this.currentAsSource = value; - return this; - } - - /** - * Required - API name: {@code current_as_target} - */ - public final Builder currentAsTarget(long value) { - this.currentAsTarget = value; - return this; - } - - /** - * API name: {@code throttle_time} - */ - public final Builder throttleTime(@Nullable String value) { - this.throttleTime = value; - return this; - } - - /** - * Required - API name: {@code throttle_time_in_millis} - */ - public final Builder throttleTimeInMillis(long value) { - this.throttleTimeInMillis = value; - return this; - } - - /** - * Builds a {@link RecoveryStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public RecoveryStats build() { - _checkSingleUse(); - - return new RecoveryStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link RecoveryStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - RecoveryStats::setupRecoveryStatsDeserializer); - - protected static void setupRecoveryStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::currentAsSource, JsonpDeserializer.longDeserializer(), "current_as_source"); - op.add(Builder::currentAsTarget, JsonpDeserializer.longDeserializer(), "current_as_target"); - op.add(Builder::throttleTime, JsonpDeserializer.stringDeserializer(), "throttle_time"); - op.add(Builder::throttleTimeInMillis, JsonpDeserializer.longDeserializer(), "throttle_time_in_millis"); - - } + this.currentAsSource = ApiTypeHelper.requireNonNull(builder.currentAsSource, this, "currentAsSource"); + this.currentAsTarget = ApiTypeHelper.requireNonNull(builder.currentAsTarget, this, "currentAsTarget"); + this.throttleTime = builder.throttleTime; + this.throttleTimeInMillis = ApiTypeHelper.requireNonNull(builder.throttleTimeInMillis, this, "throttleTimeInMillis"); + + } + + public static RecoveryStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code current_as_source} + */ + public final long currentAsSource() { + return this.currentAsSource; + } + + /** + * Required - API name: {@code current_as_target} + */ + public final long currentAsTarget() { + return this.currentAsTarget; + } + + /** + * API name: {@code throttle_time} + */ + @Nullable + public final String throttleTime() { + return this.throttleTime; + } + + /** + * Required - API name: {@code throttle_time_in_millis} + */ + public final long throttleTimeInMillis() { + return this.throttleTimeInMillis; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("current_as_source"); + generator.write(this.currentAsSource); + + generator.writeKey("current_as_target"); + generator.write(this.currentAsTarget); + + if (this.throttleTime != null) { + generator.writeKey("throttle_time"); + generator.write(this.throttleTime); + + } + generator.writeKey("throttle_time_in_millis"); + generator.write(this.throttleTimeInMillis); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RecoveryStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long currentAsSource; + + private Long currentAsTarget; + + @Nullable + private String throttleTime; + + private Long throttleTimeInMillis; + + /** + * Required - API name: {@code current_as_source} + */ + public final Builder currentAsSource(long value) { + this.currentAsSource = value; + return this; + } + + /** + * Required - API name: {@code current_as_target} + */ + public final Builder currentAsTarget(long value) { + this.currentAsTarget = value; + return this; + } + + /** + * API name: {@code throttle_time} + */ + public final Builder throttleTime(@Nullable String value) { + this.throttleTime = value; + return this; + } + + /** + * Required - API name: {@code throttle_time_in_millis} + */ + public final Builder throttleTimeInMillis(long value) { + this.throttleTimeInMillis = value; + return this; + } + + /** + * Builds a {@link RecoveryStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RecoveryStats build() { + _checkSingleUse(); + + return new RecoveryStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RecoveryStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + RecoveryStats::setupRecoveryStatsDeserializer + ); + + protected static void setupRecoveryStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::currentAsSource, JsonpDeserializer.longDeserializer(), "current_as_source"); + op.add(Builder::currentAsTarget, JsonpDeserializer.longDeserializer(), "current_as_target"); + op.add(Builder::throttleTime, JsonpDeserializer.stringDeserializer(), "throttle_time"); + op.add(Builder::throttleTimeInMillis, JsonpDeserializer.longDeserializer(), "throttle_time_in_millis"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java index 190d4c62c5..b1b78d0305 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Refresh.java @@ -37,23 +37,23 @@ @JsonpDeserializable public enum Refresh implements JsonEnum { - True("true"), + True("true"), - False("false"), + False("false"), - WaitFor("wait_for"), + WaitFor("wait_for"), - ; + ; - private final String jsonValue; + private final String jsonValue; - Refresh(String jsonValue) { - this.jsonValue = jsonValue; - } + Refresh(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Refresh.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Refresh.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java index f811195f56..bfa6015a4b 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RefreshStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,221 +44,217 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.RefreshStats - @JsonpDeserializable public class RefreshStats implements JsonpSerializable { - private final long externalTotal; - - private final long externalTotalTimeInMillis; - - private final long listeners; - - private final long total; - - @Nullable - private final String totalTime; + private final long externalTotal; + + private final long externalTotalTimeInMillis; + + private final long listeners; + + private final long total; + + @Nullable + private final String totalTime; + + private final long totalTimeInMillis; - private final long totalTimeInMillis; + // --------------------------------------------------------------------------------------------- - // --------------------------------------------------------------------------------------------- + private RefreshStats(Builder builder) { - private RefreshStats(Builder builder) { + this.externalTotal = ApiTypeHelper.requireNonNull(builder.externalTotal, this, "externalTotal"); + this.externalTotalTimeInMillis = ApiTypeHelper.requireNonNull(builder.externalTotalTimeInMillis, this, "externalTotalTimeInMillis"); + this.listeners = ApiTypeHelper.requireNonNull(builder.listeners, this, "listeners"); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.totalTime = builder.totalTime; + this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); - this.externalTotal = ApiTypeHelper.requireNonNull(builder.externalTotal, this, "externalTotal"); - this.externalTotalTimeInMillis = ApiTypeHelper.requireNonNull(builder.externalTotalTimeInMillis, this, - "externalTotalTimeInMillis"); - this.listeners = ApiTypeHelper.requireNonNull(builder.listeners, this, "listeners"); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - this.totalTime = builder.totalTime; - this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis"); + } - } + public static RefreshStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } - public static RefreshStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } + /** + * Required - API name: {@code external_total} + */ + public final long externalTotal() { + return this.externalTotal; + } - /** - * Required - API name: {@code external_total} - */ - public final long externalTotal() { - return this.externalTotal; - } + /** + * Required - API name: {@code external_total_time_in_millis} + */ + public final long externalTotalTimeInMillis() { + return this.externalTotalTimeInMillis; + } - /** - * Required - API name: {@code external_total_time_in_millis} - */ - public final long externalTotalTimeInMillis() { - return this.externalTotalTimeInMillis; - } + /** + * Required - API name: {@code listeners} + */ + public final long listeners() { + return this.listeners; + } - /** - * Required - API name: {@code listeners} - */ - public final long listeners() { - return this.listeners; - } - - /** - * Required - API name: {@code total} - */ - public final long total() { - return this.total; - } - - /** - * API name: {@code total_time} - */ - @Nullable - public final String totalTime() { - return this.totalTime; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final long totalTimeInMillis() { - return this.totalTimeInMillis; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("external_total"); - generator.write(this.externalTotal); - - generator.writeKey("external_total_time_in_millis"); - generator.write(this.externalTotalTimeInMillis); - - generator.writeKey("listeners"); - generator.write(this.listeners); - - generator.writeKey("total"); - generator.write(this.total); - - if (this.totalTime != null) { - generator.writeKey("total_time"); - generator.write(this.totalTime); - - } - generator.writeKey("total_time_in_millis"); - generator.write(this.totalTimeInMillis); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link RefreshStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long externalTotal; - - private Long externalTotalTimeInMillis; - - private Long listeners; - - private Long total; - - @Nullable - private String totalTime; - - private Long totalTimeInMillis; - - /** - * Required - API name: {@code external_total} - */ - public final Builder externalTotal(long value) { - this.externalTotal = value; - return this; - } - - /** - * Required - API name: {@code external_total_time_in_millis} - */ - public final Builder externalTotalTimeInMillis(long value) { - this.externalTotalTimeInMillis = value; - return this; - } - - /** - * Required - API name: {@code listeners} - */ - public final Builder listeners(long value) { - this.listeners = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(long value) { - this.total = value; - return this; - } - - /** - * API name: {@code total_time} - */ - public final Builder totalTime(@Nullable String value) { - this.totalTime = value; - return this; - } - - /** - * Required - API name: {@code total_time_in_millis} - */ - public final Builder totalTimeInMillis(long value) { - this.totalTimeInMillis = value; - return this; - } - - /** - * Builds a {@link RefreshStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public RefreshStats build() { - _checkSingleUse(); - - return new RefreshStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link RefreshStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - RefreshStats::setupRefreshStatsDeserializer); - - protected static void setupRefreshStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::externalTotal, JsonpDeserializer.longDeserializer(), "external_total"); - op.add(Builder::externalTotalTimeInMillis, JsonpDeserializer.longDeserializer(), - "external_total_time_in_millis"); - op.add(Builder::listeners, JsonpDeserializer.longDeserializer(), "listeners"); - op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); - op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); - op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); - - } + /** + * Required - API name: {@code total} + */ + public final long total() { + return this.total; + } + + /** + * API name: {@code total_time} + */ + @Nullable + public final String totalTime() { + return this.totalTime; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final long totalTimeInMillis() { + return this.totalTimeInMillis; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("external_total"); + generator.write(this.externalTotal); + + generator.writeKey("external_total_time_in_millis"); + generator.write(this.externalTotalTimeInMillis); + + generator.writeKey("listeners"); + generator.write(this.listeners); + + generator.writeKey("total"); + generator.write(this.total); + + if (this.totalTime != null) { + generator.writeKey("total_time"); + generator.write(this.totalTime); + + } + generator.writeKey("total_time_in_millis"); + generator.write(this.totalTimeInMillis); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RefreshStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long externalTotal; + + private Long externalTotalTimeInMillis; + + private Long listeners; + + private Long total; + + @Nullable + private String totalTime; + + private Long totalTimeInMillis; + + /** + * Required - API name: {@code external_total} + */ + public final Builder externalTotal(long value) { + this.externalTotal = value; + return this; + } + + /** + * Required - API name: {@code external_total_time_in_millis} + */ + public final Builder externalTotalTimeInMillis(long value) { + this.externalTotalTimeInMillis = value; + return this; + } + + /** + * Required - API name: {@code listeners} + */ + public final Builder listeners(long value) { + this.listeners = value; + return this; + } + + /** + * Required - API name: {@code total} + */ + public final Builder total(long value) { + this.total = value; + return this; + } + + /** + * API name: {@code total_time} + */ + public final Builder totalTime(@Nullable String value) { + this.totalTime = value; + return this; + } + + /** + * Required - API name: {@code total_time_in_millis} + */ + public final Builder totalTimeInMillis(long value) { + this.totalTimeInMillis = value; + return this; + } + + /** + * Builds a {@link RefreshStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RefreshStats build() { + _checkSingleUse(); + + return new RefreshStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RefreshStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + RefreshStats::setupRefreshStatsDeserializer + ); + + protected static void setupRefreshStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::externalTotal, JsonpDeserializer.longDeserializer(), "external_total"); + op.add(Builder::externalTotalTimeInMillis, JsonpDeserializer.longDeserializer(), "external_total_time_in_millis"); + op.add(Builder::listeners, JsonpDeserializer.longDeserializer(), "listeners"); + op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); + op.add(Builder::totalTime, JsonpDeserializer.stringDeserializer(), "total_time"); + op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java index bb57c5de8c..165c5258a0 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestBase.java @@ -36,16 +36,12 @@ // typedef: _types.RequestBase - public abstract class RequestBase { - public RequestBase() { - } + public RequestBase() {} - protected abstract static class AbstractBuilder> - extends - ObjectBuilderBase { - protected abstract BuilderT self(); + protected abstract static class AbstractBuilder> extends ObjectBuilderBase { + protected abstract BuilderT self(); - } + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java index ace6ed3e06..1b7a25c28f 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/RequestCacheStats.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,194 +44,193 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.RequestCacheStats @JsonpDeserializable public class RequestCacheStats implements JsonpSerializable { - private final long evictions; + private final long evictions; - private final long hitCount; + private final long hitCount; - @Nullable - private final String memorySize; + @Nullable + private final String memorySize; - private final long memorySizeInBytes; + private final long memorySizeInBytes; - private final long missCount; + private final long missCount; - // --------------------------------------------------------------------------------------------- + // --------------------------------------------------------------------------------------------- - private RequestCacheStats(Builder builder) { + private RequestCacheStats(Builder builder) { - this.evictions = ApiTypeHelper.requireNonNull(builder.evictions, this, "evictions"); - this.hitCount = ApiTypeHelper.requireNonNull(builder.hitCount, this, "hitCount"); - this.memorySize = builder.memorySize; - this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); - this.missCount = ApiTypeHelper.requireNonNull(builder.missCount, this, "missCount"); + this.evictions = ApiTypeHelper.requireNonNull(builder.evictions, this, "evictions"); + this.hitCount = ApiTypeHelper.requireNonNull(builder.hitCount, this, "hitCount"); + this.memorySize = builder.memorySize; + this.memorySizeInBytes = ApiTypeHelper.requireNonNull(builder.memorySizeInBytes, this, "memorySizeInBytes"); + this.missCount = ApiTypeHelper.requireNonNull(builder.missCount, this, "missCount"); - } + } - public static RequestCacheStats of(Function> fn) { - return fn.apply(new Builder()).build(); - } + public static RequestCacheStats of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code evictions} - */ - public final long evictions() { - return this.evictions; - } - - /** - * Required - API name: {@code hit_count} - */ - public final long hitCount() { - return this.hitCount; - } - - /** - * API name: {@code memory_size} - */ - @Nullable - public final String memorySize() { - return this.memorySize; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final long memorySizeInBytes() { - return this.memorySizeInBytes; - } - - /** - * Required - API name: {@code miss_count} - */ - public final long missCount() { - return this.missCount; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("evictions"); - generator.write(this.evictions); - - generator.writeKey("hit_count"); - generator.write(this.hitCount); - - if (this.memorySize != null) { - generator.writeKey("memory_size"); - generator.write(this.memorySize); - - } - generator.writeKey("memory_size_in_bytes"); - generator.write(this.memorySizeInBytes); - - generator.writeKey("miss_count"); - generator.write(this.missCount); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link RequestCacheStats}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long evictions; - - private Long hitCount; - - @Nullable - private String memorySize; - - private Long memorySizeInBytes; - - private Long missCount; - - /** - * Required - API name: {@code evictions} - */ - public final Builder evictions(long value) { - this.evictions = value; - return this; - } - - /** - * Required - API name: {@code hit_count} - */ - public final Builder hitCount(long value) { - this.hitCount = value; - return this; - } - - /** - * API name: {@code memory_size} - */ - public final Builder memorySize(@Nullable String value) { - this.memorySize = value; - return this; - } - - /** - * Required - API name: {@code memory_size_in_bytes} - */ - public final Builder memorySizeInBytes(long value) { - this.memorySizeInBytes = value; - return this; - } - - /** - * Required - API name: {@code miss_count} - */ - public final Builder missCount(long value) { - this.missCount = value; - return this; - } - - /** - * Builds a {@link RequestCacheStats}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public RequestCacheStats build() { - _checkSingleUse(); - - return new RequestCacheStats(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link RequestCacheStats} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, RequestCacheStats::setupRequestCacheStatsDeserializer); - - protected static void setupRequestCacheStatsDeserializer(ObjectDeserializer op) { - - op.add(Builder::evictions, JsonpDeserializer.longDeserializer(), "evictions"); - op.add(Builder::hitCount, JsonpDeserializer.longDeserializer(), "hit_count"); - op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); - op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes"); - op.add(Builder::missCount, JsonpDeserializer.longDeserializer(), "miss_count"); - - } + /** + * Required - API name: {@code evictions} + */ + public final long evictions() { + return this.evictions; + } + + /** + * Required - API name: {@code hit_count} + */ + public final long hitCount() { + return this.hitCount; + } + + /** + * API name: {@code memory_size} + */ + @Nullable + public final String memorySize() { + return this.memorySize; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final long memorySizeInBytes() { + return this.memorySizeInBytes; + } + + /** + * Required - API name: {@code miss_count} + */ + public final long missCount() { + return this.missCount; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("evictions"); + generator.write(this.evictions); + + generator.writeKey("hit_count"); + generator.write(this.hitCount); + + if (this.memorySize != null) { + generator.writeKey("memory_size"); + generator.write(this.memorySize); + + } + generator.writeKey("memory_size_in_bytes"); + generator.write(this.memorySizeInBytes); + + generator.writeKey("miss_count"); + generator.write(this.missCount); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RequestCacheStats}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long evictions; + + private Long hitCount; + + @Nullable + private String memorySize; + + private Long memorySizeInBytes; + + private Long missCount; + + /** + * Required - API name: {@code evictions} + */ + public final Builder evictions(long value) { + this.evictions = value; + return this; + } + + /** + * Required - API name: {@code hit_count} + */ + public final Builder hitCount(long value) { + this.hitCount = value; + return this; + } + + /** + * API name: {@code memory_size} + */ + public final Builder memorySize(@Nullable String value) { + this.memorySize = value; + return this; + } + + /** + * Required - API name: {@code memory_size_in_bytes} + */ + public final Builder memorySizeInBytes(long value) { + this.memorySizeInBytes = value; + return this; + } + + /** + * Required - API name: {@code miss_count} + */ + public final Builder missCount(long value) { + this.missCount = value; + return this; + } + + /** + * Builds a {@link RequestCacheStats}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RequestCacheStats build() { + _checkSingleUse(); + + return new RequestCacheStats(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RequestCacheStats} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + RequestCacheStats::setupRequestCacheStatsDeserializer + ); + + protected static void setupRequestCacheStatsDeserializer(ObjectDeserializer op) { + + op.add(Builder::evictions, JsonpDeserializer.longDeserializer(), "evictions"); + op.add(Builder::hitCount, JsonpDeserializer.longDeserializer(), "hit_count"); + op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size"); + op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes"); + op.add(Builder::missCount, JsonpDeserializer.longDeserializer(), "miss_count"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java index 6d2a026a12..54b408cf76 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Result.java @@ -37,27 +37,27 @@ @JsonpDeserializable public enum Result implements JsonEnum { - Created("created"), + Created("created"), - Updated("updated"), + Updated("updated"), - Deleted("deleted"), + Deleted("deleted"), - NotFound("not_found"), + NotFound("not_found"), - NoOp("noop"), + NoOp("noop"), - ; + ; - private final String jsonValue; + private final String jsonValue; - Result(String jsonValue) { - this.jsonValue = jsonValue; - } + Result(String jsonValue) { + this.jsonValue = jsonValue; + } - public String jsonValue() { - return this.jsonValue; - } + public String jsonValue() { + return this.jsonValue; + } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Result.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(Result.values()); } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java index 677fbd2707..235a05576c 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Retries.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -41,116 +43,116 @@ import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.Retries @JsonpDeserializable public class Retries implements JsonpSerializable { - private final long bulk; - - private final long search; - - // --------------------------------------------------------------------------------------------- + private final long bulk; - private Retries(Builder builder) { + private final long search; + + // --------------------------------------------------------------------------------------------- - this.bulk = ApiTypeHelper.requireNonNull(builder.bulk, this, "bulk"); - this.search = ApiTypeHelper.requireNonNull(builder.search, this, "search"); + private Retries(Builder builder) { - } + this.bulk = ApiTypeHelper.requireNonNull(builder.bulk, this, "bulk"); + this.search = ApiTypeHelper.requireNonNull(builder.search, this, "search"); - public static Retries of(Function> fn) { - return fn.apply(new Builder()).build(); - } + } - /** - * Required - API name: {@code bulk} - */ - public final long bulk() { - return this.bulk; - } + public static Retries of(Function> fn) { + return fn.apply(new Builder()).build(); + } - /** - * Required - API name: {@code search} - */ - public final long search() { - return this.search; - } + /** + * Required - API name: {@code bulk} + */ + public final long bulk() { + return this.bulk; + } - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } + /** + * Required - API name: {@code search} + */ + public final long search() { + return this.search; + } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } - generator.writeKey("bulk"); - generator.write(this.bulk); + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("search"); - generator.write(this.search); + generator.writeKey("bulk"); + generator.write(this.bulk); - } + generator.writeKey("search"); + generator.write(this.search); - // --------------------------------------------------------------------------------------------- + } - /** - * Builder for {@link Retries}. - */ + // --------------------------------------------------------------------------------------------- - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Long bulk; + /** + * Builder for {@link Retries}. + */ - private Long search; + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Long bulk; - /** - * Required - API name: {@code bulk} - */ - public final Builder bulk(long value) { - this.bulk = value; - return this; - } + private Long search; - /** - * Required - API name: {@code search} - */ - public final Builder search(long value) { - this.search = value; - return this; - } + /** + * Required - API name: {@code bulk} + */ + public final Builder bulk(long value) { + this.bulk = value; + return this; + } - /** - * Builds a {@link Retries}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public Retries build() { - _checkSingleUse(); + /** + * Required - API name: {@code search} + */ + public final Builder search(long value) { + this.search = value; + return this; + } - return new Retries(this); - } - } + /** + * Builds a {@link Retries}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Retries build() { + _checkSingleUse(); - // --------------------------------------------------------------------------------------------- + return new Retries(this); + } + } - /** - * Json deserializer for {@link Retries} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - Retries::setupRetriesDeserializer); + // --------------------------------------------------------------------------------------------- - protected static void setupRetriesDeserializer(ObjectDeserializer op) { + /** + * Json deserializer for {@link Retries} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Retries::setupRetriesDeserializer + ); - op.add(Builder::bulk, JsonpDeserializer.longDeserializer(), "bulk"); - op.add(Builder::search, JsonpDeserializer.longDeserializer(), "search"); + protected static void setupRetriesDeserializer(ObjectDeserializer op) { - } + op.add(Builder::bulk, JsonpDeserializer.longDeserializer(), "bulk"); + op.add(Builder::search, JsonpDeserializer.longDeserializer(), "search"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java index 5e1a86fc87..b432f1dfd1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java @@ -32,6 +32,9 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; +import javax.annotation.Nullable; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -40,107 +43,105 @@ import org.opensearch.client.json.ObjectDeserializer; import org.opensearch.client.util.ObjectBuilder; import org.opensearch.client.util.ObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; - -import java.util.function.Function; -import javax.annotation.Nullable; // typedef: _types.ScoreSort @JsonpDeserializable public class ScoreSort implements SortOptionsVariant, JsonpSerializable { - @Nullable - private final SortOrder order; - - // --------------------------------------------------------------------------------------------- - - private ScoreSort(Builder builder) { - - this.order = builder.order; - - } - - public static ScoreSort of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * SortOptions variant kind. - */ - @Override - public SortOptions.Kind _sortOptionsKind() { - return SortOptions.Kind.Doc; - } - - /** - * API name: {@code order} - */ - @Nullable - public final SortOrder order() { - return this.order; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.order != null) { - generator.writeKey("order"); - this.order.serialize(generator, mapper); - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ScoreSort}. - */ - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - @Nullable - private SortOrder order; - - /** - * API name: {@code order} - */ - public final Builder order(@Nullable SortOrder value) { - this.order = value; - return this; - } - - /** - * Builds a {@link ScoreSort}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ScoreSort build() { - _checkSingleUse(); - - return new ScoreSort(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ScoreSort} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - ScoreSort::setupScoreSortDeserializer); - - protected static void setupScoreSortDeserializer(ObjectDeserializer op) { - - op.add(Builder::order, SortOrder._DESERIALIZER, "order"); - - } + @Nullable + private final SortOrder order; + + // --------------------------------------------------------------------------------------------- + + private ScoreSort(Builder builder) { + + this.order = builder.order; + + } + + public static ScoreSort of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SortOptions variant kind. + */ + @Override + public SortOptions.Kind _sortOptionsKind() { + return SortOptions.Kind.Doc; + } + + /** + * API name: {@code order} + */ + @Nullable + public final SortOrder order() { + return this.order; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.order != null) { + generator.writeKey("order"); + this.order.serialize(generator, mapper); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ScoreSort}. + */ + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private SortOrder order; + + /** + * API name: {@code order} + */ + public final Builder order(@Nullable SortOrder value) { + this.order = value; + return this; + } + + /** + * Builds a {@link ScoreSort}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ScoreSort build() { + _checkSingleUse(); + + return new ScoreSort(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ScoreSort} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + ScoreSort::setupScoreSortDeserializer + ); + + protected static void setupScoreSortDeserializer(ObjectDeserializer op) { + + op.add(Builder::order, SortOrder._DESERIALIZER, "order"); + + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java index 0f6250be36..6f969b8f5a 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/Script.java @@ -32,6 +32,8 @@ package org.opensearch.client.opensearch._types; +import jakarta.json.stream.JsonGenerator; +import java.util.function.Function; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -42,127 +44,125 @@ import org.opensearch.client.util.ObjectBuilderBase; import org.opensearch.client.util.TaggedUnion; import org.opensearch.client.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import java.util.function.Function; // typedef: _types.Script @JsonpDeserializable public class Script implements TaggedUnion, JsonpSerializable { - public enum Kind { - Inline, Stored - - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - private Script(Kind kind, Object value) { - this._kind = kind; - this._value = value; - } - - private Script(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static Script of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code inline}? - */ - public boolean isInline() { - return _kind == Kind.Inline; - } - - /** - * Get the {@code inline} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code inline} kind. - */ - public InlineScript inline() { - return TaggedUnionUtils.get(this, Kind.Inline); - } - - /** - * Is this variant instance of kind {@code stored}? - */ - public boolean isStored() { - return _kind == Kind.Stored; - } - - /** - * Get the {@code stored} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code stored} kind. - */ - public StoredScriptId stored() { - return TaggedUnionUtils.get(this, Kind.Stored); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } - - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder