mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-11-04 02:33:54 +00:00 
			
		
		
		
	Updated keywords to be aligned with website https://developer.salesfo… (#7522)
* Updated keywords to be aligned with website https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm * [samples] Regenerate Co-authored-by: Jim Schubert <james.schubert@gmail.com>
This commit is contained in:
		
							parent
							
								
									8c17a01bda
								
							
						
					
					
						commit
						e9c6d65f2d
					
				@ -64,6 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>begin</li>
 | 
			
		||||
<li>bigdecimal</li>
 | 
			
		||||
<li>blob</li>
 | 
			
		||||
<li>boolean</li>
 | 
			
		||||
<li>break</li>
 | 
			
		||||
<li>bulk</li>
 | 
			
		||||
<li>by</li>
 | 
			
		||||
@ -77,7 +78,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>commit</li>
 | 
			
		||||
<li>const</li>
 | 
			
		||||
<li>continue</li>
 | 
			
		||||
<li>convertcurrency</li>
 | 
			
		||||
<li>currency</li>
 | 
			
		||||
<li>date</li>
 | 
			
		||||
<li>datetime</li>
 | 
			
		||||
@ -86,6 +86,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>delete</li>
 | 
			
		||||
<li>desc</li>
 | 
			
		||||
<li>do</li>
 | 
			
		||||
<li>double</li>
 | 
			
		||||
<li>else</li>
 | 
			
		||||
<li>end</li>
 | 
			
		||||
<li>enum</li>
 | 
			
		||||
@ -99,7 +100,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>float</li>
 | 
			
		||||
<li>for</li>
 | 
			
		||||
<li>from</li>
 | 
			
		||||
<li>future</li>
 | 
			
		||||
<li>global</li>
 | 
			
		||||
<li>goto</li>
 | 
			
		||||
<li>group</li>
 | 
			
		||||
@ -113,13 +113,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>insert</li>
 | 
			
		||||
<li>instanceof</li>
 | 
			
		||||
<li>int</li>
 | 
			
		||||
<li>integer</li>
 | 
			
		||||
<li>interface</li>
 | 
			
		||||
<li>into</li>
 | 
			
		||||
<li>join</li>
 | 
			
		||||
<li>last_90_days</li>
 | 
			
		||||
<li>last_month</li>
 | 
			
		||||
<li>last_n_days</li>
 | 
			
		||||
<li>last_week</li>
 | 
			
		||||
<li>like</li>
 | 
			
		||||
<li>limit</li>
 | 
			
		||||
<li>list</li>
 | 
			
		||||
@ -128,10 +125,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>map</li>
 | 
			
		||||
<li>merge</li>
 | 
			
		||||
<li>new</li>
 | 
			
		||||
<li>next_90_days</li>
 | 
			
		||||
<li>next_month</li>
 | 
			
		||||
<li>next_n_days</li>
 | 
			
		||||
<li>next_week</li>
 | 
			
		||||
<li>not</li>
 | 
			
		||||
<li>null</li>
 | 
			
		||||
<li>nulls</li>
 | 
			
		||||
@ -150,16 +143,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>public</li>
 | 
			
		||||
<li>retrieve</li>
 | 
			
		||||
<li>return</li>
 | 
			
		||||
<li>returning</li>
 | 
			
		||||
<li>rollback</li>
 | 
			
		||||
<li>savepoint</li>
 | 
			
		||||
<li>search</li>
 | 
			
		||||
<li>select</li>
 | 
			
		||||
<li>set</li>
 | 
			
		||||
<li>short</li>
 | 
			
		||||
<li>sobject</li>
 | 
			
		||||
<li>sort</li>
 | 
			
		||||
<li>stat</li>
 | 
			
		||||
<li>static</li>
 | 
			
		||||
<li>string</li>
 | 
			
		||||
<li>super</li>
 | 
			
		||||
<li>switch</li>
 | 
			
		||||
<li>synchronized</li>
 | 
			
		||||
