// Path: src/main/java/com/google/adwords/scripts/solutions/linkchecker/urlcheck/UrlCheckStatus.java
// @Cache
// @Entity
// public class UrlCheckStatus {
//   /**
//    * Represents the status of the job. Initial state is always NOT_STARTED, with the other states
//    * representing final states.
//    */
//   public enum Status {
//     SUCCESS,
//     FAILURE,
//     NOT_STARTED
//   }
// 
//   @Id private final String id = UUID.randomUUID().toString();
//   private String url;
// 
//   @ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
//   private Status status;
// 
//   private String message;
//   private int httpStatusCode;
// 
//   public UrlCheckStatus() {};
// 
//   private UrlCheckStatus(String url, String message) {
//     this.url = url;
//     this.status = Status.NOT_STARTED;
//     this.message = message;
//   }
// 
//   /**
//    * Creates a new instance to hold the status based on URL.
//    *
//    * @param url The URL to check.
//    * @return a new {@code UrlCheckStatus} object.
//    */
//   public static UrlCheckStatus fromUrl(String url) {
//     return new UrlCheckStatus(url, "unchecked-error");
//   }
// 
//   public Status getStatus() {
//     return status;
//   }
// 
//   public String getMessage() {
//     return message;
//   }
// 
//   public String getUrl() {
//     return url;
//   }
// 
//   public int getHttpStatusCode() {
//     return httpStatusCode;
//   }
// 
//   public void setStatus(Status status, int httpStatusCode, String message) {
//     this.status = status;
//     this.httpStatusCode = httpStatusCode;
//     this.message = message;
//   }
// }


import com.google.adwords.scripts.solutions.linkchecker.urlcheck.UrlCheckStatus;
import com.googlecode.objectify.Ref;
import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Load;
import com.googlecode.objectify.annotation.Parent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
// Copyright 2017, Google Inc. All Rights Reserved.
//
// 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 com.google.adwords.scripts.solutions.linkchecker.model;


/**
 * Class to represent a sub operation. This unit of work is taken on by a single TaskQueue entry.
 */
@Cache
@Entity
public class BatchSubOperation {
  public static final int MAX_URLS = 100;
  
  @Id private String id;
// Path: src/main/java/com/google/adwords/scripts/solutions/linkchecker/urlcheck/UrlCheckStatus.java
// @Cache
// @Entity
// public class UrlCheckStatus {
//   /**
//    * Represents the status of the job. Initial state is always NOT_STARTED, with the other states
//    * representing final states.
//    */
//   public enum Status {
//     SUCCESS,
//     FAILURE,
//     NOT_STARTED
//   }
// 
//   @Id private final String id = UUID.randomUUID().toString();
//   private String url;
// 
//   @ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
//   private Status status;
// 
//   private String message;
//   private int httpStatusCode;
// 
//   public UrlCheckStatus() {};
// 
//   private UrlCheckStatus(String url, String message) {
//     this.url = url;
//     this.status = Status.NOT_STARTED;
//     this.message = message;
//   }
// 
//   /**
//    * Creates a new instance to hold the status based on URL.
//    *
//    * @param url The URL to check.
//    * @return a new {@code UrlCheckStatus} object.
//    */
//   public static UrlCheckStatus fromUrl(String url) {
//     return new UrlCheckStatus(url, "unchecked-error");
//   }
// 
//   public Status getStatus() {
//     return status;
//   }
// 
//   public String getMessage() {
//     return message;
//   }
// 
//   public String getUrl() {
//     return url;
//   }
// 
//   public int getHttpStatusCode() {
//     return httpStatusCode;
//   }
// 
//   public void setStatus(Status status, int httpStatusCode, String message) {
//     this.status = status;
//     this.httpStatusCode = httpStatusCode;
//     this.message = message;
//   }
// }


// Path: src/main/java/com/google/adwords/scripts/solutions/linkchecker/model/BatchSubOperation.java
import com.google.adwords.scripts.solutions.linkchecker.urlcheck.UrlCheckStatus;
import com.googlecode.objectify.Ref;
import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Load;
import com.googlecode.objectify.annotation.Parent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

// Copyright 2017, Google Inc. All Rights Reserved.
//
// 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 com.google.adwords.scripts.solutions.linkchecker.model;


/**
 * Class to represent a sub operation. This unit of work is taken on by a single TaskQueue entry.
 */
@Cache
@Entity
public class BatchSubOperation {
  public static final int MAX_URLS = 100;
  
  @Id private String id;
  private List<UrlCheckStatus> urlStatuses;