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

com.contrastsecurity.sdk.scan.AutoValue_ProjectCreate Maven / Gradle / Ivy

There is a newer version: 3.4.2
Show newest version
package com.contrastsecurity.sdk.scan;

/*-
 * #%L
 * Contrast Java SDK
 * %%
 * Copyright (C) 2021 Contrast Security, Inc.
 * %%
 * 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.
 * #L%
 */

import java.util.Collection;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ProjectCreate extends ProjectCreate {

  private final String name;

  private final String language;

  private final Collection includeNamespaceFilters;

  private final Collection excludeNamespaceFilters;

  private AutoValue_ProjectCreate(
      String name,
      String language,
      Collection includeNamespaceFilters,
      Collection excludeNamespaceFilters) {
    this.name = name;
    this.language = language;
    this.includeNamespaceFilters = includeNamespaceFilters;
    this.excludeNamespaceFilters = excludeNamespaceFilters;
  }

  @Override
  String name() {
    return name;
  }

  @Override
  String language() {
    return language;
  }

  @Override
  Collection includeNamespaceFilters() {
    return includeNamespaceFilters;
  }

  @Override
  Collection excludeNamespaceFilters() {
    return excludeNamespaceFilters;
  }

  @Override
  public String toString() {
    return "ProjectCreate{"
        + "name=" + name + ", "
        + "language=" + language + ", "
        + "includeNamespaceFilters=" + includeNamespaceFilters + ", "
        + "excludeNamespaceFilters=" + excludeNamespaceFilters
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ProjectCreate) {
      ProjectCreate that = (ProjectCreate) o;
      return this.name.equals(that.name())
          && this.language.equals(that.language())
          && this.includeNamespaceFilters.equals(that.includeNamespaceFilters())
          && this.excludeNamespaceFilters.equals(that.excludeNamespaceFilters());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= language.hashCode();
    h$ *= 1000003;
    h$ ^= includeNamespaceFilters.hashCode();
    h$ *= 1000003;
    h$ ^= excludeNamespaceFilters.hashCode();
    return h$;
  }

  static final class Builder extends ProjectCreate.Builder {
    private String name;
    private String language;
    private Collection includeNamespaceFilters;
    private Collection excludeNamespaceFilters;
    Builder() {
    }
    @Override
    ProjectCreate.Builder name(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    ProjectCreate.Builder language(String language) {
      if (language == null) {
        throw new NullPointerException("Null language");
      }
      this.language = language;
      return this;
    }
    @Override
    ProjectCreate.Builder includeNamespaceFilters(Collection includeNamespaceFilters) {
      if (includeNamespaceFilters == null) {
        throw new NullPointerException("Null includeNamespaceFilters");
      }
      this.includeNamespaceFilters = includeNamespaceFilters;
      return this;
    }
    @Override
    Collection includeNamespaceFilters() {
      if (includeNamespaceFilters == null) {
        throw new IllegalStateException("Property \"includeNamespaceFilters\" has not been set");
      }
      return includeNamespaceFilters;
    }
    @Override
    ProjectCreate.Builder excludeNamespaceFilters(Collection excludeNamespaceFilters) {
      if (excludeNamespaceFilters == null) {
        throw new NullPointerException("Null excludeNamespaceFilters");
      }
      this.excludeNamespaceFilters = excludeNamespaceFilters;
      return this;
    }
    @Override
    Collection excludeNamespaceFilters() {
      if (excludeNamespaceFilters == null) {
        throw new IllegalStateException("Property \"excludeNamespaceFilters\" has not been set");
      }
      return excludeNamespaceFilters;
    }
    @Override
    ProjectCreate autoBuild() {
      if (this.name == null
          || this.language == null
          || this.includeNamespaceFilters == null
          || this.excludeNamespaceFilters == null) {
        StringBuilder missing = new StringBuilder();
        if (this.name == null) {
          missing.append(" name");
        }
        if (this.language == null) {
          missing.append(" language");
        }
        if (this.includeNamespaceFilters == null) {
          missing.append(" includeNamespaceFilters");
        }
        if (this.excludeNamespaceFilters == null) {
          missing.append(" excludeNamespaceFilters");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ProjectCreate(
          this.name,
          this.language,
          this.includeNamespaceFilters,
          this.excludeNamespaceFilters);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy