// Path: api-query/src/main/java/org/openweathermap/api/query/QueryRequestPartBuilder.java
// public final class QueryRequestPartBuilder {
//     public static String byCityName(CharSequence cityName, CharSequence countryCode, Type type) {
//         StringBuilder stringBuilder = new StringBuilder();
//         stringBuilder.append("q=").append(cityName);
//         if (StringUtils.isNotBlank(countryCode)) {
//             stringBuilder.append(',').append(countryCode);
//         }
//         if (type != null) {
//             stringBuilder.append(AND).append("type=").append(type.getStringRepresentation());
//         }
//         return stringBuilder.toString();
//     }
// }
// 
// Path: api-query/src/main/java/org/openweathermap/api/query/Type.java
// public enum Type {
//     ACCURATE("accurate"), LIKE("like");
//     private final String stringRepresentation;
// 
//     Type(String stringRepresentation) {
//         this.stringRepresentation = stringRepresentation;
//     }
// 
//     public static Type fromStringRepresentation(String stringRepresentation) {
//         for (Type type : values()) {
//             if (type.stringRepresentation.equals(stringRepresentation)) {
//                 return type;
//             }
//         }
//         throw new IllegalArgumentException("No Type was found with value:" + stringRepresentation);
//     }
// 
//     public String getStringRepresentation() {
//         return stringRepresentation;
//     }
// }
// 
// Path: api-query/src/main/java/org/openweathermap/api/query/forecast/AbstractForecastQuery.java
// @EqualsAndHashCode(callSuper = true)
// @Data
// public abstract class AbstractForecastQuery extends AbstractQueryWithResponseFormat implements ForecastQuery {
//     private int count;
// 
//     @Override
//     protected String getSearchPath() {
//         return ForecastQuery.SEARCH_PATH;
//     }
// 
//     @Override
//     public String toStringRepresentation(String apiKey) {
//         StringBuilder stringBuilder = new StringBuilder(super.toStringRepresentation(apiKey));
//         if (getCount() > 0) {
//             stringBuilder.append(AND).append("cnt=").append(getCount());
//         }
//         return stringBuilder.toString();
//     }
// }


import lombok.Data;
import lombok.EqualsAndHashCode;
import org.openweathermap.api.query.QueryRequestPartBuilder;
import org.openweathermap.api.query.Type;
import org.openweathermap.api.query.forecast.AbstractForecastQuery;
/*
 * Copyright 2021, Yurii Serhiichuk
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package org.openweathermap.api.query.forecast.hourly;


@EqualsAndHashCode(callSuper = true)
@Data
public class ByCityName extends AbstractForecastQuery implements HourlyForecastQuery {
    private final String cityName;
    private String countryCode;
    private Type type;

// Path: api-query/src/main/java/org/openweathermap/api/query/QueryRequestPartBuilder.java
// public final class QueryRequestPartBuilder {
//     public static String byCityName(CharSequence cityName, CharSequence countryCode, Type type) {
//         StringBuilder stringBuilder = new StringBuilder();
//         stringBuilder.append("q=").append(cityName);
//         if (StringUtils.isNotBlank(countryCode)) {
//             stringBuilder.append(',').append(countryCode);
//         }
//         if (type != null) {
//             stringBuilder.append(AND).append("type=").append(type.getStringRepresentation());
//         }
//         return stringBuilder.toString();
//     }
// }
// 
// Path: api-query/src/main/java/org/openweathermap/api/query/Type.java
// public enum Type {
//     ACCURATE("accurate"), LIKE("like");
//     private final String stringRepresentation;
// 
//     Type(String stringRepresentation) {
//         this.stringRepresentation = stringRepresentation;
//     }
// 
//     public static Type fromStringRepresentation(String stringRepresentation) {
//         for (Type type : values()) {
//             if (type.stringRepresentation.equals(stringRepresentation)) {
//                 return type;
//             }
//         }
//         throw new IllegalArgumentException("No Type was found with value:" + stringRepresentation);
//     }
// 
//     public String getStringRepresentation() {
//         return stringRepresentation;
//     }
// }
// 
// Path: api-query/src/main/java/org/openweathermap/api/query/forecast/AbstractForecastQuery.java
// @EqualsAndHashCode(callSuper = true)
// @Data
// public abstract class AbstractForecastQuery extends AbstractQueryWithResponseFormat implements ForecastQuery {
//     private int count;
// 
//     @Override
//     protected String getSearchPath() {
//         return ForecastQuery.SEARCH_PATH;
//     }
// 
//     @Override
//     public String toStringRepresentation(String apiKey) {
//         StringBuilder stringBuilder = new StringBuilder(super.toStringRepresentation(apiKey));
//         if (getCount() > 0) {
//             stringBuilder.append(AND).append("cnt=").append(getCount());
//         }
//         return stringBuilder.toString();
//     }
// }


// Path: api-query/src/main/java/org/openweathermap/api/query/forecast/hourly/ByCityName.java
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.openweathermap.api.query.QueryRequestPartBuilder;
import org.openweathermap.api.query.Type;
import org.openweathermap.api.query.forecast.AbstractForecastQuery;

/*
 * Copyright 2021, Yurii Serhiichuk
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package org.openweathermap.api.query.forecast.hourly;


@EqualsAndHashCode(callSuper = true)
@Data
public class ByCityName extends AbstractForecastQuery implements HourlyForecastQuery {
    private final String cityName;
    private String countryCode;
    private Type type;

    public ByCityName(String cityName) {