1+ // Licensed to Elasticsearch B.V under one or more agreements. 
2+ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. 
3+ // See the LICENSE file in the project root for more information. 
4+ // 
5+ // ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ 
6+ // ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ 
7+ // ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ 
8+ // ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ 
9+ // ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ 
10+ // ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ 
11+ // ------------------------------------------------ 
12+ // 
13+ // This file is automatically generated. 
14+ // Please do not edit these files manually. 
15+ // 
16+ // ------------------------------------------------ 
17+ 18+ #nullable restore
19+ 20+ using  System ; 
21+ using  System . Linq ; 
22+ using  Elastic . Clients . Elasticsearch . Serialization ; 
23+ 24+ namespace  Elastic . Clients . Elasticsearch . Cluster . Json ; 
25+ 26+ public  sealed  partial  class  PutClusterSettingsRequestConverter  :  System . Text . Json . Serialization . JsonConverter < Elastic . Clients . Elasticsearch . Cluster . PutClusterSettingsRequest > 
27+ { 
28+ 	private  static readonly  System . Text . Json . JsonEncodedText  PropPersistent  =  System . Text . Json . JsonEncodedText . Encode ( "persistent" ) ; 
29+ 	private  static readonly  System . Text . Json . JsonEncodedText  PropTransient  =  System . Text . Json . JsonEncodedText . Encode ( "transient" ) ; 
30+ 31+ 	public  override  Elastic . Clients . Elasticsearch . Cluster . PutClusterSettingsRequest  Read ( ref  System . Text . Json . Utf8JsonReader  reader ,  System . Type  typeToConvert ,  System . Text . Json . JsonSerializerOptions  options ) 
32+ 	{ 
33+ 		reader . ValidateToken ( System . Text . Json . JsonTokenType . StartObject ) ; 
34+ 		LocalJsonValue < System . Collections . Generic . IDictionary < string ,  object > ? >  propPersistent  =  default ; 
35+ 		LocalJsonValue < System . Collections . Generic . IDictionary < string ,  object > ? >  propTransient  =  default ; 
36+ 		while  ( reader . Read ( )  &&  reader . TokenType  is  System . Text . Json . JsonTokenType . PropertyName ) 
37+ 		{ 
38+ 			if  ( propPersistent . TryReadProperty ( ref  reader ,  options ,  PropPersistent ,  static  System . Collections . Generic . IDictionary < string ,  object > ?  ( ref  System . Text . Json . Utf8JsonReader  r ,  System . Text . Json . JsonSerializerOptions  o )  =>  r . ReadDictionaryValue < string ,  object > ( o ,  null ,  static  object  ( ref  System . Text . Json . Utf8JsonReader  r ,  System . Text . Json . JsonSerializerOptions  o )  =>  r . ReadValueEx < object > ( o ,  typeof ( Elastic . Clients . Elasticsearch . Serialization . SourceMarker < object > ) ) ! ) ) ) 
39+ 			{ 
40+ 				continue ; 
41+ 			} 
42+ 43+ 			if  ( propTransient . TryReadProperty ( ref  reader ,  options ,  PropTransient ,  static  System . Collections . Generic . IDictionary < string ,  object > ?  ( ref  System . Text . Json . Utf8JsonReader  r ,  System . Text . Json . JsonSerializerOptions  o )  =>  r . ReadDictionaryValue < string ,  object > ( o ,  null ,  static  object  ( ref  System . Text . Json . Utf8JsonReader  r ,  System . Text . Json . JsonSerializerOptions  o )  =>  r . ReadValueEx < object > ( o ,  typeof ( Elastic . Clients . Elasticsearch . Serialization . SourceMarker < object > ) ) ! ) ) ) 
44+ 			{ 
45+ 				continue ; 
46+ 			} 
47+ 48+ 			if  ( options . UnmappedMemberHandling  is  System . Text . Json . Serialization . JsonUnmappedMemberHandling . Skip ) 
49+ 			{ 
50+ 				reader . SafeSkip ( ) ; 
51+ 				continue ; 
52+ 			} 
53+ 54+ 			throw  new  System . Text . Json . JsonException ( $ "Unknown JSON property '{ reader . GetString ( ) } ' for type '{ typeToConvert . Name } '.") ; 
55+ 		} 
56+ 57+ 		reader . ValidateToken ( System . Text . Json . JsonTokenType . EndObject ) ; 
58+ 		return  new  Elastic . Clients . Elasticsearch . Cluster . PutClusterSettingsRequest ( Elastic . Clients . Elasticsearch . Serialization . JsonConstructorSentinel . Instance ) 
59+ 		{ 
60+ 			Persistent  =  propPersistent . Value , 
61+ 			Transient  =  propTransient . Value 
62+ 		} ; 
63+ 	} 
64+ 65+ 	public  override  void  Write ( System . Text . Json . Utf8JsonWriter  writer ,  Elastic . Clients . Elasticsearch . Cluster . PutClusterSettingsRequest  value ,  System . Text . Json . JsonSerializerOptions  options ) 
66+ 	{ 
67+ 		writer . WriteStartObject ( ) ; 
68+ 		writer . WriteProperty ( options ,  PropPersistent ,  value . Persistent ,  null ,  static  ( System . Text . Json . Utf8JsonWriter  w ,  System . Text . Json . JsonSerializerOptions  o ,  System . Collections . Generic . IDictionary < string ,  object > ?  v )  =>  w . WriteDictionaryValue < string ,  object > ( o ,  v ,  null ,  static  ( System . Text . Json . Utf8JsonWriter  w ,  System . Text . Json . JsonSerializerOptions  o ,  object  v )  =>  w . WriteValueEx < object > ( o ,  v ,  typeof ( Elastic . Clients . Elasticsearch . Serialization . SourceMarker < object > ) ) ) ) ; 
69+ 		writer . WriteProperty ( options ,  PropTransient ,  value . Transient ,  null ,  static  ( System . Text . Json . Utf8JsonWriter  w ,  System . Text . Json . JsonSerializerOptions  o ,  System . Collections . Generic . IDictionary < string ,  object > ?  v )  =>  w . WriteDictionaryValue < string ,  object > ( o ,  v ,  null ,  static  ( System . Text . Json . Utf8JsonWriter  w ,  System . Text . Json . JsonSerializerOptions  o ,  object  v )  =>  w . WriteValueEx < object > ( o ,  v ,  typeof ( Elastic . Clients . Elasticsearch . Serialization . SourceMarker < object > ) ) ) ) ; 
70+ 		writer . WriteEndObject ( ) ; 
71+ 	} 
72+ } 
0 commit comments