/*
 * 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.analyticshub.v1beta1.model;

/**
 * A listing is what gets published into a data exchange that a subscriber can subscribe to. It
 * contains a reference to the data source along with descriptive information that will help
 * subscribers find and subscribe the data.
 *
 * <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 Analytics Hub 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 Listing extends com.google.api.client.json.GenericJson {

  /**
   * Required. Shared dataset i.e. BigQuery dataset source.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private BigQueryDatasetSource bigqueryDataset;

  /**
   * Optional. Categories of the listing. Up to two categories are allowed.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> categories;

  /**
   * Optional. Details of the data provider who owns the source data.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DataProvider dataProvider;

  /**
   * Optional. Short description of the listing. The description must not contain Unicode non-
   * characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR),
   * and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String description;

  /**
   * Required. Human-readable display name of the listing. The display name must contain only
   * Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and
   * can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * Optional. Documentation describing the listing.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String documentation;

  /**
   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image
   * dimensions are 512x512 pixels, however the API only performs validation on size of the encoded
   * data. Note: For byte fields, the contents of the field are base64-encoded (which increases the
   * size of the data by 33-36%) when using JSON on the wire.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String icon;

  /**
   * Output only. The resource name of the listing. e.g.
   * `projects/myproject/locations/US/dataExchanges/123/listings/456`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String primaryContact;

  /**
   * Optional. Details of the publisher who owns the listing and who can share the source data.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Publisher publisher;

  /**
   * Optional. Email or URL of the request access of the listing. Subscribers can use this reference
   * to request access. Max Length: 1000 bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String requestAccess;

  /**
   * Optional. If set, restricted export configuration will be propagated and enforced on the linked
   * dataset.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private RestrictedExportConfig restrictedExportConfig;

  /**
   * Output only. Current state of the listing.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * Required. Shared dataset i.e. BigQuery dataset source.
   * @return value or {@code null} for none
   */
  public BigQueryDatasetSource getBigqueryDataset() {
    return bigqueryDataset;
  }

  /**
   * Required. Shared dataset i.e. BigQuery dataset source.
   * @param bigqueryDataset bigqueryDataset or {@code null} for none
   */
  public Listing setBigqueryDataset(BigQueryDatasetSource bigqueryDataset) {
    this.bigqueryDataset = bigqueryDataset;
    return this;
  }

  /**
   * Optional. Categories of the listing. Up to two categories are allowed.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getCategories() {
    return categories;
  }

  /**
   * Optional. Categories of the listing. Up to two categories are allowed.
   * @param categories categories or {@code null} for none
   */
  public Listing setCategories(java.util.List<java.lang.String> categories) {
    this.categories = categories;
    return this;
  }

  /**
   * Optional. Details of the data provider who owns the source data.
   * @return value or {@code null} for none
   */
  public DataProvider getDataProvider() {
    return dataProvider;
  }

  /**
   * Optional. Details of the data provider who owns the source data.
   * @param dataProvider dataProvider or {@code null} for none
   */
  public Listing setDataProvider(DataProvider dataProvider) {
    this.dataProvider = dataProvider;
    return this;
  }

  /**
   * Optional. Short description of the listing. The description must not contain Unicode non-
   * characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR),
   * and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
   * @return value or {@code null} for none
   */
  public java.lang.String getDescription() {
    return description;
  }

  /**
   * Optional. Short description of the listing. The description must not contain Unicode non-
   * characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR),
   * and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
   * @param description description or {@code null} for none
   */
  public Listing setDescription(java.lang.String description) {
    this.description = description;
    return this;
  }

  /**
   * Required. Human-readable display name of the listing. The display name must contain only
   * Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and
   * can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * Required. Human-readable display name of the listing. The display name must contain only
   * Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and
   * can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
   * @param displayName displayName or {@code null} for none
   */
  public Listing setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * Optional. Documentation describing the listing.
   * @return value or {@code null} for none
   */
  public java.lang.String getDocumentation() {
    return documentation;
  }

  /**
   * Optional. Documentation describing the listing.
   * @param documentation documentation or {@code null} for none
   */
  public Listing setDocumentation(java.lang.String documentation) {
    this.documentation = documentation;
    return this;
  }

  /**
   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image
   * dimensions are 512x512 pixels, however the API only performs validation on size of the encoded
   * data. Note: For byte fields, the contents of the field are base64-encoded (which increases the
   * size of the data by 33-36%) when using JSON on the wire.
   * @see #decodeIcon()
   * @return value or {@code null} for none
   */
  public java.lang.String getIcon() {
    return icon;
  }

  /**
   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image
   * dimensions are 512x512 pixels, however the API only performs validation on size of the encoded
   * data. Note: For byte fields, the contents of the field are base64-encoded (which increases the
   * size of the data by 33-36%) when using JSON on the wire.
   * @see #getIcon()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeIcon() {
    return com.google.api.client.util.Base64.decodeBase64(icon);
  }

  /**
   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image
   * dimensions are 512x512 pixels, however the API only performs validation on size of the encoded
   * data. Note: For byte fields, the contents of the field are base64-encoded (which increases the
   * size of the data by 33-36%) when using JSON on the wire.
   * @see #encodeIcon()
   * @param icon icon or {@code null} for none
   */
  public Listing setIcon(java.lang.String icon) {
    this.icon = icon;
    return this;
  }

  /**
   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image
   * dimensions are 512x512 pixels, however the API only performs validation on size of the encoded
   * data. Note: For byte fields, the contents of the field are base64-encoded (which increases the
   * size of the data by 33-36%) when using JSON on the wire.
   * @see #setIcon()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public Listing encodeIcon(byte[] icon) {
    this.icon = com.google.api.client.util.Base64.encodeBase64URLSafeString(icon);
    return this;
  }

  /**
   * Output only. The resource name of the listing. e.g.
   * `projects/myproject/locations/US/dataExchanges/123/listings/456`
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Output only. The resource name of the listing. e.g.
   * `projects/myproject/locations/US/dataExchanges/123/listings/456`
   * @param name name or {@code null} for none
   */
  public Listing setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.
   * @return value or {@code null} for none
   */
  public java.lang.String getPrimaryContact() {
    return primaryContact;
  }

  /**
   * Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.
   * @param primaryContact primaryContact or {@code null} for none
   */
  public Listing setPrimaryContact(java.lang.String primaryContact) {
    this.primaryContact = primaryContact;
    return this;
  }

  /**
   * Optional. Details of the publisher who owns the listing and who can share the source data.
   * @return value or {@code null} for none
   */
  public Publisher getPublisher() {
    return publisher;
  }

  /**
   * Optional. Details of the publisher who owns the listing and who can share the source data.
   * @param publisher publisher or {@code null} for none
   */
  public Listing setPublisher(Publisher publisher) {
    this.publisher = publisher;
    return this;
  }

  /**
   * Optional. Email or URL of the request access of the listing. Subscribers can use this reference
   * to request access. Max Length: 1000 bytes.
   * @return value or {@code null} for none
   */
  public java.lang.String getRequestAccess() {
    return requestAccess;
  }

  /**
   * Optional. Email or URL of the request access of the listing. Subscribers can use this reference
   * to request access. Max Length: 1000 bytes.
   * @param requestAccess requestAccess or {@code null} for none
   */
  public Listing setRequestAccess(java.lang.String requestAccess) {
    this.requestAccess = requestAccess;
    return this;
  }

  /**
   * Optional. If set, restricted export configuration will be propagated and enforced on the linked
   * dataset.
   * @return value or {@code null} for none
   */
  public RestrictedExportConfig getRestrictedExportConfig() {
    return restrictedExportConfig;
  }

  /**
   * Optional. If set, restricted export configuration will be propagated and enforced on the linked
   * dataset.
   * @param restrictedExportConfig restrictedExportConfig or {@code null} for none
   */
  public Listing setRestrictedExportConfig(RestrictedExportConfig restrictedExportConfig) {
    this.restrictedExportConfig = restrictedExportConfig;
    return this;
  }

  /**
   * Output only. Current state of the listing.
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * Output only. Current state of the listing.
   * @param state state or {@code null} for none
   */
  public Listing setState(java.lang.String state) {
    this.state = state;
    return this;
  }

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

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

}
