-
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 @ 08c0904bec7ba6e5da9e5db6c4e0f74dfc97fb10
- Loading branch information
Showing
8 changed files
with
636 additions
and
21 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
231 changes: 231 additions & 0 deletions
231
src/main/java/com/twilio/rest/numbers/v1/PortingPortInFetch.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,231 @@ | ||
/* | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* Twilio - Numbers | ||
* 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.numbers.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.converter.DateConverter; | ||
import com.twilio.exception.ApiConnectionException; | ||
import com.twilio.exception.ApiException; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.net.URI; | ||
import java.time.LocalDate; | ||
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 PortingPortInFetch extends Resource { | ||
|
||
private static final long serialVersionUID = 150418680319007L; | ||
|
||
public static PortingPortInFetchFetcher fetcher( | ||
final String pathPortInRequestSid | ||
) { | ||
return new PortingPortInFetchFetcher(pathPortInRequestSid); | ||
} | ||
|
||
/** | ||
* Converts a JSON String into a PortingPortInFetch object using the provided ObjectMapper. | ||
* | ||
* @param json Raw JSON String | ||
* @param objectMapper Jackson ObjectMapper | ||
* @return PortingPortInFetch object represented by the provided JSON | ||
*/ | ||
public static PortingPortInFetch fromJson( | ||
final String json, | ||
final ObjectMapper objectMapper | ||
) { | ||
// Convert all checked exceptions to Runtime | ||
try { | ||
return objectMapper.readValue(json, PortingPortInFetch.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 PortingPortInFetch object using the provided | ||
* ObjectMapper. | ||
* | ||
* @param json Raw JSON InputStream | ||
* @param objectMapper Jackson ObjectMapper | ||
* @return PortingPortInFetch object represented by the provided JSON | ||
*/ | ||
public static PortingPortInFetch fromJson( | ||
final InputStream json, | ||
final ObjectMapper objectMapper | ||
) { | ||
// Convert all checked exceptions to Runtime | ||
try { | ||
return objectMapper.readValue(json, PortingPortInFetch.class); | ||
} catch (final JsonMappingException | JsonParseException e) { | ||
throw new ApiException(e.getMessage(), e); | ||
} catch (final IOException e) { | ||
throw new ApiConnectionException(e.getMessage(), e); | ||
} | ||
} | ||
|
||
private final String portInRequestSid; | ||
private final URI url; | ||
private final String accountSid; | ||
private final List<String> notificationEmails; | ||
private final LocalDate targetPortInDate; | ||
private final String targetPortInTimeRangeStart; | ||
private final String targetPortInTimeRangeEnd; | ||
private final Map<String, Object> losingCarrierInformation; | ||
private final List<Map<String, Object>> phoneNumbers; | ||
private final List<String> documents; | ||
|
||
@JsonCreator | ||
private PortingPortInFetch( | ||
@JsonProperty("port_in_request_sid") final String portInRequestSid, | ||
@JsonProperty("url") final URI url, | ||
@JsonProperty("account_sid") final String accountSid, | ||
@JsonProperty("notification_emails") final List< | ||
String | ||
> notificationEmails, | ||
@JsonProperty("target_port_in_date") final String targetPortInDate, | ||
@JsonProperty( | ||
"target_port_in_time_range_start" | ||
) final String targetPortInTimeRangeStart, | ||
@JsonProperty( | ||
"target_port_in_time_range_end" | ||
) final String targetPortInTimeRangeEnd, | ||
@JsonProperty("losing_carrier_information") final Map< | ||
String, | ||
Object | ||
> losingCarrierInformation, | ||
@JsonProperty("phone_numbers") final List< | ||
Map<String, Object> | ||
> phoneNumbers, | ||
@JsonProperty("documents") final List<String> documents | ||
) { | ||
this.portInRequestSid = portInRequestSid; | ||
this.url = url; | ||
this.accountSid = accountSid; | ||
this.notificationEmails = notificationEmails; | ||
this.targetPortInDate = | ||
DateConverter.localDateFromString(targetPortInDate); | ||
this.targetPortInTimeRangeStart = targetPortInTimeRangeStart; | ||
this.targetPortInTimeRangeEnd = targetPortInTimeRangeEnd; | ||
this.losingCarrierInformation = losingCarrierInformation; | ||
this.phoneNumbers = phoneNumbers; | ||
this.documents = documents; | ||
} | ||
|
||
public final String getPortInRequestSid() { | ||
return this.portInRequestSid; | ||
} | ||
|
||
public final URI getUrl() { | ||
return this.url; | ||
} | ||
|
||
public final String getAccountSid() { | ||
return this.accountSid; | ||
} | ||
|
||
public final List<String> getNotificationEmails() { | ||
return this.notificationEmails; | ||
} | ||
|
||
public final LocalDate getTargetPortInDate() { | ||
return this.targetPortInDate; | ||
} | ||
|
||
public final String getTargetPortInTimeRangeStart() { | ||
return this.targetPortInTimeRangeStart; | ||
} | ||
|
||
public final String getTargetPortInTimeRangeEnd() { | ||
return this.targetPortInTimeRangeEnd; | ||
} | ||
|
||
public final Map<String, Object> getLosingCarrierInformation() { | ||
return this.losingCarrierInformation; | ||
} | ||
|
||
public final List<Map<String, Object>> getPhoneNumbers() { | ||
return this.phoneNumbers; | ||
} | ||
|
||
public final List<String> getDocuments() { | ||
return this.documents; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
|
||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
PortingPortInFetch other = (PortingPortInFetch) o; | ||
|
||
return ( | ||
Objects.equals(portInRequestSid, other.portInRequestSid) && | ||
Objects.equals(url, other.url) && | ||
Objects.equals(accountSid, other.accountSid) && | ||
Objects.equals(notificationEmails, other.notificationEmails) && | ||
Objects.equals(targetPortInDate, other.targetPortInDate) && | ||
Objects.equals( | ||
targetPortInTimeRangeStart, | ||
other.targetPortInTimeRangeStart | ||
) && | ||
Objects.equals( | ||
targetPortInTimeRangeEnd, | ||
other.targetPortInTimeRangeEnd | ||
) && | ||
Objects.equals( | ||
losingCarrierInformation, | ||
other.losingCarrierInformation | ||
) && | ||
Objects.equals(phoneNumbers, other.phoneNumbers) && | ||
Objects.equals(documents, other.documents) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash( | ||
portInRequestSid, | ||
url, | ||
accountSid, | ||
notificationEmails, | ||
targetPortInDate, | ||
targetPortInTimeRangeStart, | ||
targetPortInTimeRangeEnd, | ||
losingCarrierInformation, | ||
phoneNumbers, | ||
documents | ||
); | ||
} | ||
} |
Oops, something went wrong.