Set the ApiKey

@param apiKey The apikey needed for the contract
@return
@throws com.omertron.omdbapi.OMDBException
977396
public OmdbBuilder setApiKey(final String apiKey) throws OMDBException {
        if (StringUtils.isBlank(apiKey)) {
            throw new OMDBException(ApiExceptionType.AUTH_FAILURE, "Must provide an ApiKey");
        }
        params.add(Param.APIKEY, apiKey);
        return this;
    }
397065
func (s *UpdateApiMappingOutput) SetApiMappingKey(v string) *UpdateApiMappingOutput {
	s.ApiMappingKey = &v
	return s
}
1294270
protected void setKey(BitArray key) {
        this.bitStringKey = (BitArray)key.clone();

        /*
         * Do this to keep the byte array form consistent with
         * this. Can delete when byte[] key is deleted.
         */
        this.key = key.toByteArray();
        int remaining = key.length() % 8;
        this.unusedBits =
            ((remaining == 0) ? 0 : 8 - remaining);
    }
841520
public ReplicationClientFactory usingApiKey(String apiKey) {
        if (Objects.equal(_apiKey, apiKey)) {
            return this;
        }
        return new ReplicationClientFactory(_jerseyClient, apiKey);
    }
405347
@Inject
	public void setKey(@Named(NetworkConfig.AES_KEY) String key) throws Exception {
		final byte[] raw = key.getBytes(NetworkConfig.getStringEncodingCharset());
		final int keySize = raw.length;
		if ((keySize % 16) == 0 || (keySize % 24) == 0 || (keySize % 32) == 0) {
			this.skeySpec = new SecretKeySpec(raw, "AES"); //$NON-NLS-1$
			// this.cipher = Cipher.getInstance(ALGORITHM);
		} else {
			throw new IllegalArgumentException(Messages.AESEventEncrypter_0);
		}

	}
341076
public T execute() throws ApiException, IOException {
        return client.executeRequest(this.builder, expectedCode, responseClass, needAuth);
    }
968936
public static TrainingApi authenticate(RestClient restClient, final String apiKey) {
        return new TrainingApiImpl(restClient).withApiKey(apiKey);
    }
1096005
public void setPrimaryKey(int primaryKey) 
   throws IllegalArgumentException
   {

      if (primaryKey <= NULL)
      {
         this.primaryKey = Data.NULL;
      }
      else
      {

         this.primaryKey = primaryKey;

         //resetNew();

         return;
      }
   }
8973
public static PredictionEndpoint authenticate(RestClient restClient, final String apiKey) {
        return new PredictionEndpointImpl(restClient).withApiKey(apiKey);
    }
890625
public static ApiPlatform fromKeyToApiPlatform(int key) {
        if(keyToPlatform.get() == null) {
            Map<Integer, ApiPlatform> map = new HashMap<>();
            for (ApiPlatform apiPlatform : ApiPlatform.values()) {
                map.put(apiPlatform.getKey(), apiPlatform);
            }
            keyToPlatform.set(Collections.unmodifiableMap(map));
        }
        return keyToPlatform.get().get(key);
    }
329908
@Override
    public <O> void set(String key, O value) {
        set(key,value,null,false);
    }
183100
private void initialise(String apiKey, HttpTools httpTools) {
        tmdbAccount = new TmdbAccount(apiKey, httpTools);
        tmdbAuth = new TmdbAuthentication(apiKey, httpTools);
        tmdbCertifications = new TmdbCertifications(apiKey, httpTools);
        tmdbChanges = new TmdbChanges(apiKey, httpTools);
        tmdbCollections = new TmdbCollections(apiKey, httpTools);
        tmdbCompany = new TmdbCompanies(apiKey, httpTools);
        tmdbConfiguration = new TmdbConfiguration(apiKey, httpTools);
        tmdbCredits = new TmdbCredits(apiKey, httpTools);
        tmdbDiscover = new TmdbDiscover(apiKey, httpTools);
        tmdbFind = new TmdbFind(apiKey, httpTools);
        tmdbGenre = new TmdbGenres(apiKey, httpTools);
        tmdbKeywords = new TmdbKeywords(apiKey, httpTools);
        tmdbList = new TmdbLists(apiKey, httpTools);
        tmdbMovies = new TmdbMovies(apiKey, httpTools);
        tmdbNetworks = new TmdbNetworks(apiKey, httpTools);
        tmdbPeople = new TmdbPeople(apiKey, httpTools);
        tmdbReviews = new TmdbReviews(apiKey, httpTools);
        tmdbSearch = new TmdbSearch(apiKey, httpTools);
        tmdbTv = new TmdbTV(apiKey, httpTools);
        tmdbSeasons = new TmdbSeasons(apiKey, httpTools);
        tmdbEpisodes = new TmdbEpisodes(apiKey, httpTools);
    }
545399
public static PredictionEndpoint authenticate(String baseUrl, final String apiKey) {
        ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() {
            @Override
            public void applyCredentialsFilter(OkHttpClient.Builder builder) {
            }
        };
        return authenticate(baseUrl, serviceClientCredentials, apiKey);
    }
68957
public void setApiKeys(java.util.Collection<ApiKey> apiKeys) {
        if (apiKeys == null) {
            this.apiKeys = null;
            return;
        }

        this.apiKeys = new java.util.ArrayList<ApiKey>(apiKeys);
    }
810276
@SuppressWarnings("unchecked")
    public ApiKey getApiKey(final String key) {
        final Query query = pm.newQuery(ApiKey.class, "key == :key");
        final List<ApiKey> result = (List<ApiKey>) query.execute(key);
        return Collections.isEmpty(result) ? null : result.get(0);
    }
569919
public void setKey(org.openprovenance.prov.model.Key value) {
        this.key = (org.openprovenance.prov.sql.Key)value;
    }
829330
public void setBytes(String key, byte[] bytes) {
		String encoded = new String(Base64.encodeBase64(bytes));
		setStringInternal(key, encoded);
	}