Class ResponsesWebSearchApproximateLocation

java.lang.Object
com.azure.ai.openai.responses.models.ResponsesWebSearchLocation
com.azure.ai.openai.responses.models.ResponsesWebSearchApproximateLocation
All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponsesWebSearchLocation>

public final class ResponsesWebSearchApproximateLocation extends ResponsesWebSearchLocation
The ResponsesWebSearchApproximateLocation model.
  • Constructor Details

    • ResponsesWebSearchApproximateLocation

      public ResponsesWebSearchApproximateLocation()
      Creates an instance of ResponsesWebSearchApproximateLocation class.
  • Method Details

    • getType

      public String getType()
      Get the type property: The type property.
      Overrides:
      getType in class ResponsesWebSearchLocation
      Returns:
      the type value.
    • getCountry

      public String getCountry()
      Get the country property: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
      Returns:
      the country value.
    • setCountry

      public ResponsesWebSearchApproximateLocation setCountry(String country)
      Set the country property: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
      Parameters:
      country - the country value to set.
      Returns:
      the ResponsesWebSearchApproximateLocation object itself.
    • getRegion

      public String getRegion()
      Get the region property: Free text input for the region of the user, e.g. `California`.
      Returns:
      the region value.
    • setRegion

      public ResponsesWebSearchApproximateLocation setRegion(String region)
      Set the region property: Free text input for the region of the user, e.g. `California`.
      Parameters:
      region - the region value to set.
      Returns:
      the ResponsesWebSearchApproximateLocation object itself.
    • getCity

      public String getCity()
      Get the city property: Free text input for the city of the user, e.g. `San Francisco`.
      Returns:
      the city value.
    • setCity

      Set the city property: Free text input for the city of the user, e.g. `San Francisco`.
      Parameters:
      city - the city value to set.
      Returns:
      the ResponsesWebSearchApproximateLocation object itself.
    • getTimezone

      public String getTimezone()
      Get the timezone property: The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
      Returns:
      the timezone value.
    • setTimezone

      public ResponsesWebSearchApproximateLocation setTimezone(String timezone)
      Set the timezone property: The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
      Parameters:
      timezone - the timezone value to set.
      Returns:
      the ResponsesWebSearchApproximateLocation object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ResponsesWebSearchLocation>
      Overrides:
      toJson in class ResponsesWebSearchLocation
      Throws:
      IOException
    • fromJson

      public static ResponsesWebSearchApproximateLocation fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResponsesWebSearchApproximateLocation from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResponsesWebSearchApproximateLocation if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ResponsesWebSearchApproximateLocation.