/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.classroom.model;

/**
 * Alternative identifier for a course. An alias uniquely identifies a course. It must be unique
 * within one of the following scopes: * domain: A domain-scoped alias is visible to all users
 * within the alias creator's domain and can be created only by a domain admin. A domain-scoped
 * alias is often used when a course has an identifier external to Classroom. * project: A project-
 * scoped alias is visible to any request from an application using the Developer Console project ID
 * that created the alias and can be created by any project. A project-scoped alias is often used
 * when an application has alternative identifiers. A random value can also be used to avoid
 * duplicate courses in the event of transmission failures, as retrying a request will return
 * `ALREADY_EXISTS` if a previous one has succeeded.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Classroom API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class CourseAlias extends com.google.api.client.json.GenericJson {

  /**
   * Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a
   * domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias. Example:
   * `p:abc123` This field has a maximum length of 256 characters.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String alias;

  /**
   * Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a
   * domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias. Example:
   * `p:abc123` This field has a maximum length of 256 characters.
   * @return value or {@code null} for none
   */
  public java.lang.String getAlias() {
    return alias;
  }

  /**
   * Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a
   * domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias. Example:
   * `p:abc123` This field has a maximum length of 256 characters.
   * @param alias alias or {@code null} for none
   */
  public CourseAlias setAlias(java.lang.String alias) {
    this.alias = alias;
    return this;
  }

  @Override
  public CourseAlias set(String fieldName, Object value) {
    return (CourseAlias) super.set(fieldName, value);
  }

  @Override
  public CourseAlias clone() {
    return (CourseAlias) super.clone();
  }

}
