-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Librarian] Regenerated @ d9b0f7b0297f064eec2f219b29fd4193559c54f3 40…
…5f363a58346c6557d4194de16d9911b797e208
- Loading branch information
Showing
8 changed files
with
413 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
210 changes: 210 additions & 0 deletions
210
src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
/* | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* Twilio - Marketplace | ||
* This is the public Twilio REST API. | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator. | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
package com.twilio.rest.marketplace.v1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.core.JsonParseException; | ||
import com.fasterxml.jackson.databind.JsonMappingException; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.twilio.base.Resource; | ||
import com.twilio.exception.ApiConnectionException; | ||
import com.twilio.exception.ApiException; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.net.URI; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
import lombok.ToString; | ||
import lombok.ToString; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@ToString | ||
public class ModuleData extends Resource { | ||
|
||
private static final long serialVersionUID = 132859226086963L; | ||
|
||
public static ModuleDataCreator creator() { | ||
return new ModuleDataCreator(); | ||
} | ||
|
||
public static ModuleDataFetcher fetcher() { | ||
return new ModuleDataFetcher(); | ||
} | ||
|
||
/** | ||
* Converts a JSON String into a ModuleData object using the provided ObjectMapper. | ||
* | ||
* @param json Raw JSON String | ||
* @param objectMapper Jackson ObjectMapper | ||
* @return ModuleData object represented by the provided JSON | ||
*/ | ||
public static ModuleData fromJson( | ||
final String json, | ||
final ObjectMapper objectMapper | ||
) { | ||
// Convert all checked exceptions to Runtime | ||
try { | ||
return objectMapper.readValue(json, ModuleData.class); | ||
} catch (final JsonMappingException | JsonParseException e) { | ||
throw new ApiException(e.getMessage(), e); | ||
} catch (final IOException e) { | ||
throw new ApiConnectionException(e.getMessage(), e); | ||
} | ||
} | ||
|
||
/** | ||
* Converts a JSON InputStream into a ModuleData object using the provided | ||
* ObjectMapper. | ||
* | ||
* @param json Raw JSON InputStream | ||
* @param objectMapper Jackson ObjectMapper | ||
* @return ModuleData object represented by the provided JSON | ||
*/ | ||
public static ModuleData fromJson( | ||
final InputStream json, | ||
final ObjectMapper objectMapper | ||
) { | ||
// Convert all checked exceptions to Runtime | ||
try { | ||
return objectMapper.readValue(json, ModuleData.class); | ||
} catch (final JsonMappingException | JsonParseException e) { | ||
throw new ApiException(e.getMessage(), e); | ||
} catch (final IOException e) { | ||
throw new ApiConnectionException(e.getMessage(), e); | ||
} | ||
} | ||
|
||
private final URI url; | ||
private final String sid; | ||
private final Map<String, Object> description; | ||
private final Map<String, Object> support; | ||
private final Map<String, Object> policies; | ||
private final Map<String, Object> moduleInfo; | ||
private final Map<String, Object> documentation; | ||
private final Map<String, Object> configuration; | ||
private final Map<String, Object> pricing; | ||
private final List<Map<String, Object>> listings; | ||
|
||
@JsonCreator | ||
private ModuleData( | ||
@JsonProperty("url") final URI url, | ||
@JsonProperty("sid") final String sid, | ||
@JsonProperty("description") final Map<String, Object> description, | ||
@JsonProperty("support") final Map<String, Object> support, | ||
@JsonProperty("policies") final Map<String, Object> policies, | ||
@JsonProperty("module_info") final Map<String, Object> moduleInfo, | ||
@JsonProperty("documentation") final Map<String, Object> documentation, | ||
@JsonProperty("configuration") final Map<String, Object> configuration, | ||
@JsonProperty("pricing") final Map<String, Object> pricing, | ||
@JsonProperty("listings") final List<Map<String, Object>> listings | ||
) { | ||
this.url = url; | ||
this.sid = sid; | ||
this.description = description; | ||
this.support = support; | ||
this.policies = policies; | ||
this.moduleInfo = moduleInfo; | ||
this.documentation = documentation; | ||
this.configuration = configuration; | ||
this.pricing = pricing; | ||
this.listings = listings; | ||
} | ||
|
||
public final URI getUrl() { | ||
return this.url; | ||
} | ||
|
||
public final String getSid() { | ||
return this.sid; | ||
} | ||
|
||
public final Map<String, Object> getDescription() { | ||
return this.description; | ||
} | ||
|
||
public final Map<String, Object> getSupport() { | ||
return this.support; | ||
} | ||
|
||
public final Map<String, Object> getPolicies() { | ||
return this.policies; | ||
} | ||
|
||
public final Map<String, Object> getModuleInfo() { | ||
return this.moduleInfo; | ||
} | ||
|
||
public final Map<String, Object> getDocumentation() { | ||
return this.documentation; | ||
} | ||
|
||
public final Map<String, Object> getConfiguration() { | ||
return this.configuration; | ||
} | ||
|
||
public final Map<String, Object> getPricing() { | ||
return this.pricing; | ||
} | ||
|
||
public final List<Map<String, Object>> getListings() { | ||
return this.listings; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
|
||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
ModuleData other = (ModuleData) o; | ||
|
||
return ( | ||
Objects.equals(url, other.url) && | ||
Objects.equals(sid, other.sid) && | ||
Objects.equals(description, other.description) && | ||
Objects.equals(support, other.support) && | ||
Objects.equals(policies, other.policies) && | ||
Objects.equals(moduleInfo, other.moduleInfo) && | ||
Objects.equals(documentation, other.documentation) && | ||
Objects.equals(configuration, other.configuration) && | ||
Objects.equals(pricing, other.pricing) && | ||
Objects.equals(listings, other.listings) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash( | ||
url, | ||
sid, | ||
description, | ||
support, | ||
policies, | ||
moduleInfo, | ||
documentation, | ||
configuration, | ||
pricing, | ||
listings | ||
); | ||
} | ||
} |
Oops, something went wrong.