@ -167,28 +158,22 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 | 
			
		||||
<li>testmethod</li>
 | 
			
		||||
<li>then</li>
 | 
			
		||||
<li>this</li>
 | 
			
		||||
<li>this_month</li>
 | 
			
		||||
<li>this_week</li>
 | 
			
		||||
<li>throw</li>
 | 
			
		||||
<li>time</li>
 | 
			
		||||
<li>today</li>
 | 
			
		||||
<li>tolabel</li>
 | 
			
		||||
<li>tomorrow</li>
 | 
			
		||||
<li>transaction</li>
 | 
			
		||||
<li>trigger</li>
 | 
			
		||||
<li>true</li>
 | 
			
		||||
<li>try</li>
 | 
			
		||||
<li>type</li>
 | 
			
		||||
<li>undelete</li>
 | 
			
		||||
<li>update</li>
 | 
			
		||||
<li>upsert</li>
 | 
			
		||||
<li>using</li>
 | 
			
		||||
<li>virtual</li>
 | 
			
		||||
<li>void</li>
 | 
			
		||||
<li>webservice</li>
 | 
			
		||||
<li>when</li>
 | 
			
		||||
<li>where</li>
 | 
			
		||||
<li>while</li>
 | 
			
		||||
<li>yesterday</li>
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
## FEATURE SET
 | 
			
		||||
 | 
			
		||||
