All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blazebit.expression.azure.subscription.model.Location Maven / Gradle / Ivy

The newest version!
/*
 * SubscriptionClient
 * All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.
 *
 * The version of the OpenAPI document: 2022-12-01
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.blazebit.expression.azure.subscription.model;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.blazebit.expression.azure.subscription.model.AvailabilityZoneMappings;
import com.blazebit.expression.azure.subscription.model.LocationMetadata;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.blazebit.expression.azure.invoker.JSON;


/**
 * Location information.
 */
@JsonPropertyOrder({
  Location.JSON_PROPERTY_ID,
  Location.JSON_PROPERTY_SUBSCRIPTION_ID,
  Location.JSON_PROPERTY_NAME,
  Location.JSON_PROPERTY_TYPE,
  Location.JSON_PROPERTY_DISPLAY_NAME,
  Location.JSON_PROPERTY_REGIONAL_DISPLAY_NAME,
  Location.JSON_PROPERTY_METADATA,
  Location.JSON_PROPERTY_AVAILABILITY_ZONE_MAPPINGS
})
@com.blazebit.domain.declarative.DomainType
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-27T17:30:38.203241700+01:00[Europe/Berlin]", comments = "Generator version: 7.5.0")
public class Location {
  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_SUBSCRIPTION_ID = "subscriptionId";
  private String subscriptionId;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  /**
   * The location type.
   */
  @com.blazebit.domain.declarative.DomainType
public enum TypeEnum {
    REGION("Region"),
    
    EDGEZONE("EdgeZone");

    private String value;

    TypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static TypeEnum fromValue(String value) {
      for (TypeEnum b : TypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_TYPE = "type";
  private TypeEnum type;

  public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName";
  private String displayName;

  public static final String JSON_PROPERTY_REGIONAL_DISPLAY_NAME = "regionalDisplayName";
  private String regionalDisplayName;

  public static final String JSON_PROPERTY_METADATA = "metadata";
  private LocationMetadata metadata;

  public static final String JSON_PROPERTY_AVAILABILITY_ZONE_MAPPINGS = "availabilityZoneMappings";
  private List availabilityZoneMappings = new ArrayList<>();

  public Location() { 
  }

  @JsonCreator
  public Location(
    @JsonProperty(JSON_PROPERTY_ID) String id, 
    @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_ID) String subscriptionId, 
    @JsonProperty(JSON_PROPERTY_NAME) String name, 
    @JsonProperty(JSON_PROPERTY_TYPE) TypeEnum type, 
    @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) String displayName, 
    @JsonProperty(JSON_PROPERTY_REGIONAL_DISPLAY_NAME) String regionalDisplayName
  ) {
    this();
    this.id = id;
    this.subscriptionId = subscriptionId;
    this.name = name;
    this.type = type;
    this.displayName = displayName;
    this.regionalDisplayName = regionalDisplayName;
  }

   /**
   * The fully qualified ID of the location. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus.
   * @return id
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getId() {
    return id;
  }




   /**
   * The subscription ID.
   * @return subscriptionId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSubscriptionId() {
    return subscriptionId;
  }




   /**
   * The location name.
   * @return name
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }




   /**
   * The location type.
   * @return type
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public TypeEnum getType() {
    return type;
  }




   /**
   * The display name of the location.
   * @return displayName
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DISPLAY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDisplayName() {
    return displayName;
  }




   /**
   * The display name of the location and its region.
   * @return regionalDisplayName
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_REGIONAL_DISPLAY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getRegionalDisplayName() {
    return regionalDisplayName;
  }




  public Location metadata(LocationMetadata metadata) {
    this.metadata = metadata;
    return this;
  }

   /**
   * Get metadata
   * @return metadata
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public LocationMetadata getMetadata() {
    return metadata;
  }


  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMetadata(LocationMetadata metadata) {
    this.metadata = metadata;
  }


  public Location availabilityZoneMappings(List availabilityZoneMappings) {
    this.availabilityZoneMappings = availabilityZoneMappings;
    return this;
  }

  public Location addAvailabilityZoneMappingsItem(AvailabilityZoneMappings availabilityZoneMappingsItem) {
    if (this.availabilityZoneMappings == null) {
      this.availabilityZoneMappings = new ArrayList<>();
    }
    this.availabilityZoneMappings.add(availabilityZoneMappingsItem);
    return this;
  }

   /**
   * The availability zone mappings for this region.
   * @return availabilityZoneMappings
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_AVAILABILITY_ZONE_MAPPINGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getAvailabilityZoneMappings() {
    return availabilityZoneMappings;
  }


  @JsonProperty(JSON_PROPERTY_AVAILABILITY_ZONE_MAPPINGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAvailabilityZoneMappings(List availabilityZoneMappings) {
    this.availabilityZoneMappings = availabilityZoneMappings;
  }


  /**
   * Return true if this Location object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Location location = (Location) o;
    return Objects.equals(this.id, location.id) &&
        Objects.equals(this.subscriptionId, location.subscriptionId) &&
        Objects.equals(this.name, location.name) &&
        Objects.equals(this.type, location.type) &&
        Objects.equals(this.displayName, location.displayName) &&
        Objects.equals(this.regionalDisplayName, location.regionalDisplayName) &&
        Objects.equals(this.metadata, location.metadata) &&
        Objects.equals(this.availabilityZoneMappings, location.availabilityZoneMappings);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, subscriptionId, name, type, displayName, regionalDisplayName, metadata, availabilityZoneMappings);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Location {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\n");
    sb.append("    regionalDisplayName: ").append(toIndentedString(regionalDisplayName)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    availabilityZoneMappings: ").append(toIndentedString(availabilityZoneMappings)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy