Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update auto-generated files
  • Loading branch information
ericasp16 committed Nov 17, 2023
commit 498c76bd67a4938a8f3cfe4eb8e3843456d3fc00
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public PhoneNumberAdminClientImpl buildClient() {
this.pipeline = createHttpPipeline();
}
if (apiVersion == null) {
this.apiVersion = "2023-05-01-preview";
this.apiVersion = "2024-03-01";
}
if (serializerAdapter == null) {
this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2085,14 +2085,14 @@ public PagedIterable<PurchasedPhoneNumber> listPhoneNumbers(Integer skip, Intege
}

/**
* Searches for operator information for a given list of phone numbers.
* Searches for number format and operator information for a given list of phone numbers.
*
* @param body The phone number(s) whose operator information should be searched.
* @param body The phone number(s) whose number format and operator information should be searched.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CommunicationErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a search result containing operator information associated with the requested phone numbers
* along with {@link Response} on successful completion of {@link Mono}.
* @return represents a search result containing format and operator information associated with the requested phone
* numbers along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<OperatorInformationResult>> operatorInformationSearchWithResponseAsync(
Expand All @@ -2105,15 +2105,15 @@ public Mono<Response<OperatorInformationResult>> operatorInformationSearchWithRe
}

/**
* Searches for operator information for a given list of phone numbers.
* Searches for number format and operator information for a given list of phone numbers.
*
* @param body The phone number(s) whose operator information should be searched.
* @param body The phone number(s) whose number format and operator information should be searched.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CommunicationErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a search result containing operator information associated with the requested phone numbers
* along with {@link Response} on successful completion of {@link Mono}.
* @return represents a search result containing format and operator information associated with the requested phone
* numbers along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<OperatorInformationResult>> operatorInformationSearchWithResponseAsync(
Expand All @@ -2124,30 +2124,30 @@ public Mono<Response<OperatorInformationResult>> operatorInformationSearchWithRe
}

/**
* Searches for operator information for a given list of phone numbers.
* Searches for number format and operator information for a given list of phone numbers.
*
* @param body The phone number(s) whose operator information should be searched.
* @param body The phone number(s) whose number format and operator information should be searched.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CommunicationErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a search result containing operator information associated with the requested phone numbers on
* successful completion of {@link Mono}.
* @return represents a search result containing format and operator information associated with the requested phone
* numbers on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<OperatorInformationResult> operatorInformationSearchAsync(OperatorInformationRequest body) {
return operatorInformationSearchWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}

/**
* Searches for operator information for a given list of phone numbers.
* Searches for number format and operator information for a given list of phone numbers.
*
* @param body The phone number(s) whose operator information should be searched.
* @param body The phone number(s) whose number format and operator information should be searched.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CommunicationErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a search result containing operator information associated with the requested phone numbers on
* successful completion of {@link Mono}.
* @return represents a search result containing format and operator information associated with the requested phone
* numbers on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<OperatorInformationResult> operatorInformationSearchAsync(
Expand All @@ -2157,29 +2157,30 @@ public Mono<OperatorInformationResult> operatorInformationSearchAsync(
}

/**
* Searches for operator information for a given list of phone numbers.
* Searches for number format and operator information for a given list of phone numbers.
*
* @param body The phone number(s) whose operator information should be searched.
* @param body The phone number(s) whose number format and operator information should be searched.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CommunicationErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a search result containing operator information associated with the requested phone numbers.
* @return represents a search result containing format and operator information associated with the requested phone
* numbers.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public OperatorInformationResult operatorInformationSearch(OperatorInformationRequest body) {
return operatorInformationSearchAsync(body).block();
}

/**
* Searches for operator information for a given list of phone numbers.
* Searches for number format and operator information for a given list of phone numbers.
*
* @param body The phone number(s) whose operator information should be searched.
* @param body The phone number(s) whose number format and operator information should be searched.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CommunicationErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a search result containing operator information associated with the requested phone numbers
* along with {@link Response}.
* @return represents a search result containing format and operator information associated with the requested phone
* numbers along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<OperatorInformationResult> operatorInformationSearchWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The CommunicationError model. */
@Generated
/** The Communication Services error. */
@Fluent
public final class CommunicationError {
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The Communication Services error. */
@Fluent
@Generated
public final class CommunicationErrorResponse {
/*
* The Communication Services error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.http.HttpResponse;

/** Exception thrown for an invalid response with CommunicationErrorResponse information. */
@Generated
public final class CommunicationErrorResponseException extends HttpResponseException {
/**
* Initializes a new instance of the CommunicationErrorResponseException class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberOffering;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Represents a wrapper around a list of offerings. */
@Immutable
@Generated
public final class OfferingsResponse {
/*
* Represents the underlying list of offerings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public final class OperatorInformationRequest {
@JsonProperty(value = "phoneNumbers")
private List<String> phoneNumbers;

/*
* Represents options to modify a search request for operator information
*/
@JsonProperty(value = "options")
private OperatorInformationRequestOptions options;

/**
* Get the phoneNumbers property: Phone number(s) whose operator information is being requested.
*
Expand All @@ -36,4 +42,24 @@ public OperatorInformationRequest setPhoneNumbers(List<String> phoneNumbers) {
this.phoneNumbers = phoneNumbers;
return this;
}

/**
* Get the options property: Represents options to modify a search request for operator information.
*
* @return the options value.
*/
public OperatorInformationRequestOptions getOptions() {
return this.options;
}

/**
* Set the options property: Represents options to modify a search request for operator information.
*
* @param options the options value to set.
* @return the OperatorInformationRequest object itself.
*/
public OperatorInformationRequest setOptions(OperatorInformationRequestOptions options) {
this.options = options;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Represents options to modify a search request for operator information. */
@Fluent
public final class OperatorInformationRequestOptions {
/*
* Includes the fields operatorDetails, numberType, and isoCountryCode in
* the response. Please note: use of this option will result in additional
* costs
*/
@JsonProperty(value = "includeAdditionalPhoneAndOperatorDetails")
private Boolean includeAdditionalPhoneAndOperatorDetails;

/**
* Get the includeAdditionalPhoneAndOperatorDetails property: Includes the fields operatorDetails, numberType, and
* isoCountryCode in the response. Please note: use of this option will result in additional costs.
*
* @return the includeAdditionalPhoneAndOperatorDetails value.
*/
public Boolean isIncludeAdditionalPhoneAndOperatorDetails() {
return this.includeAdditionalPhoneAndOperatorDetails;
}

/**
* Set the includeAdditionalPhoneAndOperatorDetails property: Includes the fields operatorDetails, numberType, and
* isoCountryCode in the response. Please note: use of this option will result in additional costs.
*
* @param includeAdditionalPhoneAndOperatorDetails the includeAdditionalPhoneAndOperatorDetails value to set.
* @return the OperatorInformationRequestOptions object itself.
*/
public OperatorInformationRequestOptions setIncludeAdditionalPhoneAndOperatorDetails(
Boolean includeAdditionalPhoneAndOperatorDetails) {
this.includeAdditionalPhoneAndOperatorDetails = includeAdditionalPhoneAndOperatorDetails;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberAreaCode;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The list of available area codes. */
@Immutable
@Generated
public final class PhoneNumberAreaCodes {
/*
* Represents a list of available toll-free area codes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberCapabilityType;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Capabilities of a phone number. */
@Fluent
@Generated
public final class PhoneNumberCapabilitiesRequest {
/*
* Capability value for calling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberCountry;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Represents a wrapper around a list of countries. */
@Immutable
@Generated
public final class PhoneNumberCountries {
/*
* Represents the underlying list of countries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberLocality;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Represents a wrapper around a list of cities or towns. */
@Immutable
@Generated
public final class PhoneNumberLocalities {
/*
* Represents the underlying list of localities, e.g. cities or town.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The phone number search purchase request. */
@Fluent
@Generated
public final class PhoneNumberPurchaseRequest {
/*
* The search id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberOperationStatus;
import com.azure.communication.phonenumbers.models.PhoneNumberOperationType;
import com.azure.core.annotation.Fluent;
Expand All @@ -13,7 +12,6 @@

/** The PhoneNumberRawOperation model. */
@Fluent
@Generated
public final class PhoneNumberRawOperation {
/*
* The type of operation, e.g. Search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.communication.phonenumbers.models.PhoneNumberAssignmentType;
import com.azure.communication.phonenumbers.models.PhoneNumberCapabilities;
import com.azure.communication.phonenumbers.models.PhoneNumberType;
Expand All @@ -16,7 +15,6 @@
* following purchase.
*/
@Fluent
@Generated
public final class PhoneNumberSearchRequest {
/*
* The type of phone numbers to search for, e.g. geographic, or tollFree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

package com.azure.communication.phonenumbers.implementation.models;

import com.azure.communication.phonenumbers.CodeCoverageAnnotation.Generated;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The PhoneNumbersGetOperationHeaders model. */
@Fluent
@Generated
public final class PhoneNumbersGetOperationHeaders {
/*
* The Location property.
Expand Down
Loading