@ -98,22 +98,19 @@ public class ApexClientCodegen extends AbstractApexCodegen {
 | 
			
		||||
        // https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm
 | 
			
		||||
        setReservedWordsLowerCase(
 | 
			
		||||
                Arrays.asList("abstract", "activate", "and", "any", "array", "as", "asc", "autonomous",
 | 
			
		||||
                        "begin", "bigdecimal", "blob", "break", "bulk", "by", "byte", "case", "cast",
 | 
			
		||||
                        "begin", "bigdecimal", "blob", "boolean", "break", "bulk", "by", "byte", "case", "cast",
 | 
			
		||||
                        "catch", "char", "class", "collect", "commit", "const", "continue",
 | 
			
		||||
                        "convertcurrency", "currency", "date", "datetime", "decimal", "default", "delete", "desc", "do", "else",
 | 
			
		||||
                        "currency", "date", "datetime", "decimal", "default", "delete", "desc", "do", "double", "else",
 | 
			
		||||
                        "end", "enum", "exception", "exit", "export", "extends", "false", "final",
 | 
			
		||||
                        "finally", "float", "for", "from", "future", "global", "goto", "group", "having",
 | 
			
		||||
                        "hint", "if", "implements", "import", "in", "inner", "insert", "instanceof", "int",
 | 
			
		||||
                        "interface", "into", "join", "last_90_days", "last_month", "last_n_days",
 | 
			
		||||
                        "last_week", "like", "limit", "list", "long", "loop", "map", "merge", "new",
 | 
			
		||||
                        "next_90_days", "next_month", "next_n_days", "next_week", "not", "null", "nulls",
 | 
			
		||||
                        "number", "object", "of", "on", "or", "outer", "override", "package", "parallel",
 | 
			
		||||
                        "pragma", "private", "protected", "public", "retrieve", "return", "returning",
 | 
			
		||||
                        "rollback", "savepoint", "search", "select", "set", "short", "sort", "stat",
 | 
			
		||||
                        "static", "super", "switch", "synchronized", "system", "testmethod", "then", "this",
 | 
			
		||||
                        "this_month", "this_week", "throw", "time", "today", "tolabel", "tomorrow", "transaction",
 | 
			
		||||
                        "trigger", "true", "try", "type", "undelete", "update", "upsert", "using",
 | 
			
		||||
                        "virtual", "webservice", "when", "where", "while", "yesterday"
 | 
			
		||||
                        "finally", "float", "for", "from", "global", "goto", "group", "having",
 | 
			
		||||
                        "hint", "if", "implements", "import", "in", "inner", "insert", "instanceof", "int", "integer",
 | 
			
		||||
                        "interface", "into", "join", "like", "limit", "list", "long", "loop", "map", "merge", "new",
 | 
			
		||||
                        "not", "null", "nulls", "number", "object", "of", "on", "or", "outer", "override", "package", "parallel",
 | 
			
		||||
                        "pragma", "private", "protected", "public", "retrieve", "return", 
 | 
			
		||||
                        "rollback", "select", "set", "short", "sObject", "sort", "static", "string", 
 | 
			
		||||
                        "super", "switch", "synchronized", "system", "testmethod", "then", "this",
 | 
			
		||||
                        "throw", "time", "transaction", "trigger", "true", "try", "undelete", "update", "upsert", "using",
 | 
			
		||||
                        "virtual", "void", "webservice", "when", "where", "while"
 | 
			
		||||
                ));
 | 
			
		||||
 | 
			
		||||
        languageSpecificPrimitives = new HashSet<String>(
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,7 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Describes the result of uploading an image resource
 | 
			
		||||
 */
 | 
			
		||||
public class OASApiResponse implements OAS.MappedProperties {
 | 
			
		||||
public class OASApiResponse {
 | 
			
		||||
    /**
 | 
			
		||||
     * Get code
 | 
			
		||||
     * @return code
 | 
			
		||||
@ -21,10 +21,10 @@ public class OASApiResponse implements OAS.MappedProperties {
 | 
			
		||||
    public Integer code { get; set; }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get r_type
 | 
			
		||||
     * @return r_type
 | 
			
		||||
     * Get type
 | 
			
		||||
     * @return type
 | 
			
		||||
     */
 | 
			
		||||
    public String r_type { get; set; }
 | 
			
		||||
    public String type { get; set; }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get message
 | 
			
		||||
@ -32,18 +32,10 @@ public class OASApiResponse implements OAS.MappedProperties {
 | 
			
		||||
     */
 | 
			
		||||
    public String message { get; set; }
 | 
			
		||||
 | 
			
		||||
    private static final Map<String, String> propertyMappings = new Map<String, String>{
 | 
			
		||||
        'type' => 'r_type'
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    public Map<String, String> getPropertyMappings() {
 | 
			
		||||
        return propertyMappings;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static OASApiResponse getExample() {
 | 
			
		||||
        OASApiResponse apiResponse = new OASApiResponse();
 | 
			
		||||
          apiResponse.code = 0;
 | 
			
		||||
          apiResponse.r_type = '';
 | 
			
		||||
          apiResponse.type = '';
 | 
			
		||||
          apiResponse.message = '';
 | 
			
		||||
        return apiResponse;
 | 
			
		||||
    }
 | 
			
		||||
@ -52,7 +44,7 @@ public class OASApiResponse implements OAS.MappedProperties {
 | 
			
		||||
        if (obj instanceof OASApiResponse) {           
 | 
			
		||||
            OASApiResponse apiResponse = (OASApiResponse) obj;
 | 
			
		||||
            return this.code == apiResponse.code
 | 
			
		||||
                && this.r_type == apiResponse.r_type
 | 
			
		||||
                && this.type == apiResponse.type
 | 
			
		||||
                && this.message == apiResponse.message;
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
@ -61,7 +53,7 @@ public class OASApiResponse implements OAS.MappedProperties {
 | 
			
		||||
    public Integer hashCode() {
 | 
			
		||||
        Integer hashCode = 43;
 | 
			
		||||
        hashCode = (17 * hashCode) + (code == null ? 0 : System.hashCode(code));
 | 
			
		||||
        hashCode = (17 * hashCode) + (r_type == null ? 0 : System.hashCode(r_type));
 | 
			
		||||
        hashCode = (17 * hashCode) + (type == null ? 0 : System.hashCode(type));
 | 
			
		||||
        hashCode = (17 * hashCode) + (message == null ? 0 : System.hashCode(message));
 | 
			
		||||
        return hashCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user