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

com.google.api.services.civicinfo.model.Contest Maven / Gradle / Ivy

/*
 * Copyright 2010 Google 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.
 */
/*
 * This code was generated by https://github.com/google/apis-client-generator/
 * (build: 2016-07-08 17:28:43 UTC)
 * on 2016-10-18 at 16:55:10 UTC 
 * Modify at your own risk.
 */

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

/**
 * Information about a contest that appears on a voter's ballot.
 *
 * 

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 Civic Information API. For a detailed * explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class Contest extends com.google.api.client.json.GenericJson { /** * A number specifying the position of this contest on the voter's ballot. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long ballotPlacement; /** * The candidate choices for this contest. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List candidates; static { // hack to force ProGuard to consider Candidate used, since otherwise it would be stripped out // see https://github.com/google/google-api-java-client/issues/543 com.google.api.client.util.Data.nullOf(Candidate.class); } /** * Information about the electoral district that this contest is in. * The value may be {@code null}. */ @com.google.api.client.util.Key private ElectoralDistrict district; /** * A description of any additional eligibility requirements for voting in this contest. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String electorateSpecifications; /** * An ID for this object. IDs may change in future requests and should not be cached. Access to * this field requires special access that can be requested from the Request more link on the * Quotas page. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String id; /** * The levels of government of the office for this contest. There may be more than one in cases * where a jurisdiction effectively acts at two different levels of government; for example, the * mayor of the District of Columbia acts at "locality" level, but also effectively at both * "administrative-area-2" and "administrative-area-1". * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List level; /** * The number of candidates that will be elected to office in this contest. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long numberElected; /** * The number of candidates that a voter may vote for in this contest. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long numberVotingFor; /** * The name of the office for this contest. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String office; /** * If this is a partisan election, the name of the party it is for. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String primaryParty; /** * The set of ballot responses for the referendum. A ballot response represents a line on the * ballot. Common examples might include "yes" or "no" for referenda. This field is only populated * for contests of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List referendumBallotResponses; /** * Specifies a short summary of the referendum that is typically on the ballot below the title but * above the text. This field is only populated for contests of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumBrief; /** * A statement in opposition to the referendum. It does not necessarily appear on the ballot. This * field is only populated for contests of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumConStatement; /** * Specifies what effect abstaining (not voting) on the proposition will have (i.e. whether * abstaining is considered a vote against it). This field is only populated for contests of type * 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumEffectOfAbstain; /** * The threshold of votes that the referendum needs in order to pass, e.g. "two-thirds". This * field is only populated for contests of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumPassageThreshold; /** * A statement in favor of the referendum. It does not necessarily appear on the ballot. This * field is only populated for contests of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumProStatement; /** * A brief description of the referendum. This field is only populated for contests of type * 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumSubtitle; /** * The full text of the referendum. This field is only populated for contests of type * 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumText; /** * The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests * of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumTitle; /** * A link to the referendum. This field is only populated for contests of type 'Referendum'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String referendumUrl; /** * The roles which this office fulfills. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List roles; /** * A list of sources for this contest. If multiple sources are listed, the data has been * aggregated from those sources. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List sources; /** * "Yes" or "No" depending on whether this a contest being held outside the normal election cycle. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String special; /** * The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with * candidates. For referenda this will be 'Referendum'. For Retention contests this will typically * be 'Retention'. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String type; /** * A number specifying the position of this contest on the voter's ballot. * @return value or {@code null} for none */ public java.lang.Long getBallotPlacement() { return ballotPlacement; } /** * A number specifying the position of this contest on the voter's ballot. * @param ballotPlacement ballotPlacement or {@code null} for none */ public Contest setBallotPlacement(java.lang.Long ballotPlacement) { this.ballotPlacement = ballotPlacement; return this; } /** * The candidate choices for this contest. * @return value or {@code null} for none */ public java.util.List getCandidates() { return candidates; } /** * The candidate choices for this contest. * @param candidates candidates or {@code null} for none */ public Contest setCandidates(java.util.List candidates) { this.candidates = candidates; return this; } /** * Information about the electoral district that this contest is in. * @return value or {@code null} for none */ public ElectoralDistrict getDistrict() { return district; } /** * Information about the electoral district that this contest is in. * @param district district or {@code null} for none */ public Contest setDistrict(ElectoralDistrict district) { this.district = district; return this; } /** * A description of any additional eligibility requirements for voting in this contest. * @return value or {@code null} for none */ public java.lang.String getElectorateSpecifications() { return electorateSpecifications; } /** * A description of any additional eligibility requirements for voting in this contest. * @param electorateSpecifications electorateSpecifications or {@code null} for none */ public Contest setElectorateSpecifications(java.lang.String electorateSpecifications) { this.electorateSpecifications = electorateSpecifications; return this; } /** * An ID for this object. IDs may change in future requests and should not be cached. Access to * this field requires special access that can be requested from the Request more link on the * Quotas page. * @return value or {@code null} for none */ public java.lang.String getId() { return id; } /** * An ID for this object. IDs may change in future requests and should not be cached. Access to * this field requires special access that can be requested from the Request more link on the * Quotas page. * @param id id or {@code null} for none */ public Contest setId(java.lang.String id) { this.id = id; return this; } /** * The levels of government of the office for this contest. There may be more than one in cases * where a jurisdiction effectively acts at two different levels of government; for example, the * mayor of the District of Columbia acts at "locality" level, but also effectively at both * "administrative-area-2" and "administrative-area-1". * @return value or {@code null} for none */ public java.util.List getLevel() { return level; } /** * The levels of government of the office for this contest. There may be more than one in cases * where a jurisdiction effectively acts at two different levels of government; for example, the * mayor of the District of Columbia acts at "locality" level, but also effectively at both * "administrative-area-2" and "administrative-area-1". * @param level level or {@code null} for none */ public Contest setLevel(java.util.List level) { this.level = level; return this; } /** * The number of candidates that will be elected to office in this contest. * @return value or {@code null} for none */ public java.lang.Long getNumberElected() { return numberElected; } /** * The number of candidates that will be elected to office in this contest. * @param numberElected numberElected or {@code null} for none */ public Contest setNumberElected(java.lang.Long numberElected) { this.numberElected = numberElected; return this; } /** * The number of candidates that a voter may vote for in this contest. * @return value or {@code null} for none */ public java.lang.Long getNumberVotingFor() { return numberVotingFor; } /** * The number of candidates that a voter may vote for in this contest. * @param numberVotingFor numberVotingFor or {@code null} for none */ public Contest setNumberVotingFor(java.lang.Long numberVotingFor) { this.numberVotingFor = numberVotingFor; return this; } /** * The name of the office for this contest. * @return value or {@code null} for none */ public java.lang.String getOffice() { return office; } /** * The name of the office for this contest. * @param office office or {@code null} for none */ public Contest setOffice(java.lang.String office) { this.office = office; return this; } /** * If this is a partisan election, the name of the party it is for. * @return value or {@code null} for none */ public java.lang.String getPrimaryParty() { return primaryParty; } /** * If this is a partisan election, the name of the party it is for. * @param primaryParty primaryParty or {@code null} for none */ public Contest setPrimaryParty(java.lang.String primaryParty) { this.primaryParty = primaryParty; return this; } /** * The set of ballot responses for the referendum. A ballot response represents a line on the * ballot. Common examples might include "yes" or "no" for referenda. This field is only populated * for contests of type 'Referendum'. * @return value or {@code null} for none */ public java.util.List getReferendumBallotResponses() { return referendumBallotResponses; } /** * The set of ballot responses for the referendum. A ballot response represents a line on the * ballot. Common examples might include "yes" or "no" for referenda. This field is only populated * for contests of type 'Referendum'. * @param referendumBallotResponses referendumBallotResponses or {@code null} for none */ public Contest setReferendumBallotResponses(java.util.List referendumBallotResponses) { this.referendumBallotResponses = referendumBallotResponses; return this; } /** * Specifies a short summary of the referendum that is typically on the ballot below the title but * above the text. This field is only populated for contests of type 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumBrief() { return referendumBrief; } /** * Specifies a short summary of the referendum that is typically on the ballot below the title but * above the text. This field is only populated for contests of type 'Referendum'. * @param referendumBrief referendumBrief or {@code null} for none */ public Contest setReferendumBrief(java.lang.String referendumBrief) { this.referendumBrief = referendumBrief; return this; } /** * A statement in opposition to the referendum. It does not necessarily appear on the ballot. This * field is only populated for contests of type 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumConStatement() { return referendumConStatement; } /** * A statement in opposition to the referendum. It does not necessarily appear on the ballot. This * field is only populated for contests of type 'Referendum'. * @param referendumConStatement referendumConStatement or {@code null} for none */ public Contest setReferendumConStatement(java.lang.String referendumConStatement) { this.referendumConStatement = referendumConStatement; return this; } /** * Specifies what effect abstaining (not voting) on the proposition will have (i.e. whether * abstaining is considered a vote against it). This field is only populated for contests of type * 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumEffectOfAbstain() { return referendumEffectOfAbstain; } /** * Specifies what effect abstaining (not voting) on the proposition will have (i.e. whether * abstaining is considered a vote against it). This field is only populated for contests of type * 'Referendum'. * @param referendumEffectOfAbstain referendumEffectOfAbstain or {@code null} for none */ public Contest setReferendumEffectOfAbstain(java.lang.String referendumEffectOfAbstain) { this.referendumEffectOfAbstain = referendumEffectOfAbstain; return this; } /** * The threshold of votes that the referendum needs in order to pass, e.g. "two-thirds". This * field is only populated for contests of type 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumPassageThreshold() { return referendumPassageThreshold; } /** * The threshold of votes that the referendum needs in order to pass, e.g. "two-thirds". This * field is only populated for contests of type 'Referendum'. * @param referendumPassageThreshold referendumPassageThreshold or {@code null} for none */ public Contest setReferendumPassageThreshold(java.lang.String referendumPassageThreshold) { this.referendumPassageThreshold = referendumPassageThreshold; return this; } /** * A statement in favor of the referendum. It does not necessarily appear on the ballot. This * field is only populated for contests of type 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumProStatement() { return referendumProStatement; } /** * A statement in favor of the referendum. It does not necessarily appear on the ballot. This * field is only populated for contests of type 'Referendum'. * @param referendumProStatement referendumProStatement or {@code null} for none */ public Contest setReferendumProStatement(java.lang.String referendumProStatement) { this.referendumProStatement = referendumProStatement; return this; } /** * A brief description of the referendum. This field is only populated for contests of type * 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumSubtitle() { return referendumSubtitle; } /** * A brief description of the referendum. This field is only populated for contests of type * 'Referendum'. * @param referendumSubtitle referendumSubtitle or {@code null} for none */ public Contest setReferendumSubtitle(java.lang.String referendumSubtitle) { this.referendumSubtitle = referendumSubtitle; return this; } /** * The full text of the referendum. This field is only populated for contests of type * 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumText() { return referendumText; } /** * The full text of the referendum. This field is only populated for contests of type * 'Referendum'. * @param referendumText referendumText or {@code null} for none */ public Contest setReferendumText(java.lang.String referendumText) { this.referendumText = referendumText; return this; } /** * The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests * of type 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumTitle() { return referendumTitle; } /** * The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests * of type 'Referendum'. * @param referendumTitle referendumTitle or {@code null} for none */ public Contest setReferendumTitle(java.lang.String referendumTitle) { this.referendumTitle = referendumTitle; return this; } /** * A link to the referendum. This field is only populated for contests of type 'Referendum'. * @return value or {@code null} for none */ public java.lang.String getReferendumUrl() { return referendumUrl; } /** * A link to the referendum. This field is only populated for contests of type 'Referendum'. * @param referendumUrl referendumUrl or {@code null} for none */ public Contest setReferendumUrl(java.lang.String referendumUrl) { this.referendumUrl = referendumUrl; return this; } /** * The roles which this office fulfills. * @return value or {@code null} for none */ public java.util.List getRoles() { return roles; } /** * The roles which this office fulfills. * @param roles roles or {@code null} for none */ public Contest setRoles(java.util.List roles) { this.roles = roles; return this; } /** * A list of sources for this contest. If multiple sources are listed, the data has been * aggregated from those sources. * @return value or {@code null} for none */ public java.util.List getSources() { return sources; } /** * A list of sources for this contest. If multiple sources are listed, the data has been * aggregated from those sources. * @param sources sources or {@code null} for none */ public Contest setSources(java.util.List sources) { this.sources = sources; return this; } /** * "Yes" or "No" depending on whether this a contest being held outside the normal election cycle. * @return value or {@code null} for none */ public java.lang.String getSpecial() { return special; } /** * "Yes" or "No" depending on whether this a contest being held outside the normal election cycle. * @param special special or {@code null} for none */ public Contest setSpecial(java.lang.String special) { this.special = special; return this; } /** * The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with * candidates. For referenda this will be 'Referendum'. For Retention contests this will typically * be 'Retention'. * @return value or {@code null} for none */ public java.lang.String getType() { return type; } /** * The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with * candidates. For referenda this will be 'Referendum'. For Retention contests this will typically * be 'Retention'. * @param type type or {@code null} for none */ public Contest setType(java.lang.String type) { this.type = type; return this; } @Override public Contest set(String fieldName, Object value) { return (Contest) super.set(fieldName, value); } @Override public Contest clone() { return (Contest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy