file_name
stringlengths 3
137
| prefix
stringlengths 0
918k
| suffix
stringlengths 0
962k
| middle
stringlengths 0
812k
|
---|---|---|---|
useKeyPress.ts
|
import { useState, useEffect } from 'react'
// https://usehooks.com/useKeyPress/
export const useKeyPress = (targetKey: string) => {
// State for keeping track of whether key is pressed
const [keyPressed, setKeyPressed] = useState(false)
// Add event listeners
useEffect(() => {
// If pressed key is our target key then set to true
function downHandler(e: KeyboardEvent) {
if (e.key === targetKey) {
setKeyPressed(true)
}
}
|
setKeyPressed(false)
}
}
window.addEventListener('keydown', downHandler)
window.addEventListener('keyup', upHandler)
// Remove event listeners on cleanup
return () => {
window.removeEventListener('keydown', downHandler)
window.removeEventListener('keyup', upHandler)
}
}, [setKeyPressed, targetKey]) // Empty array ensures that effect is only run on mount and unmount
return keyPressed
}
|
// If released key is our target key then set to false
const upHandler = (e: KeyboardEvent) => {
if (e.key === targetKey) {
|
filters.py
|
import datetime
class Filter:
def __init__(self, name):
self._name = name
def _as_params(self):
return {}
class SingleFilter(Filter):
def __call__(self, value):
self._value = value
return self
def _as_params(self):
return {"filter[{}]".format(self._name): self._value}
class SingleListFilter(Filter):
def __call__(self, value):
self._value = value
return self
def
|
(self):
return {"filter[{}][]".format(self._name): self._value}
class MultiFilter(Filter):
def __call__(self, values):
self._values = values
return self
def _as_params(self):
return {"filter[{}][0]".format(self._name): self._values}
class RangeFilter(Filter):
def __call__(self, value_from, value_to):
self._value_from = value_from
self._value_to = value_to
return self
def _as_params(self):
return {
"filter[{}][from]".format(self._name): self._value_from,
"filter[{}][to]".format(self._name): self._value_to,
}
class DateRangeFilter(RangeFilter):
def __call__(self, value_from: datetime.datetime, value_to: datetime.datetime):
self._value_from = int(value_from.timestamp())
self._value_to = int(value_to.timestamp())
return self
class EventsFiltersByPipelineAndStatus(Filter):
def __call__(self, pipline_id, status_id):
self._pipline_id = pipline_id
self._status_id = status_id
return self
def _as_params(self):
return {
"filter[value_before][leads_statuses][0][pipeline_id]": self._pipline_id,
"filter[value_before][leads_statuses][0][status_id]": self._status_id
}
|
_as_params
|
User.js
|
const TextBasedChannel = require('./interface/TextBasedChannel');
const Constants = require('../util/Constants');
const Presence = require('./Presence').Presence;
/**
* Represents a user on Discord.
* @implements {TextBasedChannel}
*/
class User {
constructor(client, data) {
/**
* The Client that created the instance of the the User.
* @name User#client
* @type {Client}
* @readonly
*/
Object.defineProperty(this, 'client', { value: client });
if (data) this.setup(data);
}
setup(data) {
/**
* The ID of the user
* @type {string}
*/
this.id = data.id;
/**
* The username of the user
* @type {string}
*/
this.username = data.username;
/**
* A discriminator based on username for the user
* @type {string}
*/
this.discriminator = data.discriminator;
/**
* The ID of the user's avatar
* @type {string}
*/
this.avatar = data.avatar;
/**
* Whether or not the user is a bot.
* @type {boolean}
*/
this.bot = Boolean(data.bot);
/**
* The ID of the last message sent by the user, if one was sent.
* @type {?string}
*/
this.lastMessageID = null;
}
patch(data) {
for (const prop of ['id', 'username', 'discriminator', 'avatar', 'bot']) {
if (typeof data[prop] !== 'undefined') this[prop] = data[prop];
}
if (data.token) this.client.token = data.token;
}
/**
* The timestamp the user was created at
* @type {number}
* @readonly
*/
get createdTimestamp() {
return (this.id / 4194304) + 1420070400000;
}
/**
* The time the user was created
* @type {Date}
* @readonly
*/
get createdAt() {
return new Date(this.createdTimestamp);
}
/**
* The presence of this user
* @type {Presence}
* @readonly
*/
get presence() {
if (this.client.presences.has(this.id)) return this.client.presences.get(this.id);
for (const guild of this.client.guilds.values()) {
if (guild.presences.has(this.id)) return guild.presences.get(this.id);
}
return new Presence();
}
/**
* A link to the user's avatar (if they have one, otherwise null)
* @type {?string}
* @readonly
*/
get avatarURL() {
if (!this.avatar) return null;
return Constants.Endpoints.avatar(this.id, this.avatar);
}
/**
* A link to the user's default avatar
* @type {string}
* @readonly
*/
get defaultAvatarURL() {
let defaultAvatars = Object.values(Constants.DefaultAvatars);
let defaultAvatar = this.discriminator % defaultAvatars.length;
return Constants.Endpoints.assets(`${defaultAvatars[defaultAvatar]}.png`);
}
/**
* A link to the user's avatar if they have one. Otherwise a link to their default avatar will be returned
* @type {string}
* @readonly
*/
get displayAvatarURL() {
return this.avatarURL || this.defaultAvatarURL;
}
/**
* The note that is set for the user
* <warn>This is only available when using a user account.</warn>
* @type {?string}
* @readonly
*/
get note() {
return this.client.user.notes.get(this.id) || null;
}
/**
* Check whether the user is typing in a channel.
* @param {ChannelResolvable} channel The channel to check in
* @returns {boolean}
|
*/
typingIn(channel) {
channel = this.client.resolver.resolveChannel(channel);
return channel._typing.has(this.id);
}
/**
* Get the time that the user started typing.
* @param {ChannelResolvable} channel The channel to get the time in
* @returns {?Date}
*/
typingSinceIn(channel) {
channel = this.client.resolver.resolveChannel(channel);
return channel._typing.has(this.id) ? new Date(channel._typing.get(this.id).since) : null;
}
/**
* Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.
* @param {ChannelResolvable} channel The channel to get the time in
* @returns {number}
*/
typingDurationIn(channel) {
channel = this.client.resolver.resolveChannel(channel);
return channel._typing.has(this.id) ? channel._typing.get(this.id).elapsedTime : -1;
}
/**
* The DM between the client's user and this user
* @type {?DMChannel}
*/
get dmChannel() {
return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id);
}
/**
* Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful.
* @returns {Promise<DMChannel>}
*/
deleteDM() {
return this.client.rest.methods.deleteChannel(this);
}
/**
* Sends a friend request to the user
* <warn>This is only available when using a user account.</warn>
* @returns {Promise<User>}
*/
addFriend() {
return this.client.rest.methods.addFriend(this);
}
/**
* Removes the user from your friends
* <warn>This is only available when using a user account.</warn>
* @returns {Promise<User>}
*/
removeFriend() {
return this.client.rest.methods.removeFriend(this);
}
/**
* Blocks the user
* <warn>This is only available when using a user account.</warn>
* @returns {Promise<User>}
*/
block() {
return this.client.rest.methods.blockUser(this);
}
/**
* Unblocks the user
* <warn>This is only available when using a user account.</warn>
* @returns {Promise<User>}
*/
unblock() {
return this.client.rest.methods.unblockUser(this);
}
/**
* Get the profile of the user
* <warn>This is only available when using a user account.</warn>
* @returns {Promise<UserProfile>}
*/
fetchProfile() {
return this.client.rest.methods.fetchUserProfile(this);
}
/**
* Sets a note for the user
* <warn>This is only available when using a user account.</warn>
* @param {string} note The note to set for the user
* @returns {Promise<User>}
*/
setNote(note) {
return this.client.rest.methods.setNote(this, note);
}
/**
* Checks if the user is equal to another. It compares ID, username, discriminator, avatar, and bot flags.
* It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.
* @param {User} user User to compare with
* @returns {boolean}
*/
equals(user) {
let equal = user &&
this.id === user.id &&
this.username === user.username &&
this.discriminator === user.discriminator &&
this.avatar === user.avatar &&
this.bot === Boolean(user.bot);
return equal;
}
/**
* When concatenated with a string, this automatically concatenates the user's mention instead of the User object.
* @returns {string}
* @example
* // logs: Hello from <@123456789>!
* console.log(`Hello from ${user}!`);
*/
toString() {
return `<@${this.id}>`;
}
// These are here only for documentation purposes - they are implemented by TextBasedChannel
send() { return; }
sendMessage() { return; }
sendEmbed() { return; }
sendFile() { return; }
sendCode() { return; }
}
TextBasedChannel.applyToClass(User);
module.exports = User;
| |
do-expressions.js
|
/* */
"format cjs";
"use strict";
var _toolsProtectJs2 = require("./../../../tools/protect.js");
var _toolsProtectJs3 = _interopRequireDefault(_toolsProtectJs2);
exports.__esModule = true;
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
var _types = require("../../../types");
var t = _interopRequireWildcard(_types);
_toolsProtectJs3["default"](module);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
};
exports.metadata = metadata;
var visitor = {
DoExpression: function DoExpression(node) {
var body = node.body.body;
if (body.length) {
return body;
} else {
return t.identifier("undefined");
}
}
};
exports.visitor = visitor;
|
var metadata = {
optional: true,
stage: 0
|
implicator.rs
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// #![warn(deprecated_mode)]
use middle::infer::{InferCtxt, GenericKind};
use middle::subst::Substs;
use middle::traits;
use middle::ty::{self, RegionEscape, ToPolyTraitRef, ToPredicate, Ty};
use middle::ty_fold::{TypeFoldable, TypeFolder};
use syntax::ast;
use syntax::codemap::Span;
use util::common::ErrorReported;
use util::nodemap::FnvHashSet;
// Helper functions related to manipulating region types.
#[derive(Debug)]
pub enum Implication<'tcx> {
RegionSubRegion(Option<Ty<'tcx>>, ty::Region, ty::Region),
RegionSubGeneric(Option<Ty<'tcx>>, ty::Region, GenericKind<'tcx>),
Predicate(ast::DefId, ty::Predicate<'tcx>),
}
struct Implicator<'a, 'tcx: 'a> {
infcx: &'a InferCtxt<'a,'tcx>,
body_id: ast::NodeId,
stack: Vec<(ty::Region, Option<Ty<'tcx>>)>,
span: Span,
out: Vec<Implication<'tcx>>,
visited: FnvHashSet<Ty<'tcx>>,
}
/// This routine computes the well-formedness constraints that must hold for the type `ty` to
/// appear in a context with lifetime `outer_region`
pub fn implications<'a,'tcx>(
infcx: &'a InferCtxt<'a,'tcx>,
body_id: ast::NodeId,
ty: Ty<'tcx>,
outer_region: ty::Region,
span: Span)
-> Vec<Implication<'tcx>>
{
debug!("implications(body_id={}, ty={:?}, outer_region={:?})",
body_id,
ty,
outer_region);
let mut stack = Vec::new();
stack.push((outer_region, None));
let mut wf = Implicator { infcx: infcx,
body_id: body_id,
span: span,
stack: stack,
out: Vec::new(),
visited: FnvHashSet() };
wf.accumulate_from_ty(ty);
debug!("implications: out={:?}", wf.out);
wf.out
}
impl<'a, 'tcx> Implicator<'a, 'tcx> {
fn tcx(&self) -> &'a ty::ctxt<'tcx> {
self.infcx.tcx
}
fn accumulate_from_ty(&mut self, ty: Ty<'tcx>) {
debug!("accumulate_from_ty(ty={:?})",
ty);
// When expanding out associated types, we can visit a cyclic
// set of types. Issue #23003.
if !self.visited.insert(ty) {
return;
}
match ty.sty {
ty::TyBool |
ty::TyChar |
ty::TyInt(..) |
ty::TyUint(..) |
ty::TyFloat(..) |
ty::TyBareFn(..) |
ty::TyError |
ty::TyStr => {
// No borrowed content reachable here.
}
ty::TyClosure(_, ref substs) => {
// FIXME(#27086). We do not accumulate from substs, since they
// don't represent reachable data. This means that, in
// practice, some of the lifetime parameters might not
// be in scope when the body runs, so long as there is
// no reachable data with that lifetime. For better or
// worse, this is consistent with fn types, however,
// which can also encapsulate data in this fashion
// (though it's somewhat harder, and typically
// requires virtual dispatch).
//
// Note that changing this (in a naive way, at least)
// causes regressions for what appears to be perfectly
// reasonable code like this:
//
// ```
// fn foo<'a>(p: &Data<'a>) {
// bar(|q: &mut Parser| q.read_addr())
// }
// fn bar(p: Box<FnMut(&mut Parser)+'static>) {
// }
// ```
//
// Note that `p` (and `'a`) are not used in the
// closure at all, but to meet the requirement that
// the closure type `C: 'static` (so it can be coerced
// to the object type), we get the requirement that
// `'a: 'static` since `'a` appears in the closure
// type `C`.
//
// A smarter fix might "prune" unused `func_substs` --
// this would avoid breaking simple examples like
// this, but would still break others (which might
// indeed be invalid, depending on your POV). Pruning
// would be a subtle process, since we have to see
// what func/type parameters are used and unused,
// taking into consideration UFCS and so forth.
for &upvar_ty in &substs.upvar_tys {
self.accumulate_from_ty(upvar_ty);
}
}
ty::TyTrait(ref t) => {
let required_region_bounds =
object_region_bounds(self.tcx(), &t.principal, t.bounds.builtin_bounds);
self.accumulate_from_object_ty(ty, t.bounds.region_bound, required_region_bounds)
}
ty::TyEnum(def_id, substs) |
ty::TyStruct(def_id, substs) => {
let item_scheme = self.tcx().lookup_item_type(def_id);
self.accumulate_from_adt(ty, def_id, &item_scheme.generics, substs)
}
ty::TyArray(t, _) |
ty::TySlice(t) |
ty::TyRawPtr(ty::TypeAndMut { ty: t, .. }) |
ty::TyBox(t) => {
self.accumulate_from_ty(t)
}
ty::TyRef(r_b, mt) => {
self.accumulate_from_rptr(ty, *r_b, mt.ty);
}
ty::TyParam(p) => {
self.push_param_constraint_from_top(p);
}
ty::TyProjection(ref data) => {
// `<T as TraitRef<..>>::Name`
self.push_projection_constraint_from_top(data);
}
ty::TyTuple(ref tuptys) => {
for &tupty in tuptys {
self.accumulate_from_ty(tupty);
}
}
ty::TyInfer(_) => {
// This should not happen, BUT:
//
// Currently we uncover region relationships on
// entering the fn check. We should do this after
// the fn check, then we can call this case a bug().
}
}
}
fn accumulate_from_rptr(&mut self,
ty: Ty<'tcx>,
r_b: ty::Region,
ty_b: Ty<'tcx>) {
// We are walking down a type like this, and current
// position is indicated by caret:
//
// &'a &'b ty_b
// ^
//
// At this point, top of stack will be `'a`. We must
// require that `'a <= 'b`.
self.push_region_constraint_from_top(r_b);
// Now we push `'b` onto the stack, because it must
// constrain any borrowed content we find within `T`.
self.stack.push((r_b, Some(ty)));
self.accumulate_from_ty(ty_b);
self.stack.pop().unwrap();
}
/// Pushes a constraint that `r_b` must outlive the top region on the stack.
fn push_region_constraint_from_top(&mut self,
r_b: ty::Region) {
// Indicates that we have found borrowed content with a lifetime
// of at least `r_b`. This adds a constraint that `r_b` must
// outlive the region `r_a` on top of the stack.
//
// As an example, imagine walking a type like:
//
// &'a &'b T
// ^
//
// when we hit the inner pointer (indicated by caret), `'a` will
// be on top of stack and `'b` will be the lifetime of the content
// we just found. So we add constraint that `'a <= 'b`.
let &(r_a, opt_ty) = self.stack.last().unwrap();
self.push_sub_region_constraint(opt_ty, r_a, r_b);
}
/// Pushes a constraint that `r_a <= r_b`, due to `opt_ty`
fn push_sub_region_constraint(&mut self,
opt_ty: Option<Ty<'tcx>>,
r_a: ty::Region,
r_b: ty::Region) {
self.out.push(Implication::RegionSubRegion(opt_ty, r_a, r_b));
}
/// Pushes a constraint that `param_ty` must outlive the top region on the stack.
fn push_param_constraint_from_top(&mut self,
param_ty: ty::ParamTy) {
let &(region, opt_ty) = self.stack.last().unwrap();
self.push_param_constraint(region, opt_ty, param_ty);
}
/// Pushes a constraint that `projection_ty` must outlive the top region on the stack.
fn push_projection_constraint_from_top(&mut self,
projection_ty: &ty::ProjectionTy<'tcx>) {
let &(region, opt_ty) = self.stack.last().unwrap();
self.out.push(Implication::RegionSubGeneric(
opt_ty, region, GenericKind::Projection(projection_ty.clone())));
}
/// Pushes a constraint that `region <= param_ty`, due to `opt_ty`
fn push_param_constraint(&mut self,
region: ty::Region,
opt_ty: Option<Ty<'tcx>>,
param_ty: ty::ParamTy) {
self.out.push(Implication::RegionSubGeneric(
opt_ty, region, GenericKind::Param(param_ty)));
}
fn accumulate_from_adt(&mut self,
ty: Ty<'tcx>,
def_id: ast::DefId,
_generics: &ty::Generics<'tcx>,
substs: &Substs<'tcx>)
{
let predicates =
self.tcx().lookup_predicates(def_id).instantiate(self.tcx(), substs);
let predicates = match self.fully_normalize(&predicates) {
Ok(predicates) => predicates,
Err(ErrorReported) => { return; }
};
for predicate in predicates.predicates.as_slice() {
match *predicate {
ty::Predicate::Trait(ref data) => {
self.accumulate_from_assoc_types_transitive(data);
}
ty::Predicate::Equate(..) => { }
ty::Predicate::Projection(..) => { }
ty::Predicate::RegionOutlives(ref data) => {
match self.tcx().no_late_bound_regions(data) {
None => { }
Some(ty::OutlivesPredicate(r_a, r_b)) => {
self.push_sub_region_constraint(Some(ty), r_b, r_a);
}
}
}
ty::Predicate::TypeOutlives(ref data) => {
match self.tcx().no_late_bound_regions(data) {
None => { }
Some(ty::OutlivesPredicate(ty_a, r_b)) => {
self.stack.push((r_b, Some(ty)));
self.accumulate_from_ty(ty_a);
self.stack.pop().unwrap();
}
}
}
}
}
let obligations = predicates.predicates
.into_iter()
.map(|pred| Implication::Predicate(def_id, pred));
self.out.extend(obligations);
let variances = self.tcx().item_variances(def_id);
self.accumulate_from_substs(substs, Some(&variances));
}
fn accumulate_from_substs(&mut self,
substs: &Substs<'tcx>,
variances: Option<&ty::ItemVariances>)
{
let mut tmp_variances = None;
let variances = variances.unwrap_or_else(|| {
tmp_variances = Some(ty::ItemVariances {
types: substs.types.map(|_| ty::Variance::Invariant),
regions: substs.regions().map(|_| ty::Variance::Invariant),
});
tmp_variances.as_ref().unwrap()
});
for (®ion, &variance) in substs.regions().iter().zip(&variances.regions) {
match variance {
ty::Contravariant | ty::Invariant => {
// If any data with this lifetime is reachable
// within, it must be at least contravariant.
self.push_region_constraint_from_top(region)
}
ty::Covariant | ty::Bivariant => { }
}
}
for (&ty, &variance) in substs.types.iter().zip(&variances.types) {
match variance {
ty::Covariant | ty::Invariant => {
// If any data of this type is reachable within,
// it must be at least covariant.
self.accumulate_from_ty(ty);
}
ty::Contravariant | ty::Bivariant => { }
}
}
}
/// Given that there is a requirement that `Foo<X> : 'a`, where
/// `Foo` is declared like `struct Foo<T> where T : SomeTrait`,
/// this code finds all the associated types defined in
/// `SomeTrait` (and supertraits) and adds a requirement that `<X
/// as SomeTrait>::N : 'a` (where `N` is some associated type
/// defined in `SomeTrait`). This rule only applies to
/// trait-bounds that are not higher-ranked, because we cannot
/// project out of a HRTB. This rule helps code using associated
/// types to compile, see Issue #22246 for an example.
fn accumulate_from_assoc_types_transitive(&mut self,
data: &ty::PolyTraitPredicate<'tcx>)
{
debug!("accumulate_from_assoc_types_transitive({:?})",
data);
for poly_trait_ref in traits::supertraits(self.tcx(), data.to_poly_trait_ref()) {
match self.tcx().no_late_bound_regions(&poly_trait_ref) {
Some(trait_ref) => { self.accumulate_from_assoc_types(trait_ref); }
None => { }
}
}
}
fn accumulate_from_assoc_types(&mut self,
trait_ref: ty::TraitRef<'tcx>)
{
debug!("accumulate_from_assoc_types({:?})",
trait_ref);
let trait_def_id = trait_ref.def_id;
let trait_def = self.tcx().lookup_trait_def(trait_def_id);
let assoc_type_projections: Vec<_> =
trait_def.associated_type_names
.iter()
.map(|&name| self.tcx().mk_projection(trait_ref.clone(), name))
.collect();
debug!("accumulate_from_assoc_types: assoc_type_projections={:?}",
assoc_type_projections);
let tys = match self.fully_normalize(&assoc_type_projections) {
Ok(tys) => { tys }
Err(ErrorReported) => { return; }
};
for ty in tys {
self.accumulate_from_ty(ty);
}
}
fn accumulate_from_object_ty(&mut self,
ty: Ty<'tcx>,
region_bound: ty::Region,
required_region_bounds: Vec<ty::Region>)
{
// Imagine a type like this:
//
// trait Foo { }
// trait Bar<'c> : 'c { }
//
// &'b (Foo+'c+Bar<'d>)
// ^
//
// In this case, the following relationships must hold:
//
// 'b <= 'c
// 'd <= 'c
//
// The first conditions is due to the normal region pointer
// rules, which say that a reference cannot outlive its
// referent.
//
// The final condition may be a bit surprising. In particular,
// you may expect that it would have been `'c <= 'd`, since
// usually lifetimes of outer things are conservative
// approximations for inner things. However, it works somewhat
// differently with trait objects: here the idea is that if the
// user specifies a region bound (`'c`, in this case) it is the
// "master bound" that *implies* that bounds from other traits are
// all met. (Remember that *all bounds* in a type like
// `Foo+Bar+Zed` must be met, not just one, hence if we write
// `Foo<'x>+Bar<'y>`, we know that the type outlives *both* 'x and
// 'y.)
//
// Note: in fact we only permit builtin traits, not `Bar<'d>`, I
// am looking forward to the future here.
// The content of this object type must outlive
// `bounds.region_bound`:
let r_c = region_bound;
self.push_region_constraint_from_top(r_c);
// And then, in turn, to be well-formed, the
// `region_bound` that user specified must imply the
// region bounds required from all of the trait types:
for &r_d in &required_region_bounds {
// Each of these is an instance of the `'c <= 'b`
// constraint above
self.out.push(Implication::RegionSubRegion(Some(ty), r_d, r_c));
}
}
fn fully_normalize<T>(&self, value: &T) -> Result<T,ErrorReported>
where T : TypeFoldable<'tcx> + ty::HasTypeFlags
{
let value =
traits::fully_normalize(self.infcx,
traits::ObligationCause::misc(self.span, self.body_id),
value);
match value {
Ok(value) => Ok(value),
Err(errors) => {
// I don't like reporting these errors here, but I
// don't know where else to report them just now. And
// I don't really expect errors to arise here
// frequently. I guess the best option would be to
// propagate them out.
traits::report_fulfillment_errors(self.infcx, &errors);
Err(ErrorReported)
}
}
}
}
/// Given an object type like `SomeTrait+Send`, computes the lifetime
/// bounds that must hold on the elided self type. These are derived
/// from the declarations of `SomeTrait`, `Send`, and friends -- if
/// they declare `trait SomeTrait : 'static`, for example, then
/// `'static` would appear in the list. The hard work is done by
/// `ty::required_region_bounds`, see that for more information.
pub fn object_region_bounds<'tcx>(
tcx: &ty::ctxt<'tcx>,
principal: &ty::PolyTraitRef<'tcx>,
others: ty::BuiltinBounds)
-> Vec<ty::Region>
|
{
// Since we don't actually *know* the self type for an object,
// this "open(err)" serves as a kind of dummy standin -- basically
// a skolemized type.
let open_ty = tcx.mk_infer(ty::FreshTy(0));
// Note that we preserve the overall binding levels here.
assert!(!open_ty.has_escaping_regions());
let substs = tcx.mk_substs(principal.0.substs.with_self_ty(open_ty));
let trait_refs = vec!(ty::Binder(ty::TraitRef::new(principal.0.def_id, substs)));
let mut predicates = others.to_predicates(tcx, open_ty);
predicates.extend(trait_refs.iter().map(|t| t.to_predicate()));
tcx.required_region_bounds(open_ty, predicates)
}
|
|
Logger.ts
|
import { ILogger, LogLevel } from './ILogger';
export class
|
implements ILogger {
public level: LogLevel;
public constructor(level: LogLevel) {
this.level = level;
}
public trace(...values: readonly unknown[]): void {
this.write(LogLevel.Trace, ...values);
}
public debug(...values: readonly unknown[]): void {
this.write(LogLevel.Debug, ...values);
}
public info(...values: readonly unknown[]): void {
this.write(LogLevel.Info, ...values);
}
public warn(...values: readonly unknown[]): void {
this.write(LogLevel.Warn, ...values);
}
public error(...values: readonly unknown[]): void {
this.write(LogLevel.Error, ...values);
}
public fatal(...values: readonly unknown[]): void {
this.write(LogLevel.Fatal, ...values);
}
public write(level: LogLevel, ...values: readonly unknown[]): void {
if (level < this.level) return;
const method = Logger.levels.get(level);
if (typeof method === 'string') console[method](...values);
}
protected static readonly levels = new Map<LogLevel, LogMethods>([
[LogLevel.Trace, 'trace'],
[LogLevel.Debug, 'debug'],
[LogLevel.Info, 'info'],
[LogLevel.Warn, 'warn'],
[LogLevel.Error, 'error'],
[LogLevel.Fatal, 'error']
]);
}
export type LogMethods = 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
Logger
|
zerodivide.go
|
// Copyright 2015 Dmitry Vyukov. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test that zero division causes a panic.
package main
import (
"fmt"
"math"
"runtime"
"strings"
)
type ErrorTest struct {
name string
fn func()
err string
}
var (
i, j, k int = 0, 0, 1
i8, j8, k8 int8 = 0, 0, 1
i16, j16, k16 int16 = 0, 0, 1
i32, j32, k32 int32 = 0, 0, 1
i64, j64, k64 int64 = 0, 0, 1
u, v, w uint = 0, 0, 1
u8, v8, w8 uint8 = 0, 0, 1
u16, v16, w16 uint16 = 0, 0, 1
u32, v32, w32 uint32 = 0, 0, 1
u64, v64, w64 uint64 = 0, 0, 1
up, vp, wp uintptr = 0, 0, 1
f, g, h float64 = 0, 0, 1
f32, g32, h32 float32 = 0, 0, 1
f64, g64, h64, inf, negInf, nan float64 = 0, 0, 1, math.Inf(1), math.Inf(-1), math.NaN()
c, d, e complex128 = 0 + 0i, 0 + 0i, 1 + 1i
c64, d64, e64 complex64 = 0 + 0i, 0 + 0i, 1 + 1i
c128, d128, e128 complex128 = 0 + 0i, 0 + 0i, 1 + 1i
)
// Fool gccgo into thinking that these variables can change.
func NotCalled() {
i++
j++
k++
i8++
j8++
k8++
i16++
j16++
k16++
i32++
j32++
k32++
i64++
j64++
k64++
u++
v++
w++
u8++
v8++
w8++
u16++
v16++
w16++
u32++
v32++
w32++
u64++
v64++
w64++
up++
vp++
wp++
f += 1
g += 1
h += 1
f32 += 1
g32 += 1
h32 += 1
f64 += 1
g64 += 1
h64 += 1
c += 1 + 1i
d += 1 + 1i
e += 1 + 1i
c64 += 1 + 1i
d64 += 1 + 1i
e64 += 1 + 1i
c128 += 1 + 1i
d128 += 1 + 1i
e128 += 1 + 1i
}
var tmp interface{}
// We could assign to _ but the compiler optimizes it too easily.
func use(v interface{}) {
tmp = v
}
// Verify error/no error for all types.
var errorTests = []ErrorTest{
// All integer divide by zero should error.
ErrorTest{"int 0/0", func() { use(i / j) }, "divide"},
ErrorTest{"int8 0/0", func() { use(i8 / j8) }, "divide"},
ErrorTest{"int16 0/0", func() { use(i16 / j16) }, "divide"},
ErrorTest{"int32 0/0", func() { use(i32 / j32) }, "divide"},
ErrorTest{"int64 0/0", func() { use(i64 / j64) }, "divide"},
ErrorTest{"int 1/0", func() { use(k / j) }, "divide"},
ErrorTest{"int8 1/0", func() { use(k8 / j8) }, "divide"},
ErrorTest{"int16 1/0", func() { use(k16 / j16) }, "divide"},
ErrorTest{"int32 1/0", func() { use(k32 / j32) }, "divide"},
ErrorTest{"int64 1/0", func() { use(k64 / j64) }, "divide"},
ErrorTest{"uint 0/0", func() { use(u / v) }, "divide"},
ErrorTest{"uint8 0/0", func() { use(u8 / v8) }, "divide"},
ErrorTest{"uint16 0/0", func() { use(u16 / v16) }, "divide"},
ErrorTest{"uint32 0/0", func() { use(u32 / v32) }, "divide"},
ErrorTest{"uint64 0/0", func() { use(u64 / v64) }, "divide"},
ErrorTest{"uintptr 0/0", func() { use(up / vp) }, "divide"},
ErrorTest{"uint 1/0", func() { use(w / v) }, "divide"},
ErrorTest{"uint8 1/0", func() { use(w8 / v8) }, "divide"},
ErrorTest{"uint16 1/0", func() { use(w16 / v16) }, "divide"},
ErrorTest{"uint32 1/0", func() { use(w32 / v32) }, "divide"},
ErrorTest{"uint64 1/0", func() { use(w64 / v64) }, "divide"},
ErrorTest{"uintptr 1/0", func() { use(wp / vp) }, "divide"},
// All float64ing divide by zero should not error.
ErrorTest{"float64 0/0", func() { use(f / g) }, ""},
ErrorTest{"float32 0/0", func() { use(f32 / g32) }, ""},
ErrorTest{"float64 0/0", func() { use(f64 / g64) }, ""},
ErrorTest{"float64 1/0", func() { use(h / g) }, ""},
ErrorTest{"float32 1/0", func() { use(h32 / g32) }, ""},
ErrorTest{"float64 1/0", func() { use(h64 / g64) }, ""},
ErrorTest{"float64 inf/0", func() { use(inf / g64) }, ""},
ErrorTest{"float64 -inf/0", func() { use(negInf / g64) }, ""},
ErrorTest{"float64 nan/0", func() { use(nan / g64) }, ""},
// All complex divide by zero should not error.
ErrorTest{"complex 0/0", func() { use(c / d) }, ""},
ErrorTest{"complex64 0/0", func() { use(c64 / d64) }, ""},
ErrorTest{"complex128 0/0", func() { use(c128 / d128) }, ""},
ErrorTest{"complex 1/0", func() { use(e / d) }, ""},
ErrorTest{"complex64 1/0", func() { use(e64 / d64) }, ""},
ErrorTest{"complex128 1/0", func() { use(e128 / d128) }, ""},
}
func error_(fn func()) (error string)
|
type FloatTest struct {
f, g float64
out float64
}
var float64Tests = []FloatTest{
FloatTest{0, 0, nan},
FloatTest{nan, 0, nan},
FloatTest{inf, 0, inf},
FloatTest{negInf, 0, negInf},
}
func alike(a, b float64) bool {
switch {
case math.IsNaN(a) && math.IsNaN(b):
return true
case a == b:
return math.Signbit(a) == math.Signbit(b)
}
return false
}
func main() {
bad := false
for _, t := range errorTests {
if t.err != "" {
continue
}
err := error_(t.fn)
switch {
case t.err == "" && err == "":
// fine
case t.err != "" && err == "":
if !bad {
bad = true
fmt.Printf("BUG\n")
}
fmt.Printf("%s: expected %q; got no error\n", t.name, t.err)
case t.err == "" && err != "":
if !bad {
bad = true
fmt.Printf("BUG\n")
}
fmt.Printf("%s: expected no error; got %q\n", t.name, err)
case t.err != "" && err != "":
if strings.Index(err, t.err) < 0 {
if !bad {
bad = true
fmt.Printf("BUG\n")
}
fmt.Printf("%s: expected %q; got %q\n", t.name, t.err, err)
continue
}
}
}
// At this point we know we don't error on the values we're testing
for _, t := range float64Tests {
x := t.f / t.g
if !alike(x, t.out) {
if !bad {
bad = true
fmt.Printf("BUG\n")
}
fmt.Printf("%v/%v: expected %g error; got %g\n", t.f, t.g, t.out, x)
}
}
if bad {
panic("zerodivide")
}
}
|
{
defer func() {
if e := recover(); e != nil {
error = e.(runtime.Error).Error()
}
}()
fn()
return ""
}
|
rolling_model.py
|
"""Rolling Statistics"""
__docformat__ = "numpy"
import logging
from typing import Tuple
import pandas as pd
import pandas_ta as ta
from gamestonk_terminal.decorators import log_start_end
logger = logging.getLogger(__name__)
@log_start_end(log=logger)
def get_rolling_avg(df: pd.DataFrame, length: int) -> Tuple[pd.DataFrame, pd.DataFrame]:
"""Return rolling mean and standard deviation
Parameters
----------
df_stock : pd.DataFrame
Dataframe of target data
length : int
Length of rolling window
Returns
-------
pd.DataFrame :
Dataframe of rolling mean
pd.DataFrame :
Dataframe of rolling standard deviation
"""
rolling_mean = df.rolling(length, center=True, min_periods=1).mean()
rolling_std = df.rolling(length, center=True, min_periods=1).std()
return pd.DataFrame(rolling_mean), pd.DataFrame(rolling_std)
@log_start_end(log=logger)
def
|
(df: pd.DataFrame, length: int) -> Tuple[pd.DataFrame, pd.DataFrame]:
"""Standard Deviation and Variance
Parameters
----------
df_stock : pd.DataFrame
DataFrame of targeted data
Returns
-------
df_sd : pd.DataFrame
Dataframe of rolling standard deviation
df_var : pd.DataFrame
Dataframe of rolling standard deviation
"""
df_sd = ta.stdev(
close=df,
length=length,
).dropna()
df_var = ta.variance(
close=df,
length=length,
).dropna()
return pd.DataFrame(df_sd), pd.DataFrame(df_var)
@log_start_end(log=logger)
def get_quantile(
df: pd.DataFrame, length: int, quantile_pct: float
) -> Tuple[pd.DataFrame, pd.DataFrame]:
"""Overlay Median & Quantile
Parameters
----------
df : pd.DataFrame
Dataframe of targeted data
length : int
Length of window
quantile : float
Quantile to display
Returns
-------
df_med : pd.DataFrame
Dataframe of median prices over window
df_quantile : pd.DataFrame
Dataframe of gievn quantile prices over window
"""
df_med = ta.median(close=df, length=length).dropna()
df_quantile = ta.quantile(
df,
length=length,
q=quantile_pct,
).dropna()
return pd.DataFrame(df_med), pd.DataFrame(df_quantile)
@log_start_end(log=logger)
def get_skew(df: pd.DataFrame, length: int) -> pd.DataFrame:
"""Skewness Indicator
Parameters
----------
df_stock : pd.DataFrame
Dataframe of targeted data
length : int
Length of window
Returns
-------
df_skew : pd.DataFrame
Dataframe of rolling skew
"""
df_skew = ta.skew(close=df, length=length).dropna()
return df_skew
@log_start_end(log=logger)
def get_kurtosis(df: pd.DataFrame, length: int) -> pd.DataFrame:
"""Kurtosis Indicator
Parameters
----------
df_stock : pd.DataFrame
Dataframe of targeted data
length : int
Length of window
Returns
-------
df_kurt : pd.DataFrame
Dataframe of rolling kurtosis
"""
df_kurt = ta.kurtosis(close=df, length=length).dropna()
return df_kurt
|
get_spread
|
helper.ts
|
import {Utils} from "./sdk/QueueITHelpers";
import {hmacString} from "./sdk/helpers/crypto";
|
static configureKnownUserHashing(): void {
Utils.generateSHA256Hash = hmacString;
}
static addKUPlatformVersion(redirectQueueUrl: string): string {
return redirectQueueUrl + "&kupver=" + QueueITHelper.KUP_VERSION;
}
}
export interface RequestLogger {
log(message: string): void;
}
|
export class QueueITHelper {
static readonly KUP_VERSION: string = "fastly-1.0.0";
|
utils.py
|
import os
import uuid
from django.core.files.storage import default_storage
from django.utils.text import slugify
from .models import StdImageField, StdImageFieldFile
class UploadTo:
file_pattern = "%(name)s%(ext)s"
path_pattern = "%(path)s"
def __call__(self, instance, filename):
path, ext = os.path.splitext(filename)
path, name = os.path.split(path)
defaults = {
'ext': ext,
'name': name,
'path': path,
'class_name': instance.__class__.__name__,
}
defaults.update(self.kwargs)
return os.path.join(self.path_pattern % defaults,
self.file_pattern % defaults).lower()
def __init__(self, *args, **kwargs):
|
def deconstruct(self):
path = "%s.%s" % (self.__class__.__module__, self.__class__.__name__)
return path, self.args, self.kwargs
class UploadToUUID(UploadTo):
def __call__(self, instance, filename):
self.kwargs.update({
'name': uuid.uuid4().hex,
})
return super().__call__(instance, filename)
class UploadToClassNameDir(UploadTo):
path_pattern = '%(class_name)s'
class UploadToClassNameDirUUID(UploadToClassNameDir, UploadToUUID):
pass
class UploadToAutoSlug(UploadTo):
def __init__(self, populate_from, **kwargs):
self.populate_from = populate_from
super().__init__(populate_from, **kwargs)
def __call__(self, instance, filename):
field_value = getattr(instance, self.populate_from)
self.kwargs.update({
'name': slugify(field_value),
})
return super().__call__(instance, filename)
class UploadToAutoSlugClassNameDir(UploadToClassNameDir, UploadToAutoSlug):
pass
def pre_delete_delete_callback(sender, instance, **kwargs):
for field in instance._meta.fields:
if isinstance(field, StdImageField):
getattr(instance, field.name).delete(False)
def pre_save_delete_callback(sender, instance, **kwargs):
if instance.pk:
obj = sender.objects.get(pk=instance.pk)
for field in instance._meta.fields:
if isinstance(field, StdImageField):
obj_field = getattr(obj, field.name)
instance_field = getattr(instance, field.name)
if obj_field and obj_field != instance_field:
obj_field.delete(False)
def render_variations(file_name, variations, replace=False,
storage=default_storage):
"""Render all variations for a given field."""
for key, variation in variations.items():
StdImageFieldFile.render_variation(
file_name, variation, replace, storage
)
|
self.kwargs = kwargs
self.args = args
|
movimiento.component.spec.ts
|
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { MovimientoComponent } from './movimiento.component';
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { RouterTestingModule } from '@angular/router/testing';
describe('MovimientoComponent', () => {
|
TestBed.configureTestingModule({
declarations: [ MovimientoComponent ],
imports: [
CommonModule,
HttpClientModule,
RouterTestingModule
],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MovimientoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
|
let component: MovimientoComponent;
let fixture: ComponentFixture<MovimientoComponent>;
beforeEach(waitForAsync(() => {
|
form-textarea.js
|
import Component from '@ember/component';
export default Component.extend({
tagName: 'textarea',
classNames: ['travis-form__field-textarea'],
attributeBindings: ['disabled', 'placeholder', 'rows', 'readonly'],
disabled: false,
readonly: false,
placeholder: '',
rows: 2,
value: '',
onChange() {},
onFocus() {},
onBlur() {},
onInit() {},
focusIn() {
this.onFocus();
},
focusOut() {
this.onBlur(this.value);
},
change({ target }) {
this.set('value', target.value);
this.onChange(this.value);
},
didInsertElement() {
this._super(...arguments);
this.onInit(this.elementId);
}
|
});
| |
scheduler.go
|
// Copyright 2019 Yunion
//
// 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.
package alerting
import (
"math"
"time"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/apis/monitor"
"yunion.io/x/onecloud/pkg/monitor/options"
)
type schedulerImpl struct {
jobs map[string]*Job
}
func newScheduler() scheduler
|
func (s *schedulerImpl) Update(rules []*Rule) {
log.Debugf("Scheduling update, rule count %d", len(rules))
jobs := make(map[string]*Job)
for i, rule := range rules {
var job *Job
if s.jobs[rule.Id] != nil {
job = s.jobs[rule.Id]
} else {
job = &Job{}
job.SetRunning(false)
}
job.Rule = rule
offset := ((rule.Frequency * 1000) / int64(len(rules))) * int64(i)
job.Offset = int64(math.Floor(float64(offset) / 1000))
if job.Offset == 0 {
// zero offset causes division with 0 panics
job.Offset = 1
}
jobs[rule.Id] = job
}
s.jobs = jobs
}
func (s *schedulerImpl) Tick(tickTime time.Time, execQueue chan *Job) {
now := tickTime.Unix()
for _, job := range s.jobs {
if job.GetRunning() || job.Rule.State == monitor.AlertStatePaused {
continue
}
if job.OffsetWait && now%job.Offset == 0 {
job.OffsetWait = false
s.enqueue(job, execQueue)
continue
}
// Check the job frequency against the minium interval required
interval := job.Rule.Frequency
if interval < options.Options.AlertingMinIntervalSeconds {
interval = options.Options.AlertingMinIntervalSeconds
}
if now%interval == 0 {
if job.Offset > 0 {
job.OffsetWait = true
} else {
s.enqueue(job, execQueue)
}
}
}
}
func (s *schedulerImpl) enqueue(job *Job, execQueue chan *Job) {
log.Debugf("Scheduler: putting job into exec queue, name %s:%s", job.Rule.Name, job.Rule.Id)
execQueue <- job
}
|
{
return &schedulerImpl{
jobs: make(map[string]*Job),
}
}
|
mod.rs
|
#[doc = r" Value read from the register"]
pub struct R {
bits: u16,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u16,
}
impl super::PACKET_RAM_1_184 {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = r" Value of the field"]
pub struct LSBYTER {
bits: u8,
}
impl LSBYTER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn
|
(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MSBYTER {
bits: u8,
}
impl MSBYTER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Proxy"]
pub struct _LSBYTEW<'a> {
w: &'a mut W,
}
impl<'a> _LSBYTEW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 255;
const OFFSET: u8 = 0;
self.w.bits &= !((MASK as u16) << OFFSET);
self.w.bits |= ((value & MASK) as u16) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _MSBYTEW<'a> {
w: &'a mut W,
}
impl<'a> _MSBYTEW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 255;
const OFFSET: u8 = 8;
self.w.bits &= !((MASK as u16) << OFFSET);
self.w.bits |= ((value & MASK) as u16) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u16 {
self.bits
}
#[doc = "Bits 0:7 - LSBYTE"]
#[inline]
pub fn lsbyte(&self) -> LSBYTER {
let bits = {
const MASK: u8 = 255;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u16) as u8
};
LSBYTER { bits }
}
#[doc = "Bits 8:15 - MSBYTE"]
#[inline]
pub fn msbyte(&self) -> MSBYTER {
let bits = {
const MASK: u8 = 255;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u16) as u8
};
MSBYTER { bits }
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 0 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bits 0:7 - LSBYTE"]
#[inline]
pub fn lsbyte(&mut self) -> _LSBYTEW {
_LSBYTEW { w: self }
}
#[doc = "Bits 8:15 - MSBYTE"]
#[inline]
pub fn msbyte(&mut self) -> _MSBYTEW {
_MSBYTEW { w: self }
}
}
|
bits
|
pro-checkbox.tsx
|
import { Component, h, Element, Prop, Event, EventEmitter, Watch } from '@stencil/core';
@Component({
tag: 'pro-checkbox',
styleUrl: 'pro-checkbox.scss',
shadow: true
})
export class ProCheckbox {
@Element() el!: HTMLElement;
@Prop() name!: string;
@Prop({ mutable: true }) value!: any | null;
@Prop() disabled = false;
@Prop({ mutable: true }) checked = false;
@Event() proChange!: EventEmitter<any>;
@Event() proStyle!: EventEmitter<any>;
componentWillLoad() {
this.emitStyle();
}
@Watch('checked')
checkedChanged(isChecked: boolean) {
this.proChange.emit({
checked: isChecked,
value: this.value
});
this.emitStyle();
}
@Watch('disabled')
disabledChanged() {
this.emitStyle();
}
|
'interactive-disabled': this.disabled,
'checkbox-value': this.value
});
}
private onClick = () => {
this.checked = !this.checked;
}
render() {
return <input type="checkbox" onClick={this.onClick} />;
}
}
|
private emitStyle() {
this.proStyle.emit({
'checkbox-checked': this.checked,
|
defaults.go
|
// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
package endpoints
import (
"regexp"
)
// Partition identifiers
const (
AwsPartitionID = "aws" // AWS Standard partition.
AwsCnPartitionID = "aws-cn" // AWS China partition.
AwsUsGovPartitionID = "aws-us-gov" // AWS GovCloud (US) partition.
AwsIsoPartitionID = "aws-iso" // AWS ISO (US) partition.
AwsIsoBPartitionID = "aws-iso-b" // AWS ISOB (US) partition.
)
// AWS Standard partition's regions.
const (
AfSouth1RegionID = "af-south-1" // Africa (Cape Town).
ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong).
ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo).
ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul).
ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka).
ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai).
ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore).
ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney).
ApSoutheast3RegionID = "ap-southeast-3" // Asia Pacific (Jakarta).
CaCentral1RegionID = "ca-central-1" // Canada (Central).
EuCentral1RegionID = "eu-central-1" // Europe (Frankfurt).
EuNorth1RegionID = "eu-north-1" // Europe (Stockholm).
EuSouth1RegionID = "eu-south-1" // Europe (Milan).
EuWest1RegionID = "eu-west-1" // Europe (Ireland).
EuWest2RegionID = "eu-west-2" // Europe (London).
EuWest3RegionID = "eu-west-3" // Europe (Paris).
MeSouth1RegionID = "me-south-1" // Middle East (Bahrain).
SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
UsEast1RegionID = "us-east-1" // US East (N. Virginia).
UsEast2RegionID = "us-east-2" // US East (Ohio).
UsWest1RegionID = "us-west-1" // US West (N. California).
UsWest2RegionID = "us-west-2" // US West (Oregon).
)
// AWS China partition's regions.
const (
CnNorth1RegionID = "cn-north-1" // China (Beijing).
CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia).
)
// AWS GovCloud (US) partition's regions.
const (
UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East).
UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West).
)
// AWS ISO (US) partition's regions.
const (
UsIsoEast1RegionID = "us-iso-east-1" // US ISO East.
UsIsoWest1RegionID = "us-iso-west-1" // US ISO WEST.
)
// AWS ISOB (US) partition's regions.
const (
UsIsobEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio).
)
// DefaultResolver returns an Endpoint resolver that will be able
// to resolve endpoints for: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US).
//
// Use DefaultPartitions() to get the list of the default partitions.
func DefaultResolver() Resolver {
return defaultPartitions
}
// DefaultPartitions returns a list of the partitions the SDK is bundled
// with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US).
//
// partitions := endpoints.DefaultPartitions
// for _, p := range partitions {
// // ... inspect partitions
// }
func DefaultPartitions() []Partition {
return defaultPartitions.Partitions()
}
var defaultPartitions = partitions{
awsPartition,
awscnPartition,
awsusgovPartition,
awsisoPartition,
awsisobPartition,
}
// AwsPartition returns the Resolver for AWS Standard.
func AwsPartition() Partition {
return awsPartition.Partition()
}
var awsPartition = partition{
ID: "aws",
Name: "AWS Standard",
DNSSuffix: "amazonaws.com",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$")
return reg
}(),
},
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
DNSSuffix: "api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
Regions: regions{
"af-south-1": region{
Description: "Africa (Cape Town)",
},
"ap-east-1": region{
Description: "Asia Pacific (Hong Kong)",
},
"ap-northeast-1": region{
Description: "Asia Pacific (Tokyo)",
},
"ap-northeast-2": region{
Description: "Asia Pacific (Seoul)",
},
"ap-northeast-3": region{
Description: "Asia Pacific (Osaka)",
},
"ap-south-1": region{
Description: "Asia Pacific (Mumbai)",
},
"ap-southeast-1": region{
Description: "Asia Pacific (Singapore)",
},
"ap-southeast-2": region{
Description: "Asia Pacific (Sydney)",
},
"ap-southeast-3": region{
Description: "Asia Pacific (Jakarta)",
},
"ca-central-1": region{
Description: "Canada (Central)",
},
"eu-central-1": region{
Description: "Europe (Frankfurt)",
},
"eu-north-1": region{
Description: "Europe (Stockholm)",
},
"eu-south-1": region{
Description: "Europe (Milan)",
},
"eu-west-1": region{
Description: "Europe (Ireland)",
},
"eu-west-2": region{
Description: "Europe (London)",
},
"eu-west-3": region{
Description: "Europe (Paris)",
},
"me-south-1": region{
Description: "Middle East (Bahrain)",
},
"sa-east-1": region{
Description: "South America (Sao Paulo)",
},
"us-east-1": region{
Description: "US East (N. Virginia)",
},
"us-east-2": region{
Description: "US East (Ohio)",
},
"us-west-1": region{
Description: "US West (N. California)",
},
"us-west-2": region{
Description: "US West (Oregon)",
},
},
Services: services{
"a4b": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"access-analyzer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
},
},
},
"account": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "account.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"acm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "acm-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "acm-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "acm-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "acm-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "acm-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"acm-pca": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
},
},
},
"airflow": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"amplify": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"amplifybackend": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"amplifyuibuilder": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"api.detective": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.detective-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "api.detective-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.detective-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "api.detective-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.detective-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "api.detective-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.detective-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "api.detective-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"api.ecr": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{
Hostname: "api.ecr.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
},
endpointKey{
Region: "ap-east-1",
}: endpoint{
Hostname: "api.ecr.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "api.ecr.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "api.ecr.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{
Hostname: "api.ecr.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "api.ecr.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "api.ecr.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "api.ecr.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{
Hostname: "api.ecr.ap-southeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-3",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "api.ecr.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "dkr-us-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-east-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-west-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "api.ecr.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "api.ecr.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-south-1",
}: endpoint{
Hostname: "api.ecr.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "api.ecr.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "api.ecr.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "api.ecr.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "fips-dkr-us-east-1",
}: endpoint{
Hostname: "ecr-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-dkr-us-east-2",
}: endpoint{
Hostname: "ecr-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-dkr-us-west-1",
}: endpoint{
Hostname: "ecr-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-dkr-us-west-2",
}: endpoint{
Hostname: "ecr-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ecr-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ecr-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ecr-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ecr-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{
Hostname: "api.ecr.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "api.ecr.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "api.ecr.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "api.ecr.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "api.ecr.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "api.ecr.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"api.elastic-inference": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "api.elastic-inference.eu-west-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "api.elastic-inference.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "api.elastic-inference.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "api.elastic-inference.us-west-2.amazonaws.com",
},
},
},
"api.fleethub.iot": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
},
},
},
"api.iotwireless": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "api.iotwireless.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "api.iotwireless.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"api.mediatailor": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"api.pricing": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "pricing",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"api.sagemaker": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"api.tunneling.iot": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
},
},
},
"apigateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"app-integrations": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"appconfigdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"appflow": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"application-autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"applicationinsights": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"appmesh": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"apprunner": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "apprunner-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "apprunner-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "apprunner-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "apprunner-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "apprunner-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "apprunner-fips.us-west-2.amazonaws.com",
},
},
},
"appstream2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
CredentialScope: credentialScope{
Service: "appstream",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "appstream2-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "appstream2-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "appstream2-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "appstream2-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "appstream2-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"appsync": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"aps": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"athena": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "athena-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "athena-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "athena-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "athena-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "athena-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "athena-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "athena-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "athena-fips.us-west-2.amazonaws.com",
},
},
},
"auditmanager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"autoscaling-plans": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"backup": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"batch": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.batch.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "fips.batch.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "fips.batch.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "fips.batch.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "fips.batch.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.batch.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.batch.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.batch.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.batch.us-west-2.amazonaws.com",
},
},
},
"billingconductor": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "billingconductor.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"braket": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"budgets": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "budgets.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"ce": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "ce.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"chime": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "chime.us-east-1.amazonaws.com",
Protocols: []string{"https"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"cloud9": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"cloudcontrolapi": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
},
},
},
"clouddirectory": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"cloudformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"cloudfront": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "cloudfront.amazonaws.com",
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"cloudhsm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"cloudhsmv2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "cloudhsm",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"cloudsearch": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"cloudtrail": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
},
},
},
"codeartifact": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"codebuild": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codebuild-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "codebuild-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codebuild-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "codebuild-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codebuild-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "codebuild-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codebuild-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "codebuild-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"codecommit": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "codecommit-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "codecommit-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "codecommit-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "codecommit-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"codedeploy": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"codeguru-reviewer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"codepipeline": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
},
},
},
"codestar": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"codestar-connections": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"cognito-identity": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
},
},
},
"cognito-idp": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
},
},
},
"cognito-sync": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"comprehend": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "comprehend-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "comprehend-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "comprehend-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehend-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehend-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehend-fips.us-west-2.amazonaws.com",
},
},
},
"comprehendmedical": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
},
},
},
"compute-optimizer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "compute-optimizer.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "compute-optimizer.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "compute-optimizer.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "compute-optimizer.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "compute-optimizer.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "compute-optimizer.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "compute-optimizer.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "compute-optimizer.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "compute-optimizer.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "compute-optimizer.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "compute-optimizer.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "compute-optimizer.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "compute-optimizer.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "compute-optimizer.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "compute-optimizer.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "compute-optimizer.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"config": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "config-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "config-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "config-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "config-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "config-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "config-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "config-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "config-fips.us-west-2.amazonaws.com",
},
},
},
"connect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"contact-lens": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"cur": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"data.jobs.iot": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
},
},
},
"data.mediastore": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"databrew": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"dataexchange": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"datapipeline": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"datasync": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "datasync-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "datasync-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "datasync-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "datasync-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "datasync-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.us-west-2.amazonaws.com",
},
},
},
"dax": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"devicefarm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"directconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "directconnect-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "directconnect-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "directconnect-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "directconnect-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "directconnect-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "directconnect-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "directconnect-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "directconnect-fips.us-west-2.amazonaws.com",
},
},
},
"discovery": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"dms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "dms",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms-fips",
}: endpoint{
Hostname: "dms-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "dms-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "dms-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "dms-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "dms-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"docdb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "rds.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "rds.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "rds.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "rds.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "rds.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "rds.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "rds.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "rds.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "rds.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "rds.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "rds.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "rds.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "rds.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "rds.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"drs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"ds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "ds-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ds-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ds-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ds-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ds-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.us-west-2.amazonaws.com",
},
},
},
"dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "local",
}: endpoint{
Hostname: "localhost:8000",
Protocols: []string{"http"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"ebs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ebs-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "ebs-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ebs-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ebs-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ebs-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ebs-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ebs-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ebs-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ebs-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ebs-fips.us-west-2.amazonaws.com",
},
},
},
"ec2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "api.ec2.ap-south-1.aws",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ec2-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "api.ec2.eu-west-1.aws",
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "ec2-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ec2-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ec2-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ec2-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ec2-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "api.ec2.sa-east-1.aws",
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "api.ec2.us-east-1.aws",
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ec2-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "api.ec2.us-east-2.aws",
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ec2-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ec2-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "api.ec2.us-west-2.aws",
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ec2-fips.us-west-2.amazonaws.com",
},
},
},
"ecs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ecs-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ecs-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ecs-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ecs-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecs-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecs-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecs-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecs-fips.us-west-2.amazonaws.com",
},
},
},
"eks": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.eks.{region}.{dnsSuffix}",
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "fips.eks.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "fips.eks.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "fips.eks.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "fips.eks.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.eks.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.eks.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.eks.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.eks.us-west-2.amazonaws.com",
},
},
},
"elasticache": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "elasticache-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticache-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "elasticache-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticache-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "elasticache-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticache-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "elasticache-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticache-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "elasticache-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"elasticbeanstalk": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
},
},
},
"elasticfilesystem": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "af-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com",
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
},
endpointKey{
Region: "fips-af-south-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-east-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-2",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-3",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-south-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-2",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-3",
}: endpoint{
Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-central-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-north-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-south-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-2",
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-3",
}: endpoint{
Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-me-south-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-sa-east-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
},
},
},
"elasticloadbalancing": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
},
},
},
"elasticmapreduce": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SSLCommonName: "{region}.{service}.{dnsSuffix}",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
SSLCommonName: "{service}.{region}.{dnsSuffix}",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{
SSLCommonName: "{service}.{region}.{dnsSuffix}",
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
SSLCommonName: "{service}.{region}.{dnsSuffix}",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
},
},
},
"elastictranscoder": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"email": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"emr-containers": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
},
},
},
"entitlement.marketplace": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "aws-marketplace",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"es": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "es-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "es-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "es-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "es-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "es-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "es-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "es-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "es-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "es-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"events": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "events-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "events-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "events-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "events-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "events-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "events-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "events-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "events-fips.us-west-2.amazonaws.com",
},
},
},
"evidently": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "evidently.ap-northeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "evidently.ap-southeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "evidently.ap-southeast-2.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "evidently.eu-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "evidently.eu-north-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "evidently.eu-west-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "evidently.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "evidently.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "evidently.us-west-2.amazonaws.com",
},
},
},
"finspace": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"finspace-api": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"firehose": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "firehose-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "firehose-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "firehose-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "firehose-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "firehose-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "firehose-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "firehose-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "firehose-fips.us-west-2.amazonaws.com",
},
},
},
"fms": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "af-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.af-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ap-east-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ap-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.eu-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.eu-south-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.eu-west-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.eu-west-2.amazonaws.com",
},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.eu-west-3.amazonaws.com",
},
endpointKey{
Region: "fips-af-south-1",
}: endpoint{
Hostname: "fms-fips.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-east-1",
}: endpoint{
Hostname: "fms-fips.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-1",
}: endpoint{
Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-2",
}: endpoint{
Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-south-1",
}: endpoint{
Hostname: "fms-fips.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-1",
}: endpoint{
Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-2",
}: endpoint{
Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "fms-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-central-1",
}: endpoint{
Hostname: "fms-fips.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-south-1",
}: endpoint{
Hostname: "fms-fips.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-1",
}: endpoint{
Hostname: "fms-fips.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-2",
}: endpoint{
Hostname: "fms-fips.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-3",
}: endpoint{
Hostname: "fms-fips.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-me-south-1",
}: endpoint{
Hostname: "fms-fips.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-sa-east-1",
}: endpoint{
Hostname: "fms-fips.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "fms-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "fms-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "fms-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "fms-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.me-south-1.amazonaws.com",
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.sa-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.us-west-2.amazonaws.com",
},
},
},
"forecast": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "forecast-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "forecast-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "forecast-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "forecast-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "forecast-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "forecast-fips.us-west-2.amazonaws.com",
},
},
},
"forecastquery": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
},
},
},
"frauddetector": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"fsx": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "fsx-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-prod-ca-central-1",
}: endpoint{
Hostname: "fsx-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-prod-us-east-1",
}: endpoint{
Hostname: "fsx-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-prod-us-east-2",
}: endpoint{
Hostname: "fsx-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-prod-us-west-1",
}: endpoint{
Hostname: "fsx-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-prod-us-west-2",
}: endpoint{
Hostname: "fsx-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "fsx-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "fsx-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "fsx-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "fsx-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "prod-ca-central-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-east-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-west-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-west-2.amazonaws.com",
},
},
},
"gamelift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"glacier": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glacier-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "glacier-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "glacier-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "glacier-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "glacier-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "glacier-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glacier-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "glacier-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glacier-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "glacier-fips.us-west-2.amazonaws.com",
},
},
},
"glue": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "glue-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "glue-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "glue-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "glue-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glue-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "glue-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glue-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "glue-fips.us-west-2.amazonaws.com",
},
},
},
"grafana": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "grafana.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "grafana.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "grafana.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "grafana.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "grafana.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "grafana.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "grafana.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "grafana.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "grafana.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "grafana.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"greengrass": service{
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"groundstation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "groundstation-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "groundstation-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "groundstation-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "groundstation-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "groundstation-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "groundstation-fips.us-west-2.amazonaws.com",
},
},
},
"guardduty": service{
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "guardduty-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "guardduty-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "guardduty-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "guardduty-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"health": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "health-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "health-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
},
},
"healthlake": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"honeycode": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"iam": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "iam.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "iam-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global-fips",
}: endpoint{
Hostname: "iam-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "iam",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "iam",
Variant: fipsVariant,
}: endpoint{
Hostname: "iam-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "iam-fips",
}: endpoint{
Hostname: "iam-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"identity-chime": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"identitystore": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"importexport": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "importexport.amazonaws.com",
SignatureVersions: []string{"v2", "v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
Service: "IngestionService",
},
},
},
},
"inspector": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "inspector-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "inspector-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "inspector-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "inspector-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "inspector-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "inspector-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "inspector-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "inspector-fips.us-west-2.amazonaws.com",
},
},
},
"inspector2": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"iot": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "execute-api",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "iot-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "iot-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "iot-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "iot-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "iot-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.us-west-2.amazonaws.com",
},
},
},
"iotanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"iotevents": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"ioteventsdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "data.iotevents.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "data.iotevents.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "data.iotevents.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "data.iotevents.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "data.iotevents.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "data.iotevents.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "data.iotevents.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "data.iotevents.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "data.iotevents.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "data.iotevents.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "data.iotevents.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"iotsecuredtunneling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
},
},
},
"iotsitewise": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"iotthingsgraph": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "iotthingsgraph",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"iotwireless": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "api.iotwireless.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "api.iotwireless.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"ivs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"kafka": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"kafkaconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"kendra": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "kendra-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "kendra-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "kendra-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kendra-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kendra-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kendra-fips.us-west-2.amazonaws.com",
},
},
},
"kinesis": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "kinesis-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "kinesis-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "kinesis-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "kinesis-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kinesis-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kinesis-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kinesis-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kinesis-fips.us-west-2.amazonaws.com",
},
},
},
"kinesisanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"kinesisvideo": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"kms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "af-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.af-south-1.amazonaws.com",
},
endpointKey{
Region: "af-south-1-fips",
}: endpoint{
Hostname: "kms-fips.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-east-1.amazonaws.com",
},
endpointKey{
Region: "ap-east-1-fips",
}: endpoint{
Hostname: "kms-fips.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-1-fips",
}: endpoint{
Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-2-fips",
}: endpoint{
Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-3-fips",
}: endpoint{
Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-south-1-fips",
}: endpoint{
Hostname: "kms-fips.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-1-fips",
}: endpoint{
Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-2-fips",
}: endpoint{
Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-3-fips",
}: endpoint{
Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "kms-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.eu-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1-fips",
}: endpoint{
Hostname: "kms-fips.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.eu-north-1.amazonaws.com",
},
endpointKey{
Region: "eu-north-1-fips",
}: endpoint{
Hostname: "kms-fips.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.eu-south-1.amazonaws.com",
},
endpointKey{
Region: "eu-south-1-fips",
}: endpoint{
Hostname: "kms-fips.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.eu-west-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-1-fips",
}: endpoint{
Hostname: "kms-fips.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.eu-west-2.amazonaws.com",
},
endpointKey{
Region: "eu-west-2-fips",
}: endpoint{
Hostname: "kms-fips.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.eu-west-3.amazonaws.com",
},
endpointKey{
Region: "eu-west-3-fips",
}: endpoint{
Hostname: "kms-fips.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.me-south-1.amazonaws.com",
},
endpointKey{
Region: "me-south-1-fips",
}: endpoint{
Hostname: "kms-fips.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.sa-east-1.amazonaws.com",
},
endpointKey{
Region: "sa-east-1-fips",
}: endpoint{
Hostname: "kms-fips.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "kms-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "kms-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "kms-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "kms-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"lakeformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
},
},
},
"lambda": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "af-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.af-south-1.api.aws",
},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-east-1.api.aws",
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-northeast-1.api.aws",
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-northeast-2.api.aws",
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-northeast-3.api.aws",
},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-south-1.api.aws",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-southeast-1.api.aws",
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-southeast-2.api.aws",
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ap-southeast-3.api.aws",
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.ca-central-1.api.aws",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.eu-central-1.api.aws",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.eu-north-1.api.aws",
},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.eu-south-1.api.aws",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.eu-west-1.api.aws",
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.eu-west-2.api.aws",
},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.eu-west-3.api.aws",
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "lambda-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "lambda-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "lambda-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "lambda-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.me-south-1.api.aws",
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.sa-east-1.api.aws",
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.us-east-1.api.aws",
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lambda-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.us-east-2.api.aws",
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "lambda-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.us-west-1.api.aws",
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lambda-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.us-west-2.api.aws",
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "lambda-fips.us-west-2.amazonaws.com",
},
},
},
"license-manager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "license-manager-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "license-manager-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "license-manager-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "license-manager-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-fips.us-west-2.amazonaws.com",
},
},
},
"lightsail": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"logs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "logs-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "logs-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "logs-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "logs-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "logs-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "logs-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "logs-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "logs-fips.us-west-2.amazonaws.com",
},
},
},
"lookoutequipment": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"lookoutmetrics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"lookoutvision": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"machinelearning": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"macie": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "macie-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "macie-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "macie-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "macie-fips.us-west-2.amazonaws.com",
},
},
},
"macie2": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "macie2-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "macie2-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "macie2-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "macie2-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "macie2-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "macie2-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "macie2-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "macie2-fips.us-west-2.amazonaws.com",
},
},
},
"managedblockchain": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"marketplacecommerceanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"mediaconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"mediaconvert": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
},
},
},
"medialive": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "medialive-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "medialive-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "medialive-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "medialive-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "medialive-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "medialive-fips.us-west-2.amazonaws.com",
},
},
},
"mediapackage": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"mediapackage-vod": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"mediastore": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"meetings-chime": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "meetings-chime-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "meetings-chime-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "meetings-chime-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "meetings-chime-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"messaging-chime": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"metering.marketplace": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "aws-marketplace",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"mgh": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"mgn": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"migrationhub-strategy": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"mobileanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"models-v2-lex": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"models.lex": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "lex",
},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "models-fips.lex.{region}.{dnsSuffix}",
CredentialScope: credentialScope{
Service: "lex",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "models-fips.lex.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "models-fips.lex.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "models-fips.lex.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "models-fips.lex.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"monitoring": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "monitoring-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "monitoring-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "monitoring-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "monitoring-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring-fips.us-west-2.amazonaws.com",
},
},
},
"mq": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "mq-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "mq-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "mq-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "mq-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mq-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "mq-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mq-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "mq-fips.us-west-2.amazonaws.com",
},
},
},
"mturk-requester": service{
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "sandbox",
}: endpoint{
Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"neptune": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{
Hostname: "rds.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "rds.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "rds.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "rds.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "rds.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "rds.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "rds.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "rds.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "rds.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "rds.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "rds.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "rds.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "me-south-1",
}: endpoint{
Hostname: "rds.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "rds.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "rds.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "rds.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "rds.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "rds.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"network-firewall": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
},
},
},
"networkmanager": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "networkmanager.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"nimble": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"oidc": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "oidc.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "oidc.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "oidc.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "oidc.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "oidc.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "oidc.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "oidc.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "oidc.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "oidc.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "oidc.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "oidc.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "oidc.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "oidc.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "oidc.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "oidc.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"opsworks": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"opsworks-cm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"organizations": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "organizations.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "organizations-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "fips-aws-global",
}: endpoint{
Hostname: "organizations-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"outposts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "outposts-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "outposts-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "outposts-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "outposts-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "outposts-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "outposts-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "outposts-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "outposts-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "outposts-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "outposts-fips.us-west-2.amazonaws.com",
},
},
},
"personalize": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"pi": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"pinpoint": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "mobiletargeting",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "pinpoint.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "pinpoint.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"polly": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "polly-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "polly-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "polly-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "polly-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "polly-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "polly-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "polly-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "polly-fips.us-west-2.amazonaws.com",
},
},
},
"portal.sso": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "portal.sso.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "portal.sso.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "portal.sso.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "portal.sso.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "portal.sso.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "portal.sso.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "portal.sso.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "portal.sso.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "portal.sso.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "portal.sso.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "portal.sso.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "portal.sso.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "portal.sso.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "portal.sso.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "portal.sso.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"profile": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"projects.iot1click": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"qldb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "qldb-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "qldb-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "qldb-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "qldb-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "qldb-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "qldb-fips.us-west-2.amazonaws.com",
},
},
},
"quicksight": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "api",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"ram": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ram-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "ram-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ram-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ram-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ram-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ram-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ram-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ram-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ram-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ram-fips.us-west-2.amazonaws.com",
},
},
},
"rbin": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"rds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "rds-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "rds-fips.ca-central-1",
}: endpoint{
Hostname: "rds-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds-fips.us-east-1",
}: endpoint{
Hostname: "rds-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds-fips.us-east-2",
}: endpoint{
Hostname: "rds-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds-fips.us-west-1",
}: endpoint{
Hostname: "rds-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds-fips.us-west-2",
}: endpoint{
Hostname: "rds-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.ca-central-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-east-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-west-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{
SSLCommonName: "{service}.{dnsSuffix}",
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-east-1.amazonaws.com",
SSLCommonName: "{service}.{dnsSuffix}",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "rds-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "rds-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "rds-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "rds-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"redshift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "redshift-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "redshift-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "redshift-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "redshift-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "redshift-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "redshift-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "redshift-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "redshift-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "redshift-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "redshift-fips.us-west-2.amazonaws.com",
},
},
},
"rekognition": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "rekognition-fips.ca-central-1",
}: endpoint{
Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition-fips.us-east-1",
}: endpoint{
Hostname: "rekognition-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition-fips.us-east-2",
}: endpoint{
Hostname: "rekognition-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition-fips.us-west-1",
}: endpoint{
Hostname: "rekognition-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition-fips.us-west-2",
}: endpoint{
Hostname: "rekognition-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.ca-central-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-east-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-west-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "rekognition-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "rekognition-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "rekognition-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "rekognition-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"resource-groups": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
},
},
},
"robomaker": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"route53": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "route53.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "route53-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "fips-aws-global",
}: endpoint{
Hostname: "route53-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"route53-recovery-control-config": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "route53-recovery-control-config.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"route53domains": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-east-1",
}: endpoint{},
},
},
"route53resolver": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"rum": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"runtime-v2-lex": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"runtime.lex": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "lex",
},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
CredentialScope: credentialScope{
Service: "lex",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"runtime.sagemaker": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.sagemaker.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"s3": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "af-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.af-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-east-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "s3.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "ap-northeast-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-northeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-northeast-3.amazonaws.com",
},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "s3.ap-southeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "ap-southeast-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-southeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "s3.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "ap-southeast-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ap-southeast-3.amazonaws.com",
},
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "s3.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.eu-north-1.amazonaws.com",
},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "s3.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "eu-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.eu-west-2.amazonaws.com",
},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.eu-west-3.amazonaws.com",
},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "s3-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "s3-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "s3-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "s3-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "s3-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.me-south-1.amazonaws.com",
},
endpointKey{
Region: "s3-external-1",
}: endpoint{
Hostname: "s3-external-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "s3.sa-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "sa-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.sa-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "s3.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-fips.dualstack.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-fips.dualstack.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "s3.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-fips.dualstack.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "s3.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-fips.dualstack.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
},
},
"s3-control": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "s3-control.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "s3-control.ap-northeast-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-northeast-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ap-northeast-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{
Hostname: "s3-control.ap-northeast-3.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
},
endpointKey{
Region: "ap-northeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ap-northeast-3.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "s3-control.ap-south-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-south-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ap-south-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "s3-control.ap-southeast-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ap-southeast-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "s3-control.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ap-southeast-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "s3-control.ca-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "ca-central-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.ca-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.ca-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "s3-control.eu-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-central-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.eu-central-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "s3-control.eu-north-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-north-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.eu-north-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "s3-control.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "s3-control.eu-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.eu-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "s3-control.eu-west-3.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "eu-west-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.eu-west-3.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "s3-control.sa-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "sa-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.sa-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "s3-control.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "s3-control-fips.us-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "s3-control.us-east-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-east-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.us-east-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.us-east-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.us-east-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "s3-control-fips.us-east-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "s3-control.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "s3-control-fips.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "s3-control.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "s3-control-fips.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"s3-outposts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{},
},
},
"savingsplans": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "savingsplans.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"schemas": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"sdb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"v2"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "sdb.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"secretsmanager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "secretsmanager-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"securityhub": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "securityhub-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "securityhub-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "securityhub-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "securityhub-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "securityhub-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "securityhub-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "securityhub-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "securityhub-fips.us-west-2.amazonaws.com",
},
},
},
"serverlessrepo": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "me-south-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Protocols: []string{"https"},
},
},
},
"servicecatalog": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"servicecatalog-appregistry": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
},
},
},
"servicediscovery": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "servicediscovery",
}: endpoint{
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "servicediscovery",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "servicediscovery-fips",
}: endpoint{
Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"servicequotas": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"session.qldb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
},
},
},
"shield": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SSLCommonName: "shield.us-east-1.amazonaws.com",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "shield.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "shield-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "fips-aws-global",
}: endpoint{
Hostname: "shield-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"sms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "sms-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "sms-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "sms-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "sms-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sms-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sms-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sms-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sms-fips.us-west-2.amazonaws.com",
},
},
},
"snowball": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ap-south-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.eu-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.eu-west-1.amazonaws.com",
},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.eu-west-2.amazonaws.com",
},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.eu-west-3.amazonaws.com",
},
endpointKey{
Region: "fips-ap-northeast-1",
}: endpoint{
Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-2",
}: endpoint{
Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-3",
}: endpoint{
Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-south-1",
}: endpoint{
Hostname: "snowball-fips.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-1",
}: endpoint{
Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-2",
}: endpoint{
Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "snowball-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-central-1",
}: endpoint{
Hostname: "snowball-fips.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-1",
}: endpoint{
Hostname: "snowball-fips.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-2",
}: endpoint{
Hostname: "snowball-fips.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-3",
}: endpoint{
Hostname: "snowball-fips.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-sa-east-1",
}: endpoint{
Hostname: "snowball-fips.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "snowball-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "snowball-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "snowball-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "snowball-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.sa-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.us-west-2.amazonaws.com",
},
},
},
"sns": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "sns-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "sns-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "sns-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "sns-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sns-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sns-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sns-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sns-fips.us-west-2.amazonaws.com",
},
},
},
"sqs": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SSLCommonName: "{region}.queue.{dnsSuffix}",
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "sqs-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "sqs-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "sqs-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "sqs-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{
SSLCommonName: "queue.{dnsSuffix}",
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sqs-fips.us-east-1.amazonaws.com",
SSLCommonName: "queue.{dnsSuffix}",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sqs-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sqs-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sqs-fips.us-west-2.amazonaws.com",
},
},
},
"ssm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "ssm-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "ssm-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "ssm-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "ssm-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "ssm-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm-fips.us-west-2.amazonaws.com",
},
},
},
"ssm-incidents": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"states": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "states-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "states-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "states-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "states-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "states-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "states-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "states-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "states-fips.us-west-2.amazonaws.com",
},
},
},
"storagegateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "ca-central-1-fips",
}: endpoint{
Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"streams.dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "local",
}: endpoint{
Hostname: "localhost:8000",
Protocols: []string{"http"},
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"sts": service{
PartitionEndpoint: "aws-global",
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "sts.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sts-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "sts-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sts-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "sts-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sts-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-1-fips",
}: endpoint{
Hostname: "sts-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "sts-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "sts-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"support": service{
PartitionEndpoint: "aws-global",
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "support.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
},
},
"swf": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "swf-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "swf-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "swf-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "swf-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "swf-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "swf-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "swf-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "swf-fips.us-west-2.amazonaws.com",
},
},
},
"synthetics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"tagging": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"textract": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "textract-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "textract-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "textract-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "textract-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "textract-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.us-west-2.amazonaws.com",
},
},
},
"transcribe": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.{region}.{dnsSuffix}",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "fips.transcribe.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "fips.transcribe.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "fips.transcribe.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "fips.transcribe.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.us-west-2.amazonaws.com",
},
},
},
"transcribestreaming": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "transcribestreaming-ca-central-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-fips-ca-central-1",
}: endpoint{
Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-fips-us-east-1",
}: endpoint{
Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-fips-us-east-2",
}: endpoint{
Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-fips-us-west-2",
}: endpoint{
Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-us-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-us-east-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-us-west-2",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "transcribestreaming-us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"transfer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "transfer-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "transfer-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "transfer-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "transfer-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "transfer-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.us-west-2.amazonaws.com",
},
},
},
"translate": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "translate-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-1-fips",
}: endpoint{
Hostname: "translate-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "translate-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-east-2-fips",
}: endpoint{
Hostname: "translate-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "translate-fips.us-west-2.amazonaws.com",
},
endpointKey{
Region: "us-west-2-fips",
}: endpoint{
Hostname: "translate-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
},
},
"voiceid": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"waf": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "aws",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "aws-fips",
}: endpoint{
Hostname: "waf-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "aws-global",
}: endpoint{
Hostname: "waf.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "aws-global-fips",
}: endpoint{
Hostname: "waf-fips.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
},
},
"waf-regional": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{
Hostname: "waf-regional.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
},
endpointKey{
Region: "af-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
},
endpointKey{
Region: "ap-east-1",
}: endpoint{
Hostname: "waf-regional.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
},
endpointKey{
Region: "ap-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "waf-regional.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "waf-regional.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-northeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{
Hostname: "waf-regional.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
},
endpointKey{
Region: "ap-northeast-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "waf-regional.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "waf-regional.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "waf-regional.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ap-southeast-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "waf-regional.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "waf-regional.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "waf-regional.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-north-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
},
endpointKey{
Region: "eu-south-1",
}: endpoint{
Hostname: "waf-regional.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
},
endpointKey{
Region: "eu-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "waf-regional.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "waf-regional.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "waf-regional.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "eu-west-3",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
},
endpointKey{
Region: "fips-af-south-1",
}: endpoint{
Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-east-1",
}: endpoint{
Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-1",
}: endpoint{
Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-2",
}: endpoint{
Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-northeast-3",
}: endpoint{
Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-south-1",
}: endpoint{
Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-1",
}: endpoint{
Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ap-southeast-2",
}: endpoint{
Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-central-1",
}: endpoint{
Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-north-1",
}: endpoint{
Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-north-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-south-1",
}: endpoint{
Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-1",
}: endpoint{
Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-2",
}: endpoint{
Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-west-3",
}: endpoint{
Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-3",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-me-south-1",
}: endpoint{
Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-sa-east-1",
}: endpoint{
Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{
Hostname: "waf-regional.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
},
endpointKey{
Region: "me-south-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "waf-regional.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "sa-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "sa-east-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "waf-regional.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "waf-regional.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "waf-regional.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "waf-regional.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
},
},
"wisdom": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"workdocs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "workdocs-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "workdocs-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "workdocs-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "workdocs-fips.us-west-2.amazonaws.com",
},
},
},
"workmail": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"workspaces": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "workspaces-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "workspaces-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "workspaces-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "workspaces-fips.us-west-2.amazonaws.com",
},
},
},
"workspaces-web": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"xray": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "xray-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "xray-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "xray-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "xray-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "xray-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "xray-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "xray-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "xray-fips.us-west-2.amazonaws.com",
},
},
},
},
}
// AwsCnPartition returns the Resolver for AWS China.
func AwsCnPartition() Partition {
return awscnPartition.Partition()
}
var awscnPartition = partition{
ID: "aws-cn",
Name: "AWS China",
DNSSuffix: "amazonaws.com.cn",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
reg, _ := regexp.Compile("^cn\\-\\w+\\-\\d+$")
return reg
}(),
},
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
DNSSuffix: "api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
Regions: regions{
"cn-north-1": region{
Description: "China (Beijing)",
},
"cn-northwest-1": region{
Description: "China (Ningxia)",
},
},
Services: services{
"access-analyzer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"account": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "account.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"acm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"api.ecr": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "api.ecr.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"api.sagemaker": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"api.tunneling.iot": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"apigateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"appconfigdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"application-autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"applicationinsights": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"appmesh": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"appsync": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"athena": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"autoscaling-plans": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"backup": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"batch": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"budgets": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "budgets.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"ce": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "ce.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"cloudformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"cloudfront": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "cloudfront.cn-northwest-1.amazonaws.com.cn",
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"cloudtrail": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"codebuild": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"codecommit": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"codedeploy": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"codepipeline": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"cognito-identity": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
},
},
"compute-optimizer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "compute-optimizer.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "compute-optimizer.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"config": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"cur": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"data.jobs.iot": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"databrew": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"dax": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"directconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"dms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"docdb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"ds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"ebs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"ec2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"ecs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"eks": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"elasticache": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"elasticbeanstalk": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"elasticfilesystem": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-north-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
},
endpointKey{
Region: "fips-cn-north-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-cn-northwest-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
Deprecated: boxedTrue,
},
},
},
"elasticloadbalancing": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"elasticmapreduce": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"emr-containers": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"es": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"events": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"firehose": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"fms": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"fsx": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"gamelift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"glacier": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"glue": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"greengrass": service{
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
},
},
"guardduty": service{
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"health": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"iam": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "iam.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
},
},
"iot": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "execute-api",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"iotanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
},
},
"iotevents": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
},
},
"ioteventsdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "data.iotevents.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
},
},
"iotsecuredtunneling": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"iotsitewise": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
},
},
"kafka": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"kinesis": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"kinesisanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"kms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"lakeformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"lambda": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-north-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn",
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn",
},
},
},
"license-manager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"logs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"mediaconvert": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"monitoring": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"mq": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"neptune": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "rds.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"organizations": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "organizations.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"personalize": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
},
},
"pi": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"polly": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"ram": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"rds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"redshift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"resource-groups": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"route53": service{
PartitionEndpoint: "aws-cn-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "route53.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"route53resolver": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"runtime.sagemaker": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"s3": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com.cn",
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-north-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn",
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn",
},
},
},
"s3-control": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "s3-control.cn-north-1.amazonaws.com.cn",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-north-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.cn-north-1.amazonaws.com.cn",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "s3-control.cn-northwest-1.amazonaws.com.cn",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
endpointKey{
Region: "cn-northwest-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.cn-northwest-1.amazonaws.com.cn",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"secretsmanager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"securityhub": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"serverlessrepo": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Protocols: []string{"https"},
},
},
},
"servicecatalog": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"servicediscovery": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"sms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"snowball": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-north-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
},
endpointKey{
Region: "fips-cn-north-1",
}: endpoint{
Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-cn-northwest-1",
}: endpoint{
Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
Deprecated: boxedTrue,
},
},
},
"sns": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"sqs": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SSLCommonName: "{region}.queue.{dnsSuffix}",
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"ssm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"states": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"storagegateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"streams.dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"sts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"support": service{
PartitionEndpoint: "aws-cn-global",
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-cn-global",
}: endpoint{
Hostname: "support.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
},
},
"swf": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"synthetics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"tagging": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"transcribe": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "cn.transcribe.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "cn.transcribe.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"transcribestreaming": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"transfer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"waf-regional": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "waf-regional.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-north-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "waf-regional.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
endpointKey{
Region: "cn-northwest-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
endpointKey{
Region: "fips-cn-north-1",
}: endpoint{
Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-north-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-cn-northwest-1",
}: endpoint{
Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
Deprecated: boxedTrue,
},
},
},
"workspaces": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"xray": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
},
}
// AwsUsGovPartition returns the Resolver for AWS GovCloud (US).
func
|
() Partition {
return awsusgovPartition.Partition()
}
var awsusgovPartition = partition{
ID: "aws-us-gov",
Name: "AWS GovCloud (US)",
DNSSuffix: "amazonaws.com",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
reg, _ := regexp.Compile("^us\\-gov\\-\\w+\\-\\d+$")
return reg
}(),
},
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
DNSSuffix: "api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
Regions: regions{
"us-gov-east-1": region{
Description: "AWS GovCloud (US-East)",
},
"us-gov-west-1": region{
Description: "AWS GovCloud (US-West)",
},
},
Services: services{
"access-analyzer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"acm": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "acm.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "acm.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "acm.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"acm-pca": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca.{region}.{dnsSuffix}",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
},
},
},
"api.detective": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"api.ecr": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "dkr-us-gov-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-gov-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dkr-us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-dkr-us-gov-east-1",
}: endpoint{
Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-dkr-us-gov-west-1",
}: endpoint{
Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "api.ecr.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "api.ecr.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"api.sagemaker": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1-fips-secondary",
}: endpoint{
Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1-secondary",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1-secondary",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"api.tunneling.iot": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
},
},
},
"apigateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"appconfigdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"application-autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Hostname: "autoscaling.{region}.amazonaws.com",
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "application-autoscaling",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
},
},
"applicationinsights": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "applicationinsights.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "applicationinsights.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"appstream2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
CredentialScope: credentialScope{
Service: "appstream",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"athena": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
},
},
},
"autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "autoscaling.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
},
},
"autoscaling-plans": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
},
},
"backup": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"batch": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "batch.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "batch.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "batch.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "batch.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "batch.us-gov-west-1.amazonaws.com",
},
},
},
"cloudcontrolapi": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
},
},
},
"clouddirectory": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"cloudformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"cloudhsm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"cloudhsmv2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "cloudhsm",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"cloudtrail": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
},
},
},
"codebuild": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"codecommit": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"codedeploy": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"codepipeline": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
},
},
},
"cognito-identity": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
},
},
},
"cognito-idp": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
},
},
},
"comprehend": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
},
},
},
"comprehendmedical": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
},
},
},
"config": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "config.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "config.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "config.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "config.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "config.us-gov-west-1.amazonaws.com",
},
},
},
"connect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"data.jobs.iot": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
},
},
},
"databrew": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"datasync": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
},
},
},
"directconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "directconnect.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "directconnect.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"dms": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "dms",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms-fips",
}: endpoint{
Hostname: "dms.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "dms.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "dms.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"docdb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"ds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
},
},
},
"dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"ebs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"ec2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "ec2.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "ec2.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "ec2.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"ecs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
},
},
},
"eks": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "eks.{region}.{dnsSuffix}",
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "eks.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "eks.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "eks.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "eks.us-gov-west-1.amazonaws.com",
},
},
},
"elasticache": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticache.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "elasticache.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticache.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "elasticache.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"elasticbeanstalk": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"elasticfilesystem": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
},
},
},
"elasticloadbalancing": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
},
},
"elasticmapreduce": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
Protocols: []string{"https"},
},
},
},
"email": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "email-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "email-fips.us-gov-west-1.amazonaws.com",
},
},
},
"es": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "es-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "es-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "es-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "es-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "es-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"events": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "events.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "events.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "events.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "events.us-gov-west-1.amazonaws.com",
},
},
},
"firehose": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
},
},
},
"fms": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
},
},
},
"fsx": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-prod-us-gov-east-1",
}: endpoint{
Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-prod-us-gov-west-1",
}: endpoint{
Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-gov-east-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-gov-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "prod-us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
},
},
},
"glacier": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "glacier.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "glacier.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"glue": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
},
},
},
"greengrass": service{
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "dataplane-us-gov-east-1",
}: endpoint{
Hostname: "greengrass-ats.iot.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "dataplane-us-gov-west-1",
}: endpoint{
Hostname: "greengrass-ats.iot.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "greengrass-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "greengrass.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "greengrass-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "greengrass.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"guardduty": service{
IsRegionalized: boxedTrue,
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty.{region}.{dnsSuffix}",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "guardduty.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "guardduty.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "guardduty.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"health": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "health-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "health-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"iam": service{
PartitionEndpoint: "aws-us-gov-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-us-gov-global",
}: endpoint{
Hostname: "iam.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "aws-us-gov-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "iam.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "aws-us-gov-global-fips",
}: endpoint{
Hostname: "iam.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "iam-govcloud",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "iam-govcloud",
Variant: fipsVariant,
}: endpoint{
Hostname: "iam.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "iam-govcloud-fips",
}: endpoint{
Hostname: "iam.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"identitystore": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "identitystore.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "identitystore.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "identitystore.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "identitystore.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "identitystore.us-gov-west-1.amazonaws.com",
},
},
},
"inspector": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
},
},
},
"iot": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "execute-api",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Service: "execute-api",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
},
},
},
"iotevents": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"ioteventsdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "data.iotevents.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"iotsecuredtunneling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
},
},
},
"iotsitewise": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"kafka": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"kendra": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
},
},
},
"kinesis": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "kinesis.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "kinesis.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"kinesisanalytics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"kms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ProdFips",
}: endpoint{
Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"lakeformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
},
},
},
"lambda": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
},
},
},
"license-manager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
},
},
},
"logs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "logs.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "logs.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "logs.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "logs.us-gov-west-1.amazonaws.com",
},
},
},
"mediaconvert": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "mediaconvert.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"metering.marketplace": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "aws-marketplace",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"models.lex": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "lex",
},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "models-fips.lex.{region}.{dnsSuffix}",
CredentialScope: credentialScope{
Service: "lex",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"monitoring": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "monitoring.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "monitoring.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "monitoring.us-gov-west-1.amazonaws.com",
},
},
},
"mq": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
},
},
},
"neptune": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "rds.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"network-firewall": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
},
},
},
"networkmanager": service{
PartitionEndpoint: "aws-us-gov-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-us-gov-global",
}: endpoint{
Hostname: "networkmanager.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"oidc": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "oidc.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "oidc.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"organizations": service{
PartitionEndpoint: "aws-us-gov-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-us-gov-global",
}: endpoint{
Hostname: "organizations.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "aws-us-gov-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "organizations.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "fips-aws-us-gov-global",
}: endpoint{
Hostname: "organizations.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"outposts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "outposts.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "outposts.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"pinpoint": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "mobiletargeting",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "pinpoint.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"polly": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
},
},
},
"portal.sso": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "portal.sso.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "portal.sso.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"quicksight": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "api",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"ram": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "ram.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "ram.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"rds": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "rds.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "rds.us-gov-east-1",
}: endpoint{
Hostname: "rds.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rds.us-gov-west-1",
}: endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "rds.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"redshift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "redshift.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "redshift.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"rekognition": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "rekognition-fips.us-gov-west-1",
}: endpoint{
Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-gov-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "rekognition.us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"resource-groups": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
},
},
},
"route53": service{
PartitionEndpoint: "aws-us-gov-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-us-gov-global",
}: endpoint{
Hostname: "route53.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "aws-us-gov-global",
Variant: fipsVariant,
}: endpoint{
Hostname: "route53.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "fips-aws-us-gov-global",
}: endpoint{
Hostname: "route53.us-gov.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"route53resolver": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"runtime.lex": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "lex",
},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
CredentialScope: credentialScope{
Service: "lex",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"runtime.sagemaker": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime.sagemaker.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"s3": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SignatureVersions: []string{"s3", "s3v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "s3.us-gov-east-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.us-gov-east-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "s3.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3.dualstack.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
},
},
"s3-control": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: dualStackVariant,
}: endpoint{
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
defaultKey{
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
DNSSuffix: "amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "s3-control.us-gov-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.us-gov-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.us-gov-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "s3-control.us-gov-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "s3-control.dualstack.us-gov-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant | dualStackVariant,
}: endpoint{
Hostname: "s3-control-fips.dualstack.us-gov-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
SignatureVersions: []string{"s3v4"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"s3-outposts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{},
},
},
"secretsmanager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"securityhub": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
},
},
},
"serverlessrepo": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com",
Protocols: []string{"https"},
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com",
Protocols: []string{"https"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"servicecatalog": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"servicecatalog-appregistry": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "servicecatalog-appregistry.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "servicecatalog-appregistry.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicecatalog-appregistry.us-gov-west-1.amazonaws.com",
},
},
},
"servicediscovery": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "servicediscovery",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "servicediscovery",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "servicediscovery-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"servicequotas": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "servicequotas.{region}.{dnsSuffix}",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
},
},
},
"sms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
},
},
},
"snowball": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
},
},
},
"sns": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "sns.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "sns.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sns.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sns.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
},
},
"sqs": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "sqs.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "sqs.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "sqs.us-gov-west-1.amazonaws.com",
SSLCommonName: "{region}.queue.{dnsSuffix}",
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"ssm": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "ssm.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "ssm.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "ssm.us-gov-west-1.amazonaws.com",
},
},
},
"states": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "states-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "states.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "states-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "states.us-gov-west-1.amazonaws.com",
},
},
},
"storagegateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips",
}: endpoint{
Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"streams.dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "streams.dynamodb.{region}.{dnsSuffix}",
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"sts": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "sts.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sts.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-east-1-fips",
}: endpoint{
Hostname: "sts.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "sts.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "sts.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"support": service{
PartitionEndpoint: "aws-us-gov-global",
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-us-gov-global",
}: endpoint{
Hostname: "support.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "support.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "support.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"swf": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "swf.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "swf.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"synthetics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"tagging": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"textract": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
},
},
},
"transcribe": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.{region}.{dnsSuffix}",
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
},
},
},
"transfer": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
},
},
},
"translate": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1-fips",
}: endpoint{
Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
},
},
"waf-regional": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "waf-regional.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "waf-regional.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
},
},
},
"workspaces": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
},
},
},
"xray": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
},
},
},
},
}
// AwsIsoPartition returns the Resolver for AWS ISO (US).
func AwsIsoPartition() Partition {
return awsisoPartition.Partition()
}
var awsisoPartition = partition{
ID: "aws-iso",
Name: "AWS ISO (US)",
DNSSuffix: "c2s.ic.gov",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
reg, _ := regexp.Compile("^us\\-iso\\-\\w+\\-\\d+$")
return reg
}(),
},
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
Regions: regions{
"us-iso-east-1": region{
Description: "US ISO East",
},
"us-iso-west-1": region{
Description: "US ISO WEST",
},
},
Services: services{
"api.ecr": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Hostname: "api.ecr.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{
Hostname: "api.ecr.us-iso-west-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-west-1",
},
},
},
},
"api.sagemaker": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"apigateway": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"application-autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"autoscaling": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"cloudformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"cloudtrail": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"codedeploy": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"comprehend": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"config": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"datapipeline": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"directconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"dms": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "dms",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms-fips",
}: endpoint{
Hostname: "dms.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-iso-east-1.c2s.ic.gov",
},
endpointKey{
Region: "us-iso-east-1-fips",
}: endpoint{
Hostname: "dms.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-iso-west-1.c2s.ic.gov",
},
endpointKey{
Region: "us-iso-west-1-fips",
}: endpoint{
Hostname: "dms.us-iso-west-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-west-1",
},
Deprecated: boxedTrue,
},
},
},
"ds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"dynamodb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"ebs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"ec2": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"ecs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"elasticache": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"elasticfilesystem": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-iso-east-1",
}: endpoint{
Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
},
},
},
"elasticloadbalancing": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"elasticmapreduce": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"es": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"events": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"firehose": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"glacier": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"health": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"iam": service{
PartitionEndpoint: "aws-iso-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-iso-global",
}: endpoint{
Hostname: "iam.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
},
},
},
"kinesis": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"kms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ProdFips",
}: endpoint{
Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
},
endpointKey{
Region: "us-iso-east-1-fips",
}: endpoint{
Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
},
endpointKey{
Region: "us-iso-west-1-fips",
}: endpoint{
Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-west-1",
},
Deprecated: boxedTrue,
},
},
},
"lambda": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"license-manager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"logs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"medialive": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"mediapackage": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"monitoring": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"outposts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"ram": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"rds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"redshift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"route53": service{
PartitionEndpoint: "aws-iso-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-iso-global",
}: endpoint{
Hostname: "route53.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
},
},
},
"route53resolver": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"runtime.sagemaker": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"s3": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"secretsmanager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"snowball": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"sns": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"sqs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{
Protocols: []string{"http", "https"},
},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"ssm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"states": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"streams.dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"sts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"support": service{
PartitionEndpoint: "aws-iso-global",
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-iso-global",
}: endpoint{
Hostname: "support.us-iso-east-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-east-1",
},
},
},
},
"swf": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{
Region: "us-iso-west-1",
}: endpoint{},
},
},
"synthetics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"transcribe": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"transcribestreaming": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"translate": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
"workspaces": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
},
},
},
}
// AwsIsoBPartition returns the Resolver for AWS ISOB (US).
func AwsIsoBPartition() Partition {
return awsisobPartition.Partition()
}
var awsisobPartition = partition{
ID: "aws-iso-b",
Name: "AWS ISOB (US)",
DNSSuffix: "sc2s.sgov.gov",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
reg, _ := regexp.Compile("^us\\-isob\\-\\w+\\-\\d+$")
return reg
}(),
},
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Hostname: "{service}.{region}.{dnsSuffix}",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
Regions: regions{
"us-isob-east-1": region{
Description: "US ISOB East (Ohio)",
},
},
Services: services{
"api.ecr": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{
Hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
},
},
},
"application-autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"autoscaling": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"cloudformation": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"cloudtrail": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"codedeploy": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"config": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"directconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"dms": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.{region}.{dnsSuffix}",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "dms",
}: endpoint{
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "dms-fips",
}: endpoint{
Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
endpointKey{
Region: "us-isob-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
},
endpointKey{
Region: "us-isob-east-1-fips",
}: endpoint{
Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
Deprecated: boxedTrue,
},
},
},
"ds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"ebs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"ec2": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"ecs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"elasticache": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"elasticloadbalancing": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{
Protocols: []string{"https"},
},
},
},
"elasticmapreduce": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"es": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"events": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"glacier": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"health": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"iam": service{
PartitionEndpoint: "aws-iso-b-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-iso-b-global",
}: endpoint{
Hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
},
},
},
"kinesis": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"kms": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ProdFips",
}: endpoint{
Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
endpointKey{
Region: "us-isob-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
},
endpointKey{
Region: "us-isob-east-1-fips",
}: endpoint{
Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
Deprecated: boxedTrue,
},
},
},
"lambda": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"license-manager": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"logs": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"monitoring": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"rds": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"redshift": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"route53": service{
PartitionEndpoint: "aws-iso-b-global",
IsRegionalized: boxedFalse,
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-iso-b-global",
}: endpoint{
Hostname: "route53.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
},
},
},
"s3": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"snowball": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"sns": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"sqs": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
SSLCommonName: "{region}.queue.{dnsSuffix}",
Protocols: []string{"http", "https"},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"ssm": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"states": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"streams.dynamodb": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"sts": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"support": service{
PartitionEndpoint: "aws-iso-b-global",
Endpoints: serviceEndpoints{
endpointKey{
Region: "aws-iso-b-global",
}: endpoint{
Hostname: "support.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: credentialScope{
Region: "us-isob-east-1",
},
},
},
},
"swf": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"synthetics": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"tagging": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
},
}
|
AwsUsGovPartition
|
Model_codebase_2_flask.py
|
#11915010 Raghu Punnamraju
#11915043 Anmol More
#11915001 Sriganesh Balamurugan
#11915052 Kapil Bindal
import pandas as pd
from ast import literal_eval
from cdqa.utils.filters import filter_paragraphs
from cdqa.utils.download import download_model, download_bnpp_data
from cdqa.pipeline.cdqa_sklearn import QAPipeline
#read the cleaned dataset and just take question and context for our model
df = pd.read_csv('data/dataset_collected.csv', usecols=['question', 'context'])
#convert paragraphs to a list
df['paragraphs'] = df[df.columns[1:]].apply(
lambda x: x.dropna().values.tolist(),
axis=1)
df.rename(columns={"question": "title"}, inplace=True)
df.drop(columns='context', inplace=True)
df.to_csv('df_corona.csv', index=False)
|
print('Welcome to Corona Chatbot ! How can I help you ? ')
print('Press enter twice to quit')
while True:
query = input()
prediction = cdqa_pipeline.predict(query=query)
print('Query : {}\n'.format(query))
print('Reply from Bot: {}\n'.format(prediction[0]))
|
#use a lighter pipleline model to build pipeline on top of it
cdqa_pipeline = QAPipeline(reader='models/distilbert_qa.joblib')
cdqa_pipeline.fit_retriever(df=df)
|
loss_factory.py
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
def cross_entropy_dist_epoch(reduction='mean', **_):
cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction)
l1_fn = torch.nn.L1Loss(reduction=reduction)
def loss_fn(outputs, outputs_f, labels, epoch, **_):
|
return {'train': loss_fn, 'val': cross_entropy_fn}
def cross_entropy_dist(reduction='mean', **_):
cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction)
l1_fn = torch.nn.L1Loss(reduction=reduction)
def loss_fn(outputs, outputs_f, labels, **_):
loss_dict = dict()
full_gt_loss = cross_entropy_fn(outputs_f['out'], labels)
gt_loss = cross_entropy_fn(outputs['out'], labels)
dist_loss = 0
layer_names = outputs.keys()
len_layer = len(layer_names)
for i, layer_name in enumerate(layer_names):
if i == len_layer - 1:
continue
dist_loss += l1_fn(outputs[layer_name], outputs_f[layer_name])
loss_dict['loss'] = gt_loss + dist_loss + full_gt_loss
loss_dict['gt_loss'] = gt_loss
loss_dict['full_gt_loss'] = full_gt_loss
return loss_dict
return {'train': loss_fn, 'val': cross_entropy_fn}
def cross_entropy(reduction='mean', **_):
cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction)
def loss_fn(outputs, labels, **_):
loss_dict = dict()
gt_loss = cross_entropy_fn(outputs, labels)
loss_dict['loss'] = gt_loss
loss_dict['gt_loss'] = gt_loss
return loss_dict
return {'train': loss_fn, 'val': cross_entropy_fn}
def regularization(reduction='mean', **_):
cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction)
def loss_fn(outputs, labels, reg_factors, **_):
loss_dict = dict()
gt_loss = cross_entropy_fn(outputs, labels)
reg_loss = 0
for i in range(len(reg_factors)):
reg_loss += torch.mean((torch.pow(reg_factors[i]-1, 2)*torch.pow(reg_factors[i]+1, 2)))
reg_loss = reg_loss / len(reg_factors)
loss_dict['loss'] = gt_loss + reg_loss
loss_dict['gt_loss'] = gt_loss
loss_dict['reg_loss'] = reg_loss
return loss_dict
return {'train': loss_fn, 'val': cross_entropy_fn}
def regularization_temp(reduction='mean', **_):
cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction)
def loss_fn(outputs, labels, reg_factors, **_):
loss_dict = dict()
gt_loss = cross_entropy_fn(outputs, labels)
reg_loss = 0
for i in range(len(reg_factors)):
reg_loss += torch.mean((torch.pow(reg_factors[i]-1, 2)*torch.pow(reg_factors[i]+1, 2)))
reg_loss = reg_loss / len(reg_factors)
loss_dict['loss'] = gt_loss + reg_loss
loss_dict['gt_loss'] = gt_loss
loss_dict['reg_loss'] = reg_loss
return loss_dict
return {'train': loss_fn, 'val': cross_entropy_fn}
def get_loss(config):
f = globals().get(config.loss.name)
return f(**config.loss.params)
|
loss_dict = dict()
full_gt_loss = cross_entropy_fn(outputs_f['out'], labels)
gt_loss = cross_entropy_fn(outputs['out'], labels)
dist_loss = 0
layer_names = outputs.keys()
len_layer = len(layer_names)
for i, layer_name in enumerate(layer_names):
if i == len_layer - 1:
continue
dist_loss += l1_fn(outputs[layer_name], outputs_f[layer_name])
scale = epoch / 100
if epoch == 100:
scale = 1
loss_dict['loss'] = scale*(gt_loss + dist_loss) + full_gt_loss
loss_dict['gt_loss'] = gt_loss
loss_dict['full_gt_loss'] = full_gt_loss
return loss_dict
|
actions.py
|
from datetime import datetime
from functools import partial
from typing import Callable, List, Union
from symbiotic.schedule import Schedule
class Action(object):
def __init__(self, callback: Callable, *args, **kwargs):
self._callback: partial = partial(callback, *args, **kwargs)
self._schedule: Union[Schedule, None] = None
self._next_execution: Union[datetime, None] = None
def __repr__(self):
rep = f'{self.__class__.__qualname__}:'
rep += f' {self._callback.func.__name__},'
rep += f' args: {self._callback.args},'
rep += f' kwargs: {self._callback.keywords}'
return rep
def __call__(self):
return self._callback()
def set_schedule(self, schedule: Schedule) -> None:
self._schedule = schedule
self.schedule_next_execution()
def should_execute(self):
return datetime.now() > self._next_execution
def schedule_next_execution(self):
datetimes = [instant.next_datetime() for instant in self._schedule.instants()]
self._next_execution = min(datetimes) # get the earliest execution datetime
class ActionScheduler(object):
def __init__(self):
self.actions: List[Action] = []
self._schedule: Union[Schedule, None] = None
def start_session(self, schedule: Schedule):
self._schedule = schedule
def add(self, callback: Callable, *args, **kwargs):
action = Action(callback, *args, *kwargs)
action.set_schedule(self._schedule)
self.actions.append(action)
return action
def end_session(self):
|
def run(self):
for action in self.actions[:]:
if action.should_execute():
action()
action.schedule_next_execution()
|
self._schedule = None
|
Error_SuperAsTemplateTag.js
|
// Error: :7:18: Unexpected token no substitution template
class A {}
class
|
extends A {
method() {
return super ``;
}
}
|
ImproperSuper
|
generate_course_tracking_logs.py
|
'''
This module will extract tracking logs for a given course and date range
between when course enrollment start and when the course ended. For each log,
the parent_data and meta_data from the course_structure collection will be
appended to the log based on the event key in the log
'''
import pymongo
import sys
from datetime import datetime
import json
def
|
(db_name, collection_name):
'''
Return collection of a given database name and collection name
'''
connection = pymongo.Connection('localhost', 27017)
db = connection[db_name]
collection = db[collection_name]
return collection
def load_config(config_file):
'''
Return course ids and ranges of dates from which course specific tracking
logs will be extracted
'''
with open(config_file) as file_handler:
data = json.load(file_handler)
if not isinstance(data['course_ids'], list):
raise ValueError('Expecting list of course ids')
try:
start_date = datetime.strptime(data['date_of_course_enrollment'], '%Y-%m-%d')
end_date = datetime.strptime(data['date_of_course_completion'], '%Y-%m-%d')
except ValueError:
raise ValueError('Incorrect data format, should be YYYY-MM-DD')
return data['course_ids'], start_date.date(), end_date.date()
def append_course_structure_data(course_structure_collection, _id, document):
'''
Append parent_data and metadata (if exists) from course structure to
tracking log
'''
try:
data = course_structure_collection.find({"_id" : _id})[0]
if 'parent_data' in data:
document['parent_data'] = data['parent_data']
if 'metadata' in data:
document['metadata'] = data['metadata']
except:
pass
def extract_tracking_logs(source_collection, destination_collection, course_structure_collection, course_ids, start_date, end_date):
'''
Return all trackings logs that contain given ids and that contain dates
within the given range
'''
documents = source_collection.find({'course_id' : { '$in' : course_ids }})
for document in documents:
if start_date <= datetime.strptime(document['time'].split('T')[0], "%Y-%m-%d").date() <= end_date:
# Bind parent_data and metadata from course_structure to tracking document
bound = False
if document['event']:
if isinstance(document['event'], dict):
if 'id' in document['event']:
splitted = document['event']['id'].split('-')
if len(splitted) > 3:
document['event']['id'] = splitted[-1]
if not bound:
append_course_structure_data(course_structure_collection, document['event']['id'], document)
bound = True
if document['page']:
splitted = document['page'].split('/')
if len(splitted) > 2:
document['page'] = splitted[-2]
if not bound:
append_course_structure_data(course_structure_collection, document['page'], document)
# End of binding, now insert document into collection
destination_collection.insert(document)
def main():
if len(sys.argv) != 6:
usage_message = """usage: %s source_db destination_db course_config_file
Provide name of course database to insert tracking logs to and
config file to load configurations\n
"""
sys.stderr.write(usage_message % sys.argv[0])
sys.exit(1)
source_db = sys.argv[1]
destination_db = sys.argv[2]
source_collection = connect_to_db_collection(source_db, 'tracking')
destination_collection = connect_to_db_collection(destination_db, 'tracking')
course_structure_collection = connect_to_db_collection(destination_db, 'course_structure')
course_ids, start_date, end_date = load_config(sys.argv[3])
extract_tracking_logs(source_collection, destination_collection, course_structure_collection, course_ids, start_date, end_date)
if __name__ == '__main__':
main()
|
connect_to_db_collection
|
hook.go
|
// Code generated by entc, DO NOT EDIT.
package hook
import (
"context"
"fmt"
"github.com/go-kratos/examples/blog/internal/data/ent"
)
// The CommentFunc type is an adapter to allow the use of ordinary
// function as Comment mutator.
type CommentFunc func(context.Context, *ent.CommentMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f CommentFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
mv, ok := m.(*ent.CommentMutation)
if !ok {
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.CommentMutation", m)
}
return f(ctx, mv)
}
// The PostFunc type is an adapter to allow the use of ordinary
// function as Post mutator.
type PostFunc func(context.Context, *ent.PostMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f PostFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
mv, ok := m.(*ent.PostMutation)
if !ok {
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.PostMutation", m)
}
return f(ctx, mv)
}
// The TagFunc type is an adapter to allow the use of ordinary
// function as Tag mutator.
type TagFunc func(context.Context, *ent.TagMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f TagFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
mv, ok := m.(*ent.TagMutation)
if !ok {
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.TagMutation", m)
}
return f(ctx, mv)
}
// Condition is a hook condition function.
type Condition func(context.Context, ent.Mutation) bool
// And groups conditions with the AND operator.
func And(first, second Condition, rest ...Condition) Condition {
return func(ctx context.Context, m ent.Mutation) bool {
if !first(ctx, m) || !second(ctx, m) {
return false
}
for _, cond := range rest {
if !cond(ctx, m) {
return false
}
}
return true
}
}
// Or groups conditions with the OR operator.
func Or(first, second Condition, rest ...Condition) Condition {
return func(ctx context.Context, m ent.Mutation) bool {
if first(ctx, m) || second(ctx, m) {
return true
}
for _, cond := range rest {
if cond(ctx, m) {
return true
}
}
return false
}
}
// Not negates a given condition.
func Not(cond Condition) Condition {
return func(ctx context.Context, m ent.Mutation) bool {
return !cond(ctx, m)
}
}
// HasOp is a condition testing mutation operation.
func HasOp(op ent.Op) Condition {
return func(_ context.Context, m ent.Mutation) bool {
return m.Op().Is(op)
}
}
// HasAddedFields is a condition validating `.AddedField` on fields.
func HasAddedFields(field string, fields ...string) Condition {
return func(_ context.Context, m ent.Mutation) bool {
if _, exists := m.AddedField(field); !exists {
return false
}
for _, field := range fields {
if _, exists := m.AddedField(field); !exists {
return false
}
}
return true
}
}
// HasClearedFields is a condition validating `.FieldCleared` on fields.
func HasClearedFields(field string, fields ...string) Condition {
return func(_ context.Context, m ent.Mutation) bool {
if exists := m.FieldCleared(field); !exists {
return false
}
for _, field := range fields {
if exists := m.FieldCleared(field); !exists {
return false
}
}
return true
}
}
// HasFields is a condition validating `.Field` on fields.
func HasFields(field string, fields ...string) Condition {
return func(_ context.Context, m ent.Mutation) bool {
if _, exists := m.Field(field); !exists {
return false
}
for _, field := range fields {
if _, exists := m.Field(field); !exists {
return false
}
}
return true
}
}
// If executes the given hook under condition.
//
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {
return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if cond(ctx, m) {
return hk(next).Mutate(ctx, m)
}
return next.Mutate(ctx, m)
})
}
}
// On executes the given hook only for the given operation.
//
// hook.On(Log, ent.Delete|ent.Create)
//
func On(hk ent.Hook, op ent.Op) ent.Hook {
return If(hk, HasOp(op))
}
// Unless skips the given hook only for the given operation.
//
// hook.Unless(Log, ent.Update|ent.UpdateOne)
//
func Unless(hk ent.Hook, op ent.Op) ent.Hook {
return If(hk, Not(HasOp(op)))
}
// FixedError is a hook returning a fixed error.
func FixedError(err error) ent.Hook {
return func(ent.Mutator) ent.Mutator {
return ent.MutateFunc(func(context.Context, ent.Mutation) (ent.Value, error) {
return nil, err
})
}
}
// Reject returns a hook that rejects all operations that match op.
//
// func (T) Hooks() []ent.Hook {
// return []ent.Hook{
// Reject(ent.Delete|ent.Update),
// }
// }
//
func Reject(op ent.Op) ent.Hook {
hk := FixedError(fmt.Errorf("%s operation is not allowed", op))
return On(hk, op)
}
// Chain acts as a list of hooks and is effectively immutable.
// Once created, it will always hold the same set of hooks in the same order.
type Chain struct {
hooks []ent.Hook
}
// NewChain creates a new chain of hooks.
func NewChain(hooks ...ent.Hook) Chain
|
// Hook chains the list of hooks and returns the final hook.
func (c Chain) Hook() ent.Hook {
return func(mutator ent.Mutator) ent.Mutator {
for i := len(c.hooks) - 1; i >= 0; i-- {
mutator = c.hooks[i](mutator)
}
return mutator
}
}
// Append extends a chain, adding the specified hook
// as the last ones in the mutation flow.
func (c Chain) Append(hooks ...ent.Hook) Chain {
newHooks := make([]ent.Hook, 0, len(c.hooks)+len(hooks))
newHooks = append(newHooks, c.hooks...)
newHooks = append(newHooks, hooks...)
return Chain{newHooks}
}
// Extend extends a chain, adding the specified chain
// as the last ones in the mutation flow.
func (c Chain) Extend(chain Chain) Chain {
return c.Append(chain.hooks...)
}
|
{
return Chain{append([]ent.Hook(nil), hooks...)}
}
|
warp.rs
|
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use super::WARP_SIZE;
use crate::data::{EOByte, EOChar, EOShort, Serializeable, StreamBuilder, StreamReader};
#[derive(Debug, Clone, Default)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Warp {
pub x: EOChar,
pub warp_map: EOShort,
pub warp_x: EOChar,
pub warp_y: EOChar,
pub level_req: EOChar,
pub door: bool,
}
impl Warp {
pub fn new() -> Self {
Self::default()
}
}
impl Serializeable for Warp {
fn deserialize(&mut self, reader: &StreamReader) {
self.x = reader.get_char();
self.warp_map = reader.get_short();
self.warp_x = reader.get_char();
self.warp_y = reader.get_char();
self.level_req = reader.get_char();
self.door = reader.get_short() == 1;
}
fn serialize(&self) -> Vec<EOByte> {
let mut builder = StreamBuilder::with_capacity(WARP_SIZE);
builder.add_char(self.x);
builder.add_short(self.warp_map);
builder.add_char(self.warp_x);
builder.add_char(self.warp_y);
builder.add_char(self.level_req);
|
builder.add_short(self.door as EOShort);
builder.get()
}
}
| |
test_general_compression.py
|
import gzip
import io
import shutil
import pytest
from hatanaka import compress, compress_on_disk, decompress, decompress_on_disk
from .conftest import clean, compress_pairs, decompress_pairs, get_data_path
@pytest.mark.parametrize(
'input_suffix, expected_suffix',
decompress_pairs
)
def test_decompress(tmp_path, crx_sample, rnx_bytes, input_suffix, expected_suffix):
# prepare
sample_path = tmp_path / ('sample' + input_suffix)
in_file = 'sample' + input_suffix
shutil.copy(get_data_path(in_file), sample_path)
# decompress
converted = decompress(sample_path)
# check
assert clean(converted) == clean(rnx_bytes)
converted = decompress(sample_path.read_bytes())
assert clean(converted) == clean(rnx_bytes)
def make_nav(txt):
return txt.replace(b'OBSERVATION', b'NAVIGATION ')
@pytest.mark.parametrize(
'input_suffix',
['.rnx', '.RNX', '.21n']
)
def test_decompress_non_obs(tmp_path, rnx_bytes, input_suffix):
# prepare
txt = make_nav(rnx_bytes)
sample_path = tmp_path / ('sample' + input_suffix + '.gz')
sample_path.write_bytes(gzip.compress(txt))
# decompress
out_path = decompress_on_disk(sample_path)
# check
assert out_path.exists()
assert out_path == tmp_path / ('sample' + input_suffix)
assert clean(out_path.read_bytes()) == clean(txt)
@pytest.mark.parametrize(
'input_suffix, compression, expected_suffix',
compress_pairs
)
def test_compress(tmp_path, crx_sample, rnx_bytes, input_suffix, compression, expected_suffix):
# prepare
in_file = 'sample' + input_suffix
sample_path = tmp_path / in_file
shutil.copy(get_data_path(in_file), sample_path)
# compress
converted = compress(sample_path, compression=compression)
# check
assert clean(decompress(converted)) == clean(rnx_bytes)
converted = compress(sample_path.read_bytes(), compression=compression)
assert clean(decompress(converted)) == clean(rnx_bytes)
@pytest.mark.parametrize(
'input_suffix',
['.rnx', '.RNX', '.21n']
)
def test_compress_non_obs(tmp_path, rnx_bytes, input_suffix):
# prepare
txt = make_nav(rnx_bytes)
sample_path = tmp_path / ('sample' + input_suffix)
sample_path.write_bytes(txt)
# compress
out_path = compress_on_disk(sample_path)
# check
assert out_path.exists()
assert out_path == tmp_path / ('sample' + input_suffix + '.gz')
assert clean(decompress(out_path)) == clean(txt)
def test_invalid_input(crx_str, rnx_bytes):
with pytest.raises(ValueError):
decompress(io.BytesIO(rnx_bytes))
with pytest.raises(ValueError):
compress(io.BytesIO(rnx_bytes))
def test_invalid_name(tmp_path, rnx_sample):
sample_path = tmp_path / 'sample'
shutil.copy(rnx_sample, sample_path)
with pytest.raises(ValueError) as excinfo:
decompress_on_disk(sample_path)
|
assert msg.endswith('is not a valid RINEX file name')
|
msg = excinfo.value.args[0]
|
main.rs
|
#![allow(clippy::multiple_crate_versions)] // Let cargo-deny handle this
#![forbid(unsafe_code)]
use clap::Parser;
use miette::Result;
use knope::{run, Cli};
fn main() -> Result<()> {
run(Cli::parse())
}
|
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![deny(clippy::cargo)]
|
|
a11y.js
|
/* global $, QUnit, swal */
QUnit.test('dialog aria attributes', (assert) => {
swal('Modal dialog')
assert.equal($('.swal2-modal').attr('role'), 'dialog')
assert.equal($('.swal2-modal').attr('aria-live'), 'assertive')
assert.equal($('.swal2-modal').attr('aria-modal'), 'true')
})
|
assert.equal($('.swal2-toast').attr('role'), 'alert')
assert.equal($('.swal2-toast').attr('aria-live'), 'polite')
assert.notOk($('.swal2-toast').attr('aria-modal'))
})
|
QUnit.test('toast aria attributes', (assert) => {
swal({title: 'Toast', toast: true})
|
test_yield_from_type.py
|
# -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
IncorrectYieldFromTargetViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import (
GeneratorKeywordsVisitor,
)
yield_from_template = """
def wrapper():
yield from {0}
"""
@pytest.mark.parametrize('code', [
'()',
'[1, 2, 3]',
'[name, other]',
'{1, 2, 3}',
'"abc"',
'b"abc"',
'a + b',
'[a for a in some()]',
'{a for a in some()}',
])
def test_yield_from_incorrect_type(
assert_errors,
parse_ast_tree,
code,
default_options,
):
|
@pytest.mark.parametrize('code', [
'name',
'name.attr',
'name[0]',
'name.call()',
'(a for a in some())',
'(1,)',
'(1, 2, 3)',
])
def test_yield_from_correct_type(
assert_errors,
parse_ast_tree,
code,
default_options,
):
"""Ensure that `yield from` works with correct types."""
tree = parse_ast_tree(yield_from_template.format(code))
visitor = GeneratorKeywordsVisitor(default_options, tree=tree)
visitor.run()
assert_errors(visitor, [])
|
"""Ensure that `yield from` does not work with incorrect types."""
tree = parse_ast_tree(yield_from_template.format(code))
visitor = GeneratorKeywordsVisitor(default_options, tree=tree)
visitor.run()
assert_errors(visitor, [IncorrectYieldFromTargetViolation])
|
mempool_spendcoinbase.py
|
#!/usr/bin/env python2
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test spending coinbase transactions.
# The coinbase transaction in block N can appear in block
# N+100... so is valid in the mempool when the best block
# height is N+99.
# This test makes sure coinbase spends that will be mature
# in the next block are accepted into the memory pool,
# but less mature coinbase spends are NOT.
#
from test_framework import BitcoinTestFramework
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from util import *
import os
import shutil
# Create one-input, one-output, no-fee transaction:
class
|
(BitcoinTestFramework):
def setup_network(self):
# Just need one node for this test
args = ["-checkmempool", "-debug=mempool"]
self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, args))
self.is_network_split = False
def create_tx(self, from_txid, to_address, amount):
inputs = [{ "txid" : from_txid, "vout" : 0}]
outputs = { to_address : amount }
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
signresult = self.nodes[0].signrawtransaction(rawtx)
assert_equal(signresult["complete"], True)
return signresult["hex"]
def run_test(self):
chain_height = self.nodes[0].getblockcount()
assert_equal(chain_height, 200)
node0_address = self.nodes[0].getnewaddress()
# Coinbase at height chain_height-100+1 ok in mempool, should
# get mined. Coinbase at height chain_height-100+2 is
# is too immature to spend.
b = [ self.nodes[0].getblockhash(n) for n in range(101, 103) ]
coinbase_txids = [ self.nodes[0].getblock(h)['tx'][0] for h in b ]
spends_raw = [ self.create_tx(txid, node0_address, 50) for txid in coinbase_txids ]
spend_101_id = self.nodes[0].sendrawtransaction(spends_raw[0])
# coinbase at height 102 should be too immature to spend
assert_raises(JSONRPCException, self.nodes[0].sendrawtransaction, spends_raw[1])
# mempool should have just spend_101:
assert_equal(self.nodes[0].getrawmempool(), [ spend_101_id ])
# mine a block, spend_101 should get confirmed
self.nodes[0].setgenerate(True, 1)
assert_equal(set(self.nodes[0].getrawmempool()), set())
# ... and now height 102 can be spent:
spend_102_id = self.nodes[0].sendrawtransaction(spends_raw[1])
assert_equal(self.nodes[0].getrawmempool(), [ spend_102_id ])
if __name__ == '__main__':
MempoolSpendCoinbaseTest().main()
|
MempoolSpendCoinbaseTest
|
insert_group_test.go
|
package group
import (
"bytes"
"testing"
"github.com/KazanExpress/go-sqlfmt/sqlfmt/lexer"
)
func TestReindentInsertGroup(t *testing.T)
|
{
tests := []struct {
name string
tokenSource []Reindenter
want string
}{
{
name: "normalcase",
tokenSource: []Reindenter{
lexer.Token{Type: lexer.INSERT, Value: "INSERT"},
lexer.Token{Type: lexer.INTO, Value: "INTO"},
lexer.Token{Type: lexer.IDENT, Value: "xxxxxx"},
lexer.Token{Type: lexer.IDENT, Value: "xxxxxx"},
},
want: "\nINSERT INTO xxxxxx xxxxxx",
},
}
for _, tt := range tests {
buf := &bytes.Buffer{}
insertGroup := &Insert{Element: tt.tokenSource}
insertGroup.Reindent(buf)
got := buf.String()
if tt.want != got {
t.Errorf("want%#v, got %#v", tt.want, got)
}
}
}
|
|
compare_comply_v1.py
|
# coding: utf-8
# (C) Copyright IBM Corp. 2019, 2020.
#
# 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.
"""
IBM Watson™ Compare and Comply analyzes governing documents to provide details about
critical aspects of the documents.
"""
import json
from ibm_cloud_sdk_core.authenticators.authenticator import Authenticator
from .common import get_sdk_headers
from datetime import date
from datetime import datetime
from enum import Enum
from ibm_cloud_sdk_core import BaseService
from ibm_cloud_sdk_core import DetailedResponse
from ibm_cloud_sdk_core import datetime_to_string, string_to_datetime
from ibm_cloud_sdk_core.get_authenticator import get_authenticator_from_environment
from typing import BinaryIO
from typing import Dict
from typing import List
##############################################################################
# Service
##############################################################################
class CompareComplyV1(BaseService):
"""The Compare Comply V1 service."""
DEFAULT_SERVICE_URL = 'https://gateway.watsonplatform.net/compare-comply/api'
DEFAULT_SERVICE_NAME = 'compare_comply'
def __init__(
self,
version: str,
authenticator: Authenticator = None,
service_name: str = DEFAULT_SERVICE_NAME,
) -> None:
"""
Construct a new client for the Compare Comply service.
:param str version: The API version date to use with the service, in
"YYYY-MM-DD" format. Whenever the API is changed in a backwards
incompatible way, a new minor version of the API is released.
The service uses the API version for the date you specify, or
the most recent version before that date. Note that you should
not programmatically specify the current date at runtime, in
case the API has been updated since your application's release.
Instead, specify a version date that is compatible with your
application, and don't change it until your application is
ready for a later version.
:param Authenticator authenticator: The authenticator specifies the authentication mechanism.
Get up to date information from https://github.com/IBM/python-sdk-core/blob/master/README.md
about initializing the authenticator of your choice.
"""
if not authenticator:
authenticator = get_authenticator_from_environment(service_name)
BaseService.__init__(self,
service_url=self.DEFAULT_SERVICE_URL,
authenticator=authenticator,
disable_ssl_verification=False)
self.version = version
self.configure_service(service_name)
#########################
# HTML conversion
#########################
def convert_to_html(self,
file: BinaryIO,
*,
file_content_type: str = None,
model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Convert document to HTML.
Converts a document to HTML.
:param TextIO file: The document to convert.
:param str file_content_type: (optional) The content type of file.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if file is None:
raise ValueError('file must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='convert_to_html')
headers.update(sdk_headers)
params = {'version': self.version, 'model': model}
form_data = []
form_data.append(('file', (None, file, file_content_type or
'application/octet-stream')))
url = '/v1/html_conversion'
request = self.prepare_request(method='POST',
url=url,
headers=headers,
params=params,
files=form_data)
response = self.send(request)
return response
#########################
# Element classification
#########################
def classify_elements(self,
file: BinaryIO,
*,
file_content_type: str = None,
model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Classify the elements of a document.
Analyzes the structural and semantic elements of a document.
:param TextIO file: The document to classify.
:param str file_content_type: (optional) The content type of file.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if file is None:
raise ValueError('file must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='classify_elements')
headers.update(sdk_headers)
params = {'version': self.version, 'model': model}
form_data = []
form_data.append(('file', (None, file, file_content_type or
'application/octet-stream')))
url = '/v1/element_classification'
request = self.prepare_request(method='POST',
url=url,
headers=headers,
params=params,
files=form_data)
response = self.send(request)
return response
#########################
# Tables
#########################
def extract_tables(self,
file: BinaryIO,
*,
file_content_type: str = None,
model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Extract a document's tables.
Analyzes the tables in a document.
:param TextIO file: The document on which to run table extraction.
:param str file_content_type: (optional) The content type of file.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if file is None:
raise ValueError('file must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='extract_tables')
headers.update(sdk_headers)
params = {'version': self.version, 'model': model}
form_data = []
form_data.append(('file', (None, file, file_content_type or
'application/octet-stream')))
url = '/v1/tables'
request = self.prepare_request(method='POST',
url=url,
headers=headers,
params=params,
files=form_data)
response = self.send(request)
return response
#########################
# Comparison
#########################
def compare_documents(self,
file_1: BinaryIO,
file_2: BinaryIO,
*,
file_1_content_type: str = None,
file_2_content_type: str = None,
file_1_label: str = None,
file_2_label: str = None,
model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Compare two documents.
Compares two input documents. Documents must be in the same format.
:param TextIO file_1: The first document to compare.
:param TextIO file_2: The second document to compare.
:param str file_1_content_type: (optional) The content type of file_1.
:param str file_2_content_type: (optional) The content type of file_2.
:param str file_1_label: (optional) A text label for the first document.
:param str file_2_label: (optional) A text label for the second document.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if file_1 is None:
raise ValueError('file_1 must be provided')
if file_2 is None:
raise ValueError('file_2 must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='compare_documents')
headers.update(sdk_headers)
params = {
'version': self.version,
'file_1_label': file_1_label,
'file_2_label': file_2_label,
'model': model
}
form_data = []
form_data.append(('file_1', (None, file_1, file_1_content_type or
'application/octet-stream')))
form_data.append(('file_2', (None, file_2, file_2_content_type or
'application/octet-stream')))
url = '/v1/comparison'
request = self.prepare_request(method='POST',
url=url,
headers=headers,
params=params,
files=form_data)
response = self.send(request)
return response
#########################
# Feedback
#########################
def add_feedback(self,
feedback_data: 'FeedbackDataInput',
*,
user_id: str = None,
comment: str = None,
**kwargs) -> 'DetailedResponse':
"""
Add feedback.
Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a
governing document.
**Important:** Feedback is not immediately incorporated into the training model,
nor is it guaranteed to be incorporated at a later date. Instead, submitted
feedback is used to suggest future updates to the training model.
:param FeedbackDataInput feedback_data: Feedback data for submission.
:param str user_id: (optional) An optional string identifying the user.
:param str comment: (optional) An optional comment on or description of the
feedback.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if feedback_data is None:
raise ValueError('feedback_data must be provided')
feedback_data = self._convert_model(feedback_data)
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='add_feedback')
headers.update(sdk_headers)
params = {'version': self.version}
data = {
'feedback_data': feedback_data,
'user_id': user_id,
'comment': comment
}
url = '/v1/feedback'
request = self.prepare_request(method='POST',
url=url,
headers=headers,
params=params,
data=data)
response = self.send(request)
return response
def list_feedback(self,
*,
feedback_type: str = None,
before: date = None,
after: date = None,
document_title: str = None,
model_id: str = None,
model_version: str = None,
category_removed: str = None,
category_added: str = None,
category_not_changed: str = None,
type_removed: str = None,
type_added: str = None,
type_not_changed: str = None,
page_limit: int = None,
cursor: str = None,
sort: str = None,
include_total: bool = None,
**kwargs) -> 'DetailedResponse':
"""
List the feedback in a document.
Lists the feedback in a document.
:param str feedback_type: (optional) An optional string that filters the
output to include only feedback with the specified feedback type. The only
permitted value is `element_classification`.
:param date before: (optional) An optional string in the format
`YYYY-MM-DD` that filters the output to include only feedback that was
added before the specified date.
:param date after: (optional) An optional string in the format `YYYY-MM-DD`
that filters the output to include only feedback that was added after the
specified date.
:param str document_title: (optional) An optional string that filters the
output to include only feedback from the document with the specified
`document_title`.
:param str model_id: (optional) An optional string that filters the output
to include only feedback with the specified `model_id`. The only permitted
value is `contracts`.
:param str model_version: (optional) An optional string that filters the
output to include only feedback with the specified `model_version`.
:param str category_removed: (optional) An optional string in the form of a
comma-separated list of categories. If it is specified, the service filters
the output to include only feedback that has at least one category from the
list removed.
:param str category_added: (optional) An optional string in the form of a
comma-separated list of categories. If this is specified, the service
filters the output to include only feedback that has at least one category
from the list added.
:param str category_not_changed: (optional) An optional string in the form
of a comma-separated list of categories. If this is specified, the service
filters the output to include only feedback that has at least one category
from the list unchanged.
:param str type_removed: (optional) An optional string of comma-separated
`nature`:`party` pairs. If this is specified, the service filters the
output to include only feedback that has at least one `nature`:`party` pair
from the list removed.
:param str type_added: (optional) An optional string of comma-separated
`nature`:`party` pairs. If this is specified, the service filters the
output to include only feedback that has at least one `nature`:`party` pair
from the list removed.
:param str type_not_changed: (optional) An optional string of
comma-separated `nature`:`party` pairs. If this is specified, the service
filters the output to include only feedback that has at least one
`nature`:`party` pair from the list unchanged.
:param int page_limit: (optional) An optional integer specifying the number
of documents that you want the service to return.
:param str cursor: (optional) An optional string that returns the set of
documents after the previous set. Use this parameter with the `page_limit`
parameter.
:param str sort: (optional) An optional comma-separated list of fields in
the document to sort on. You can optionally specify the sort direction by
prefixing the value of the field with `-` for descending order or `+` for
ascending order (the default). Currently permitted sorting fields are
`created`, `user_id`, and `document_title`.
:param bool include_total: (optional) An optional boolean value. If
specified as `true`, the `pagination` object in the output includes a value
called `total` that gives the total count of feedback created.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='list_feedback')
headers.update(sdk_headers)
params = {
'version': self.version,
'feedback_type': feedback_type,
'before': before,
'after': after,
'document_title': document_title,
'model_id': model_id,
'model_version': model_version,
'category_removed': category_removed,
'category_added': category_added,
'category_not_changed': category_not_changed,
'type_removed': type_removed,
'type_added': type_added,
'type_not_changed': type_not_changed,
'page_limit': page_limit,
'cursor': cursor,
'sort': sort,
'include_total': include_total
}
url = '/v1/feedback'
request = self.prepare_request(method='GET',
url=url,
headers=headers,
params=params)
response = self.send(request)
return response
def get_feedback(self, feedback_id: str, *, model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Get a specified feedback entry.
Gets a feedback entry with a specified `feedback_id`.
:param str feedback_id: A string that specifies the feedback entry to be
included in the output.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if feedback_id is None:
raise ValueError('feedback_id must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='get_feedback')
headers.update(sdk_headers)
params = {'version': self.version, 'model': model}
url = '/v1/feedback/{0}'.format(*self._encode_path_vars(feedback_id))
request = self.prepare_request(method='GET',
url=url,
headers=headers,
params=params)
response = self.send(request)
return response
def delete_feedback(self, feedback_id: str, *, model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Delete a specified feedback entry.
Deletes a feedback entry with a specified `feedback_id`.
:param str feedback_id: A string that specifies the feedback entry to be
deleted from the document.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if feedback_id is None:
raise ValueError('feedback_id must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='delete_feedback')
headers.update(sdk_headers)
params = {'version': self.version, 'model': model}
url = '/v1/feedback/{0}'.format(*self._encode_path_vars(feedback_id))
request = self.prepare_request(method='DELETE',
url=url,
headers=headers,
params=params)
response = self.send(request)
return response
#########################
# Batches
#########################
def create_batch(self,
function: str,
input_credentials_file: BinaryIO,
input_bucket_location: str,
input_bucket_name: str,
output_credentials_file: BinaryIO,
output_bucket_location: str,
output_bucket_name: str,
*,
model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Submit a batch-processing request.
Run Compare and Comply methods over a collection of input documents.
**Important:** Batch processing requires the use of the [IBM Cloud Object Storage
service](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=cloud-object-storage-about#about-ibm-cloud-object-storage).
The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using
batch
processing](https://cloud.ibm.com/docs/services/compare-comply?topic=compare-comply-batching#before-you-batch).
:param str function: The Compare and Comply method to run across the
submitted input documents.
:param TextIO input_credentials_file: A JSON file containing the input
Cloud Object Storage credentials. At a minimum, the credentials must enable
`READ` permissions on the bucket defined by the `input_bucket_name`
parameter.
:param str input_bucket_location: The geographical location of the Cloud
Object Storage input bucket as listed on the **Endpoint** tab of your Cloud
Object Storage instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
:param str input_bucket_name: The name of the Cloud Object Storage input
bucket.
:param TextIO output_credentials_file: A JSON file that lists the Cloud
Object Storage output credentials. At a minimum, the credentials must
enable `READ` and `WRITE` permissions on the bucket defined by the
`output_bucket_name` parameter.
:param str output_bucket_location: The geographical location of the Cloud
Object Storage output bucket as listed on the **Endpoint** tab of your
Cloud Object Storage instance; for example, `us-geo`, `eu-geo`, or
`ap-geo`.
:param str output_bucket_name: The name of the Cloud Object Storage output
bucket.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if function is None:
raise ValueError('function must be provided')
if input_credentials_file is None:
raise ValueError('input_credentials_file must be provided')
if input_bucket_location is None:
raise ValueError('input_bucket_location must be provided')
if input_bucket_name is None:
raise ValueError('input_bucket_name must be provided')
if output_credentials_file is None:
raise ValueError('output_credentials_file must be provided')
if output_bucket_location is None:
raise ValueError('output_bucket_location must be provided')
if output_bucket_name is None:
raise ValueError('output_bucket_name must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='create_batch')
headers.update(sdk_headers)
params = {'version': self.version, 'function': function, 'model': model}
form_data = []
form_data.append(('input_credentials_file',
(None, input_credentials_file, 'application/json')))
input_bucket_location = str(input_bucket_location)
form_data.append(('input_bucket_location', (None, input_bucket_location,
'text/plain')))
input_bucket_name = str(input_bucket_name)
form_data.append(
('input_bucket_name', (None, input_bucket_name, 'text/plain')))
form_data.append(('output_credentials_file',
(None, output_credentials_file, 'application/json')))
output_bucket_location = str(output_bucket_location)
form_data.append(('output_bucket_location',
(None, output_bucket_location, 'text/plain')))
output_bucket_name = str(output_bucket_name)
form_data.append(
('output_bucket_name', (None, output_bucket_name, 'text/plain')))
url = '/v1/batches'
request = self.prepare_request(method='POST',
url=url,
headers=headers,
params=params,
files=form_data)
response = self.send(request)
return response
def list_batches(self, **kwargs) -> 'DetailedResponse':
"""
List submitted batch-processing jobs.
Lists batch-processing jobs submitted by users.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='list_batches')
headers.update(sdk_headers)
params = {'version': self.version}
url = '/v1/batches'
request = self.prepare_request(method='GET',
url=url,
headers=headers,
params=params)
response = self.send(request)
return response
def get_batch(self, batch_id: str, **kwargs) -> 'DetailedResponse':
"""
Get information about a specific batch-processing job.
Gets information about a batch-processing job with a specified ID.
:param str batch_id: The ID of the batch-processing job whose information
you want to retrieve.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if batch_id is None:
raise ValueError('batch_id must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='get_batch')
headers.update(sdk_headers)
params = {'version': self.version}
url = '/v1/batches/{0}'.format(*self._encode_path_vars(batch_id))
request = self.prepare_request(method='GET',
url=url,
headers=headers,
params=params)
response = self.send(request)
return response
def update_batch(self,
batch_id: str,
action: str,
*,
model: str = None,
**kwargs) -> 'DetailedResponse':
"""
Update a pending or active batch-processing job.
Updates a pending or active batch-processing job. You can rescan the input bucket
to check for new documents or cancel a job.
:param str batch_id: The ID of the batch-processing job you want to update.
:param str action: The action you want to perform on the specified
batch-processing job.
:param str model: (optional) The analysis model to be used by the service.
For the **Element classification** and **Compare two documents** methods,
the default is `contracts`. For the **Extract tables** method, the default
is `tables`. These defaults apply to the standalone methods as well as to
the methods' use in batch-processing requests.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
"""
if batch_id is None:
raise ValueError('batch_id must be provided')
if action is None:
raise ValueError('action must be provided')
headers = {}
if 'headers' in kwargs:
headers.update(kwargs.get('headers'))
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
operation_id='update_batch')
headers.update(sdk_headers)
params = {'version': self.version, 'action': action, 'model': model}
url = '/v1/batches/{0}'.format(*self._encode_path_vars(batch_id))
request = self.prepare_request(method='PUT',
url=url,
headers=headers,
params=params)
response = self.send(request)
return response
class ConvertToHtmlEnums(object):
class FileContentType(Enum):
"""
The content type of file.
"""
APPLICATION_PDF = 'application/pdf'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
TEXT_PLAIN = 'text/plain'
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class ClassifyElementsEnums(object):
class FileContentType(Enum):
"""
The content type of file.
"""
APPLICATION_PDF = 'application/pdf'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class ExtractTablesEnums(object):
class FileContentType(Enum):
"""
The content type of file.
"""
APPLICATION_PDF = 'application/pdf'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
TEXT_PLAIN = 'text/plain'
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class CompareDocumentsEnums(object):
class File1ContentType(Enum):
"""
The content type of file_1.
"""
APPLICATION_PDF = 'application/pdf'
APPLICATION_JSON = 'application/json'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
class File2ContentType(Enum):
"""
The content type of file_2.
"""
APPLICATION_PDF = 'application/pdf'
APPLICATION_JSON = 'application/json'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class GetFeedbackEnums(object):
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class DeleteFeedbackEnums(object):
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class CreateBatchEnums(object):
class Function(Enum):
"""
The Compare and Comply method to run across the submitted input documents.
"""
HTML_CONVERSION = 'html_conversion'
ELEMENT_CLASSIFICATION = 'element_classification'
TABLES = 'tables'
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
class UpdateBatchEnums(object):
class Action(Enum):
"""
The action you want to perform on the specified batch-processing job.
"""
RESCAN = 'rescan'
CANCEL = 'cancel'
class Model(Enum):
"""
The analysis model to be used by the service. For the **Element classification**
and **Compare two documents** methods, the default is `contracts`. For the
**Extract tables** method, the default is `tables`. These defaults apply to the
standalone methods as well as to the methods' use in batch-processing requests.
"""
CONTRACTS = 'contracts'
TABLES = 'tables'
##############################################################################
# Models
##############################################################################
class Address():
"""
A party's address.
:attr str text: (optional) A string listing the address.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self, *, text: str = None,
location: 'Location' = None) -> None:
"""
Initialize a Address object.
:param str text: (optional) A string listing the address.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.text = text
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'Address':
"""Initialize a Address object from a json dictionary."""
args = {}
valid_keys = ['text', 'location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Address: ' +
', '.join(bad_keys))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Address object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Address object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Address') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Address') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class AlignedElement():
"""
AlignedElement.
:attr List[ElementPair] element_pair: (optional) Identifies two elements that
semantically align between the compared documents.
:attr bool identical_text: (optional) Specifies whether the aligned element is
identical. Elements are considered identical despite minor differences such as
leading punctuation, end-of-sentence punctuation, whitespace, the presence or
absence of definite or indefinite articles, and others.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr bool significant_elements: (optional) Indicates that the elements aligned
are contractual clauses of significance.
"""
def __init__(self,
*,
element_pair: List['ElementPair'] = None,
identical_text: bool = None,
provenance_ids: List[str] = None,
significant_elements: bool = None) -> None:
"""
Initialize a AlignedElement object.
:param List[ElementPair] element_pair: (optional) Identifies two elements
that semantically align between the compared documents.
:param bool identical_text: (optional) Specifies whether the aligned
element is identical. Elements are considered identical despite minor
differences such as leading punctuation, end-of-sentence punctuation,
whitespace, the presence or absence of definite or indefinite articles, and
others.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param bool significant_elements: (optional) Indicates that the elements
aligned are contractual clauses of significance.
"""
self.element_pair = element_pair
self.identical_text = identical_text
self.provenance_ids = provenance_ids
self.significant_elements = significant_elements
@classmethod
def from_dict(cls, _dict: Dict) -> 'AlignedElement':
"""Initialize a AlignedElement object from a json dictionary."""
args = {}
valid_keys = [
'element_pair', 'identical_text', 'provenance_ids',
'significant_elements'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class AlignedElement: '
+ ', '.join(bad_keys))
if 'element_pair' in _dict:
args['element_pair'] = [
ElementPair._from_dict(x) for x in (_dict.get('element_pair'))
]
if 'identical_text' in _dict:
args['identical_text'] = _dict.get('identical_text')
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'significant_elements' in _dict:
args['significant_elements'] = _dict.get('significant_elements')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a AlignedElement object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'element_pair') and self.element_pair is not None:
_dict['element_pair'] = [x._to_dict() for x in self.element_pair]
if hasattr(self, 'identical_text') and self.identical_text is not None:
_dict['identical_text'] = self.identical_text
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'significant_elements'
) and self.significant_elements is not None:
_dict['significant_elements'] = self.significant_elements
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this AlignedElement object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'AlignedElement') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'AlignedElement') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Attribute():
"""
List of document attributes.
:attr str type: (optional) The type of attribute.
:attr str text: (optional) The text associated with the attribute.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
type: str = None,
text: str = None,
location: 'Location' = None) -> None:
"""
Initialize a Attribute object.
:param str type: (optional) The type of attribute.
:param str text: (optional) The text associated with the attribute.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.type = type
self.text = text
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'Attribute':
"""Initialize a Attribute object from a json dictionary."""
args = {}
valid_keys = ['type', 'text', 'location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Attribute: '
+ ', '.join(bad_keys))
if 'type' in _dict:
args['type'] = _dict.get('type')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Attribute object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Attribute object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Attribute') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Attribute') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class TypeEnum(Enum):
"""
The type of attribute.
"""
CURRENCY = "Currency"
DATETIME = "DateTime"
DEFINEDTERM = "DefinedTerm"
DURATION = "Duration"
LOCATION = "Location"
NUMBER = "Number"
ORGANIZATION = "Organization"
PERCENTAGE = "Percentage"
PERSON = "Person"
class BatchStatus():
"""
The batch-request status.
:attr str function: (optional) The method to be run against the documents.
Possible values are `html_conversion`, `element_classification`, and `tables`.
:attr str input_bucket_location: (optional) The geographical location of the
Cloud Object Storage input bucket as listed on the **Endpoint** tab of your COS
instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
:attr str input_bucket_name: (optional) The name of the Cloud Object Storage
input bucket.
:attr str output_bucket_location: (optional) The geographical location of the
Cloud Object Storage output bucket as listed on the **Endpoint** tab of your COS
instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
:attr str output_bucket_name: (optional) The name of the Cloud Object Storage
output bucket.
:attr str batch_id: (optional) The unique identifier for the batch request.
:attr DocCounts document_counts: (optional) Document counts.
:attr str status: (optional) The status of the batch request.
:attr datetime created: (optional) The creation time of the batch request.
:attr datetime updated: (optional) The time of the most recent update to the
batch request.
"""
def __init__(self,
*,
function: str = None,
input_bucket_location: str = None,
input_bucket_name: str = None,
output_bucket_location: str = None,
output_bucket_name: str = None,
batch_id: str = None,
document_counts: 'DocCounts' = None,
status: str = None,
created: datetime = None,
updated: datetime = None) -> None:
"""
Initialize a BatchStatus object.
:param str function: (optional) The method to be run against the documents.
Possible values are `html_conversion`, `element_classification`, and
`tables`.
:param str input_bucket_location: (optional) The geographical location of
the Cloud Object Storage input bucket as listed on the **Endpoint** tab of
your COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
:param str input_bucket_name: (optional) The name of the Cloud Object
Storage input bucket.
:param str output_bucket_location: (optional) The geographical location of
the Cloud Object Storage output bucket as listed on the **Endpoint** tab of
your COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
:param str output_bucket_name: (optional) The name of the Cloud Object
Storage output bucket.
:param str batch_id: (optional) The unique identifier for the batch
request.
:param DocCounts document_counts: (optional) Document counts.
:param str status: (optional) The status of the batch request.
:param datetime created: (optional) The creation time of the batch request.
:param datetime updated: (optional) The time of the most recent update to
the batch request.
"""
self.function = function
self.input_bucket_location = input_bucket_location
self.input_bucket_name = input_bucket_name
self.output_bucket_location = output_bucket_location
self.output_bucket_name = output_bucket_name
self.batch_id = batch_id
self.document_counts = document_counts
self.status = status
self.created = created
self.updated = updated
@classmethod
def from_dict(cls, _dict: Dict) -> 'BatchStatus':
"""Initialize a BatchStatus object from a json dictionary."""
args = {}
valid_keys = [
'function', 'input_bucket_location', 'input_bucket_name',
'output_bucket_location', 'output_bucket_name', 'batch_id',
'document_counts', 'status', 'created', 'updated'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class BatchStatus: '
+ ', '.join(bad_keys))
if 'function' in _dict:
args['function'] = _dict.get('function')
if 'input_bucket_location' in _dict:
args['input_bucket_location'] = _dict.get('input_bucket_location')
if 'input_bucket_name' in _dict:
args['input_bucket_name'] = _dict.get('input_bucket_name')
if 'output_bucket_location' in _dict:
args['output_bucket_location'] = _dict.get('output_bucket_location')
if 'output_bucket_name' in _dict:
args['output_bucket_name'] = _dict.get('output_bucket_name')
if 'batch_id' in _dict:
args['batch_id'] = _dict.get('batch_id')
if 'document_counts' in _dict:
args['document_counts'] = DocCounts._from_dict(
_dict.get('document_counts'))
if 'status' in _dict:
args['status'] = _dict.get('status')
if 'created' in _dict:
args['created'] = string_to_datetime(_dict.get('created'))
if 'updated' in _dict:
args['updated'] = string_to_datetime(_dict.get('updated'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a BatchStatus object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'function') and self.function is not None:
_dict['function'] = self.function
if hasattr(self, 'input_bucket_location'
) and self.input_bucket_location is not None:
_dict['input_bucket_location'] = self.input_bucket_location
if hasattr(self,
'input_bucket_name') and self.input_bucket_name is not None:
_dict['input_bucket_name'] = self.input_bucket_name
if hasattr(self, 'output_bucket_location'
) and self.output_bucket_location is not None:
_dict['output_bucket_location'] = self.output_bucket_location
if hasattr(
self,
'output_bucket_name') and self.output_bucket_name is not None:
_dict['output_bucket_name'] = self.output_bucket_name
if hasattr(self, 'batch_id') and self.batch_id is not None:
_dict['batch_id'] = self.batch_id
if hasattr(self,
'document_counts') and self.document_counts is not None:
_dict['document_counts'] = self.document_counts._to_dict()
if hasattr(self, 'status') and self.status is not None:
_dict['status'] = self.status
if hasattr(self, 'created') and self.created is not None:
_dict['created'] = datetime_to_string(self.created)
if hasattr(self, 'updated') and self.updated is not None:
_dict['updated'] = datetime_to_string(self.updated)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this BatchStatus object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'BatchStatus') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'BatchStatus') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class FunctionEnum(Enum):
"""
The method to be run against the documents. Possible values are `html_conversion`,
`element_classification`, and `tables`.
"""
ELEMENT_CLASSIFICATION = "element_classification"
HTML_CONVERSION = "html_conversion"
TABLES = "tables"
class Batches():
"""
The results of a successful **List Batches** request.
:attr List[BatchStatus] batches: (optional) A list of the status of all batch
requests.
"""
def __init__(self, *, batches: List['BatchStatus'] = None) -> None:
"""
Initialize a Batches object.
:param List[BatchStatus] batches: (optional) A list of the status of all
batch requests.
"""
self.batches = batches
@classmethod
def from_dict(cls, _dict: Dict) -> 'Batches':
"""Initialize a Batches object from a json dictionary."""
args = {}
valid_keys = ['batches']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Batches: ' +
', '.join(bad_keys))
if 'batches' in _dict:
args['batches'] = [
BatchStatus._from_dict(x) for x in (_dict.get('batches'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Batches object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'batches') and self.batches is not None:
_dict['batches'] = [x._to_dict() for x in self.batches]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Batches object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Batches') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Batches') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class BodyCells():
"""
Cells that are not table header, column header, or row header cells.
:attr str cell_id: (optional) The unique ID of the cell in the current table.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The textual contents of this cell from the input
document without associated markup content.
:attr int row_index_begin: (optional) The `begin` index of this cell's `row`
location in the current table.
:attr int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:attr int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:attr int column_index_end: (optional) The `end` index of this cell's `column`
location in the current table.
:attr List[str] row_header_ids: (optional) An array that contains the `id` value
of a row header that is applicable to this body cell.
:attr List[str] row_header_texts: (optional) An array that contains the `text`
value of a row header that is applicable to this body cell.
:attr List[str] row_header_texts_normalized: (optional) If you provide
customization input, the normalized version of the row header texts according to
the customization; otherwise, the same value as `row_header_texts`.
:attr List[str] column_header_ids: (optional) An array that contains the `id`
value of a column header that is applicable to the current cell.
:attr List[str] column_header_texts: (optional) An array that contains the
`text` value of a column header that is applicable to the current cell.
:attr List[str] column_header_texts_normalized: (optional) If you provide
customization input, the normalized version of the column header texts according
to the customization; otherwise, the same value as `column_header_texts`.
:attr List[Attribute] attributes: (optional)
"""
def __init__(self,
*,
cell_id: str = None,
location: 'Location' = None,
text: str = None,
row_index_begin: int = None,
row_index_end: int = None,
column_index_begin: int = None,
column_index_end: int = None,
row_header_ids: List[str] = None,
row_header_texts: List[str] = None,
row_header_texts_normalized: List[str] = None,
column_header_ids: List[str] = None,
column_header_texts: List[str] = None,
column_header_texts_normalized: List[str] = None,
attributes: List['Attribute'] = None) -> None:
"""
Initialize a BodyCells object.
:param str cell_id: (optional) The unique ID of the cell in the current
table.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The textual contents of this cell from the
input document without associated markup content.
:param int row_index_begin: (optional) The `begin` index of this cell's
`row` location in the current table.
:param int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:param int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:param int column_index_end: (optional) The `end` index of this cell's
`column` location in the current table.
:param List[str] row_header_ids: (optional) An array that contains the `id`
value of a row header that is applicable to this body cell.
:param List[str] row_header_texts: (optional) An array that contains the
`text` value of a row header that is applicable to this body cell.
:param List[str] row_header_texts_normalized: (optional) If you provide
customization input, the normalized version of the row header texts
according to the customization; otherwise, the same value as
`row_header_texts`.
:param List[str] column_header_ids: (optional) An array that contains the
`id` value of a column header that is applicable to the current cell.
:param List[str] column_header_texts: (optional) An array that contains the
`text` value of a column header that is applicable to the current cell.
:param List[str] column_header_texts_normalized: (optional) If you provide
customization input, the normalized version of the column header texts
according to the customization; otherwise, the same value as
`column_header_texts`.
:param List[Attribute] attributes: (optional)
"""
self.cell_id = cell_id
self.location = location
self.text = text
self.row_index_begin = row_index_begin
self.row_index_end = row_index_end
self.column_index_begin = column_index_begin
self.column_index_end = column_index_end
self.row_header_ids = row_header_ids
self.row_header_texts = row_header_texts
self.row_header_texts_normalized = row_header_texts_normalized
self.column_header_ids = column_header_ids
self.column_header_texts = column_header_texts
self.column_header_texts_normalized = column_header_texts_normalized
self.attributes = attributes
@classmethod
def from_dict(cls, _dict: Dict) -> 'BodyCells':
"""Initialize a BodyCells object from a json dictionary."""
args = {}
valid_keys = [
'cell_id', 'location', 'text', 'row_index_begin', 'row_index_end',
'column_index_begin', 'column_index_end', 'row_header_ids',
'row_header_texts', 'row_header_texts_normalized',
'column_header_ids', 'column_header_texts',
'column_header_texts_normalized', 'attributes'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class BodyCells: '
+ ', '.join(bad_keys))
if 'cell_id' in _dict:
args['cell_id'] = _dict.get('cell_id')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'row_index_begin' in _dict:
args['row_index_begin'] = _dict.get('row_index_begin')
if 'row_index_end' in _dict:
args['row_index_end'] = _dict.get('row_index_end')
if 'column_index_begin' in _dict:
args['column_index_begin'] = _dict.get('column_index_begin')
if 'column_index_end' in _dict:
args['column_index_end'] = _dict.get('column_index_end')
if 'row_header_ids' in _dict:
args['row_header_ids'] = _dict.get('row_header_ids')
if 'row_header_texts' in _dict:
args['row_header_texts'] = _dict.get('row_header_texts')
if 'row_header_texts_normalized' in _dict:
args['row_header_texts_normalized'] = _dict.get(
'row_header_texts_normalized')
if 'column_header_ids' in _dict:
args['column_header_ids'] = _dict.get('column_header_ids')
if 'column_header_texts' in _dict:
args['column_header_texts'] = _dict.get('column_header_texts')
if 'column_header_texts_normalized' in _dict:
args['column_header_texts_normalized'] = _dict.get(
'column_header_texts_normalized')
if 'attributes' in _dict:
args['attributes'] = [
Attribute._from_dict(x) for x in (_dict.get('attributes'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a BodyCells object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'cell_id') and self.cell_id is not None:
_dict['cell_id'] = self.cell_id
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'row_index_begin') and self.row_index_begin is not None:
_dict['row_index_begin'] = self.row_index_begin
if hasattr(self, 'row_index_end') and self.row_index_end is not None:
_dict['row_index_end'] = self.row_index_end
if hasattr(
self,
'column_index_begin') and self.column_index_begin is not None:
_dict['column_index_begin'] = self.column_index_begin
if hasattr(self,
'column_index_end') and self.column_index_end is not None:
_dict['column_index_end'] = self.column_index_end
if hasattr(self, 'row_header_ids') and self.row_header_ids is not None:
_dict['row_header_ids'] = self.row_header_ids
if hasattr(self,
'row_header_texts') and self.row_header_texts is not None:
_dict['row_header_texts'] = self.row_header_texts
if hasattr(self, 'row_header_texts_normalized'
) and self.row_header_texts_normalized is not None:
_dict[
'row_header_texts_normalized'] = self.row_header_texts_normalized
if hasattr(self,
'column_header_ids') and self.column_header_ids is not None:
_dict['column_header_ids'] = self.column_header_ids
if hasattr(
self,
'column_header_texts') and self.column_header_texts is not None:
_dict['column_header_texts'] = self.column_header_texts
if hasattr(self, 'column_header_texts_normalized'
) and self.column_header_texts_normalized is not None:
_dict[
'column_header_texts_normalized'] = self.column_header_texts_normalized
if hasattr(self, 'attributes') and self.attributes is not None:
_dict['attributes'] = [x._to_dict() for x in self.attributes]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this BodyCells object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'BodyCells') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'BodyCells') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Category():
"""
Information defining an element's subject matter.
:attr str label: (optional) The category of the associated element.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
"""
def __init__(self, *, label: str = None,
provenance_ids: List[str] = None) -> None:
"""
Initialize a Category object.
:param str label: (optional) The category of the associated element.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
"""
self.label = label
self.provenance_ids = provenance_ids
@classmethod
def from_dict(cls, _dict: Dict) -> 'Category':
"""Initialize a Category object from a json dictionary."""
args = {}
valid_keys = ['label', 'provenance_ids']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Category: '
+ ', '.join(bad_keys))
if 'label' in _dict:
args['label'] = _dict.get('label')
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Category object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'label') and self.label is not None:
_dict['label'] = self.label
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Category object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Category') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Category') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class LabelEnum(Enum):
"""
The category of the associated element.
"""
AMENDMENTS = "Amendments"
ASSET_USE = "Asset Use"
ASSIGNMENTS = "Assignments"
AUDITS = "Audits"
BUSINESS_CONTINUITY = "Business Continuity"
COMMUNICATION = "Communication"
CONFIDENTIALITY = "Confidentiality"
DELIVERABLES = "Deliverables"
DELIVERY = "Delivery"
DISPUTE_RESOLUTION = "Dispute Resolution"
FORCE_MAJEURE = "Force Majeure"
INDEMNIFICATION = "Indemnification"
INSURANCE = "Insurance"
INTELLECTUAL_PROPERTY = "Intellectual Property"
LIABILITY = "Liability"
ORDER_OF_PRECEDENCE = "Order of Precedence"
PAYMENT_TERMS_BILLING = "Payment Terms & Billing"
PRICING_TAXES = "Pricing & Taxes"
PRIVACY = "Privacy"
RESPONSIBILITIES = "Responsibilities"
SAFETY_AND_SECURITY = "Safety and Security"
SCOPE_OF_WORK = "Scope of Work"
SUBCONTRACTS = "Subcontracts"
TERM_TERMINATION = "Term & Termination"
WARRANTIES = "Warranties"
class CategoryComparison():
"""
Information defining an element's subject matter.
:attr str label: (optional) The category of the associated element.
"""
def __init__(self, *, label: str = None) -> None:
"""
Initialize a CategoryComparison object.
:param str label: (optional) The category of the associated element.
"""
self.label = label
@classmethod
def from_dict(cls, _dict: Dict) -> 'CategoryComparison':
"""Initialize a CategoryComparison object from a json dictionary."""
args = {}
valid_keys = ['label']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class CategoryComparison: '
+ ', '.join(bad_keys))
if 'label' in _dict:
args['label'] = _dict.get('label')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a CategoryComparison object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'label') and self.label is not None:
_dict['label'] = self.label
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this CategoryComparison object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'CategoryComparison') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'CategoryComparison') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class LabelEnum(Enum):
"""
The category of the associated element.
"""
AMENDMENTS = "Amendments"
ASSET_USE = "Asset Use"
ASSIGNMENTS = "Assignments"
AUDITS = "Audits"
BUSINESS_CONTINUITY = "Business Continuity"
COMMUNICATION = "Communication"
CONFIDENTIALITY = "Confidentiality"
DELIVERABLES = "Deliverables"
DELIVERY = "Delivery"
DISPUTE_RESOLUTION = "Dispute Resolution"
FORCE_MAJEURE = "Force Majeure"
INDEMNIFICATION = "Indemnification"
INSURANCE = "Insurance"
INTELLECTUAL_PROPERTY = "Intellectual Property"
LIABILITY = "Liability"
ORDER_OF_PRECEDENCE = "Order of Precedence"
PAYMENT_TERMS_BILLING = "Payment Terms & Billing"
PRICING_TAXES = "Pricing & Taxes"
PRIVACY = "Privacy"
RESPONSIBILITIES = "Responsibilities"
SAFETY_AND_SECURITY = "Safety and Security"
SCOPE_OF_WORK = "Scope of Work"
SUBCONTRACTS = "Subcontracts"
TERM_TERMINATION = "Term & Termination"
WARRANTIES = "Warranties"
class ClassifyReturn():
"""
The analysis of objects returned by the **Element classification** method.
:attr Document document: (optional) Basic information about the input document.
:attr str model_id: (optional) The analysis model used to classify the input
document. For the **Element classification** method, the only valid value is
`contracts`.
:attr str model_version: (optional) The version of the analysis model identified
by the value of the `model_id` key.
:attr List[Element] elements: (optional) Document elements identified by the
service.
:attr List[EffectiveDates] effective_dates: (optional) The date or dates on
which the document becomes effective.
:attr List[ContractAmts] contract_amounts: (optional) The monetary amounts that
identify the total amount of the contract that needs to be paid from one party
to another.
:attr List[TerminationDates] termination_dates: (optional) The dates on which
the document is to be terminated.
:attr List[ContractTypes] contract_types: (optional) The contract type as
declared in the document.
:attr List[ContractTerms] contract_terms: (optional) The durations of the
contract.
:attr List[PaymentTerms] payment_terms: (optional) The document's payment
durations.
:attr List[ContractCurrencies] contract_currencies: (optional) The contract
currencies as declared in the document.
:attr List[Tables] tables: (optional) Definition of tables identified in the
input document.
:attr DocStructure document_structure: (optional) The structure of the input
document.
:attr List[Parties] parties: (optional) Definitions of the parties identified in
the input document.
"""
def __init__(self,
*,
document: 'Document' = None,
model_id: str = None,
model_version: str = None,
elements: List['Element'] = None,
effective_dates: List['EffectiveDates'] = None,
contract_amounts: List['ContractAmts'] = None,
termination_dates: List['TerminationDates'] = None,
contract_types: List['ContractTypes'] = None,
contract_terms: List['ContractTerms'] = None,
payment_terms: List['PaymentTerms'] = None,
contract_currencies: List['ContractCurrencies'] = None,
tables: List['Tables'] = None,
document_structure: 'DocStructure' = None,
parties: List['Parties'] = None) -> None:
"""
Initialize a ClassifyReturn object.
:param Document document: (optional) Basic information about the input
document.
:param str model_id: (optional) The analysis model used to classify the
input document. For the **Element classification** method, the only valid
value is `contracts`.
:param str model_version: (optional) The version of the analysis model
identified by the value of the `model_id` key.
:param List[Element] elements: (optional) Document elements identified by
the service.
:param List[EffectiveDates] effective_dates: (optional) The date or dates
on which the document becomes effective.
:param List[ContractAmts] contract_amounts: (optional) The monetary amounts
that identify the total amount of the contract that needs to be paid from
one party to another.
:param List[TerminationDates] termination_dates: (optional) The dates on
which the document is to be terminated.
:param List[ContractTypes] contract_types: (optional) The contract type as
declared in the document.
:param List[ContractTerms] contract_terms: (optional) The durations of the
contract.
:param List[PaymentTerms] payment_terms: (optional) The document's payment
durations.
:param List[ContractCurrencies] contract_currencies: (optional) The
contract currencies as declared in the document.
:param List[Tables] tables: (optional) Definition of tables identified in
the input document.
:param DocStructure document_structure: (optional) The structure of the
input document.
:param List[Parties] parties: (optional) Definitions of the parties
identified in the input document.
"""
self.document = document
self.model_id = model_id
self.model_version = model_version
self.elements = elements
self.effective_dates = effective_dates
self.contract_amounts = contract_amounts
self.termination_dates = termination_dates
self.contract_types = contract_types
self.contract_terms = contract_terms
self.payment_terms = payment_terms
self.contract_currencies = contract_currencies
self.tables = tables
self.document_structure = document_structure
self.parties = parties
@classmethod
def from_dict(cls, _dict: Dict) -> 'ClassifyReturn':
"""Initialize a ClassifyReturn object from a json dictionary."""
args = {}
valid_keys = [
'document', 'model_id', 'model_version', 'elements',
'effective_dates', 'contract_amounts', 'termination_dates',
'contract_types', 'contract_terms', 'payment_terms',
'contract_currencies', 'tables', 'document_structure', 'parties'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ClassifyReturn: '
+ ', '.join(bad_keys))
if 'document' in _dict:
args['document'] = Document._from_dict(_dict.get('document'))
if 'model_id' in _dict:
args['model_id'] = _dict.get('model_id')
if 'model_version' in _dict:
args['model_version'] = _dict.get('model_version')
if 'elements' in _dict:
args['elements'] = [
Element._from_dict(x) for x in (_dict.get('elements'))
]
if 'effective_dates' in _dict:
args['effective_dates'] = [
EffectiveDates._from_dict(x)
for x in (_dict.get('effective_dates'))
]
if 'contract_amounts' in _dict:
args['contract_amounts'] = [
ContractAmts._from_dict(x)
for x in (_dict.get('contract_amounts'))
]
if 'termination_dates' in _dict:
args['termination_dates'] = [
TerminationDates._from_dict(x)
for x in (_dict.get('termination_dates'))
]
if 'contract_types' in _dict:
args['contract_types'] = [
ContractTypes._from_dict(x)
for x in (_dict.get('contract_types'))
]
if 'contract_terms' in _dict:
args['contract_terms'] = [
ContractTerms._from_dict(x)
for x in (_dict.get('contract_terms'))
]
if 'payment_terms' in _dict:
args['payment_terms'] = [
PaymentTerms._from_dict(x) for x in (_dict.get('payment_terms'))
]
if 'contract_currencies' in _dict:
args['contract_currencies'] = [
ContractCurrencies._from_dict(x)
for x in (_dict.get('contract_currencies'))
]
if 'tables' in _dict:
args['tables'] = [
Tables._from_dict(x) for x in (_dict.get('tables'))
]
if 'document_structure' in _dict:
args['document_structure'] = DocStructure._from_dict(
_dict.get('document_structure'))
if 'parties' in _dict:
args['parties'] = [
Parties._from_dict(x) for x in (_dict.get('parties'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ClassifyReturn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document') and self.document is not None:
_dict['document'] = self.document._to_dict()
if hasattr(self, 'model_id') and self.model_id is not None:
_dict['model_id'] = self.model_id
if hasattr(self, 'model_version') and self.model_version is not None:
_dict['model_version'] = self.model_version
if hasattr(self, 'elements') and self.elements is not None:
_dict['elements'] = [x._to_dict() for x in self.elements]
if hasattr(self,
'effective_dates') and self.effective_dates is not None:
_dict['effective_dates'] = [
x._to_dict() for x in self.effective_dates
]
if hasattr(self,
'contract_amounts') and self.contract_amounts is not None:
_dict['contract_amounts'] = [
x._to_dict() for x in self.contract_amounts
]
if hasattr(self,
'termination_dates') and self.termination_dates is not None:
_dict['termination_dates'] = [
x._to_dict() for x in self.termination_dates
]
if hasattr(self, 'contract_types') and self.contract_types is not None:
_dict['contract_types'] = [
x._to_dict() for x in self.contract_types
]
if hasattr(self, 'contract_terms') and self.contract_terms is not None:
_dict['contract_terms'] = [
x._to_dict() for x in self.contract_terms
]
if hasattr(self, 'payment_terms') and self.payment_terms is not None:
_dict['payment_terms'] = [x._to_dict() for x in self.payment_terms]
if hasattr(
self,
'contract_currencies') and self.contract_currencies is not None:
_dict['contract_currencies'] = [
x._to_dict() for x in self.contract_currencies
]
if hasattr(self, 'tables') and self.tables is not None:
_dict['tables'] = [x._to_dict() for x in self.tables]
if hasattr(
self,
'document_structure') and self.document_structure is not None:
_dict['document_structure'] = self.document_structure._to_dict()
if hasattr(self, 'parties') and self.parties is not None:
_dict['parties'] = [x._to_dict() for x in self.parties]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ClassifyReturn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ClassifyReturn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ClassifyReturn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ColumnHeaders():
"""
Column-level cells, each applicable as a header to other cells in the same column as
itself, of the current table.
:attr str cell_id: (optional) The unique ID of the cell in the current table.
:attr object location: (optional) The location of the column header cell in the
current table as defined by its `begin` and `end` offsets, respectfully, in the
input document.
:attr str text: (optional) The textual contents of this cell from the input
document without associated markup content.
:attr str text_normalized: (optional) If you provide customization input, the
normalized version of the cell text according to the customization; otherwise,
the same value as `text`.
:attr int row_index_begin: (optional) The `begin` index of this cell's `row`
location in the current table.
:attr int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:attr int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:attr int column_index_end: (optional) The `end` index of this cell's `column`
location in the current table.
"""
def __init__(self,
*,
cell_id: str = None,
location: object = None,
text: str = None,
text_normalized: str = None,
row_index_begin: int = None,
row_index_end: int = None,
column_index_begin: int = None,
column_index_end: int = None) -> None:
"""
Initialize a ColumnHeaders object.
:param str cell_id: (optional) The unique ID of the cell in the current
table.
:param object location: (optional) The location of the column header cell
in the current table as defined by its `begin` and `end` offsets,
respectfully, in the input document.
:param str text: (optional) The textual contents of this cell from the
input document without associated markup content.
:param str text_normalized: (optional) If you provide customization input,
the normalized version of the cell text according to the customization;
otherwise, the same value as `text`.
:param int row_index_begin: (optional) The `begin` index of this cell's
`row` location in the current table.
:param int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:param int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:param int column_index_end: (optional) The `end` index of this cell's
`column` location in the current table.
"""
self.cell_id = cell_id
self.location = location
self.text = text
self.text_normalized = text_normalized
self.row_index_begin = row_index_begin
self.row_index_end = row_index_end
self.column_index_begin = column_index_begin
self.column_index_end = column_index_end
@classmethod
def from_dict(cls, _dict: Dict) -> 'ColumnHeaders':
"""Initialize a ColumnHeaders object from a json dictionary."""
args = {}
valid_keys = [
'cell_id', 'location', 'text', 'text_normalized', 'row_index_begin',
'row_index_end', 'column_index_begin', 'column_index_end'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ColumnHeaders: '
+ ', '.join(bad_keys))
if 'cell_id' in _dict:
args['cell_id'] = _dict.get('cell_id')
if 'location' in _dict:
args['location'] = _dict.get('location')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'row_index_begin' in _dict:
args['row_index_begin'] = _dict.get('row_index_begin')
if 'row_index_end' in _dict:
args['row_index_end'] = _dict.get('row_index_end')
if 'column_index_begin' in _dict:
args['column_index_begin'] = _dict.get('column_index_begin')
if 'column_index_end' in _dict:
args['column_index_end'] = _dict.get('column_index_end')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ColumnHeaders object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'cell_id') and self.cell_id is not None:
_dict['cell_id'] = self.cell_id
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self,
'row_index_begin') and self.row_index_begin is not None:
_dict['row_index_begin'] = self.row_index_begin
if hasattr(self, 'row_index_end') and self.row_index_end is not None:
_dict['row_index_end'] = self.row_index_end
if hasattr(
self,
'column_index_begin') and self.column_index_begin is not None:
_dict['column_index_begin'] = self.column_index_begin
if hasattr(self,
'column_index_end') and self.column_index_end is not None:
_dict['column_index_end'] = self.column_index_end
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ColumnHeaders object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ColumnHeaders') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ColumnHeaders') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class CompareReturn():
"""
The comparison of the two submitted documents.
:attr str model_id: (optional) The analysis model used to compare the input
documents. For the **Compare two documents** method, the only valid value is
`contracts`.
:attr str model_version: (optional) The version of the analysis model identified
by the value of the `model_id` key.
:attr List[Document] documents: (optional) Information about the documents being
compared.
:attr List[AlignedElement] aligned_elements: (optional) A list of pairs of
elements that semantically align between the compared documents.
:attr List[UnalignedElement] unaligned_elements: (optional) A list of elements
that do not semantically align between the compared documents.
"""
def __init__(self,
*,
model_id: str = None,
model_version: str = None,
documents: List['Document'] = None,
aligned_elements: List['AlignedElement'] = None,
unaligned_elements: List['UnalignedElement'] = None) -> None:
"""
Initialize a CompareReturn object.
:param str model_id: (optional) The analysis model used to compare the
input documents. For the **Compare two documents** method, the only valid
value is `contracts`.
:param str model_version: (optional) The version of the analysis model
identified by the value of the `model_id` key.
:param List[Document] documents: (optional) Information about the documents
being compared.
:param List[AlignedElement] aligned_elements: (optional) A list of pairs of
elements that semantically align between the compared documents.
:param List[UnalignedElement] unaligned_elements: (optional) A list of
elements that do not semantically align between the compared documents.
"""
self.model_id = model_id
self.model_version = model_version
self.documents = documents
self.aligned_elements = aligned_elements
self.unaligned_elements = unaligned_elements
@classmethod
def from_dict(cls, _dict: Dict) -> 'CompareReturn':
"""Initialize a CompareReturn object from a json dictionary."""
args = {}
valid_keys = [
'model_id', 'model_version', 'documents', 'aligned_elements',
'unaligned_elements'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class CompareReturn: '
+ ', '.join(bad_keys))
if 'model_id' in _dict:
args['model_id'] = _dict.get('model_id')
if 'model_version' in _dict:
args['model_version'] = _dict.get('model_version')
if 'documents' in _dict:
args['documents'] = [
Document._from_dict(x) for x in (_dict.get('documents'))
]
if 'aligned_elements' in _dict:
args['aligned_elements'] = [
AlignedElement._from_dict(x)
for x in (_dict.get('aligned_elements'))
]
if 'unaligned_elements' in _dict:
args['unaligned_elements'] = [
UnalignedElement._from_dict(x)
for x in (_dict.get('unaligned_elements'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a CompareReturn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'model_id') and self.model_id is not None:
_dict['model_id'] = self.model_id
if hasattr(self, 'model_version') and self.model_version is not None:
_dict['model_version'] = self.model_version
if hasattr(self, 'documents') and self.documents is not None:
_dict['documents'] = [x._to_dict() for x in self.documents]
if hasattr(self,
'aligned_elements') and self.aligned_elements is not None:
_dict['aligned_elements'] = [
x._to_dict() for x in self.aligned_elements
]
if hasattr(
self,
'unaligned_elements') and self.unaligned_elements is not None:
_dict['unaligned_elements'] = [
x._to_dict() for x in self.unaligned_elements
]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this CompareReturn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'CompareReturn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'CompareReturn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Contact():
"""
A contact.
:attr str name: (optional) A string listing the name of the contact.
:attr str role: (optional) A string listing the role of the contact.
"""
def __init__(self, *, name: str = None, role: str = None) -> None:
"""
Initialize a Contact object.
:param str name: (optional) A string listing the name of the contact.
:param str role: (optional) A string listing the role of the contact.
"""
self.name = name
self.role = role
@classmethod
def from_dict(cls, _dict: Dict) -> 'Contact':
"""Initialize a Contact object from a json dictionary."""
args = {}
valid_keys = ['name', 'role']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Contact: ' +
', '.join(bad_keys))
if 'name' in _dict:
args['name'] = _dict.get('name')
if 'role' in _dict:
args['role'] = _dict.get('role')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Contact object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
if hasattr(self, 'role') and self.role is not None:
_dict['role'] = self.role
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Contact object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Contact') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Contact') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Contexts():
"""
Text that is related to the contents of the table and that precedes or follows the
current table.
:attr str text: (optional) The related text.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self, *, text: str = None,
location: 'Location' = None) -> None:
"""
Initialize a Contexts object.
:param str text: (optional) The related text.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.text = text
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'Contexts':
"""Initialize a Contexts object from a json dictionary."""
args = {}
valid_keys = ['text', 'location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Contexts: '
+ ', '.join(bad_keys))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Contexts object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Contexts object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Contexts') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Contexts') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ContractAmts():
"""
A monetary amount identified in the input document.
:attr str confidence_level: (optional) The confidence level in the
identification of the contract amount.
:attr str text: (optional) The monetary amount.
:attr str text_normalized: (optional) The normalized form of the amount, which
is listed as a string. This element is optional; it is returned only if
normalized text exists.
:attr Interpretation interpretation: (optional) The details of the normalized
text, if applicable. This element is optional; it is returned only if normalized
text exists.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
text_normalized: str = None,
interpretation: 'Interpretation' = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a ContractAmts object.
:param str confidence_level: (optional) The confidence level in the
identification of the contract amount.
:param str text: (optional) The monetary amount.
:param str text_normalized: (optional) The normalized form of the amount,
which is listed as a string. This element is optional; it is returned only
if normalized text exists.
:param Interpretation interpretation: (optional) The details of the
normalized text, if applicable. This element is optional; it is returned
only if normalized text exists.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.text_normalized = text_normalized
self.interpretation = interpretation
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'ContractAmts':
"""Initialize a ContractAmts object from a json dictionary."""
args = {}
valid_keys = [
'confidence_level', 'text', 'text_normalized', 'interpretation',
'provenance_ids', 'location'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ContractAmts: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'interpretation' in _dict:
args['interpretation'] = Interpretation._from_dict(
_dict.get('interpretation'))
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ContractAmts object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self, 'interpretation') and self.interpretation is not None:
_dict['interpretation'] = self.interpretation._to_dict()
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ContractAmts object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ContractAmts') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ContractAmts') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the contract amount.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class ContractCurrencies():
"""
The contract currencies that are declared in the document.
:attr str confidence_level: (optional) The confidence level in the
identification of the contract currency.
:attr str text: (optional) The contract currency.
:attr str text_normalized: (optional) The normalized form of the contract
currency, which is listed as a string in
[ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) format. This
element is optional; it is returned only if normalized text exists.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
text_normalized: str = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a ContractCurrencies object.
:param str confidence_level: (optional) The confidence level in the
identification of the contract currency.
:param str text: (optional) The contract currency.
:param str text_normalized: (optional) The normalized form of the contract
currency, which is listed as a string in
[ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) format. This
element is optional; it is returned only if normalized text exists.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.text_normalized = text_normalized
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'ContractCurrencies':
"""Initialize a ContractCurrencies object from a json dictionary."""
args = {}
valid_keys = [
'confidence_level', 'text', 'text_normalized', 'provenance_ids',
'location'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ContractCurrencies: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ContractCurrencies object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ContractCurrencies object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ContractCurrencies') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ContractCurrencies') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the contract currency.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class ContractTerms():
"""
The duration or durations of the contract.
:attr str confidence_level: (optional) The confidence level in the
identification of the contract term.
:attr str text: (optional) The contract term (duration).
:attr str text_normalized: (optional) The normalized form of the contract term,
which is listed as a string. This element is optional; it is returned only if
normalized text exists.
:attr Interpretation interpretation: (optional) The details of the normalized
text, if applicable. This element is optional; it is returned only if normalized
text exists.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
text_normalized: str = None,
interpretation: 'Interpretation' = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a ContractTerms object.
:param str confidence_level: (optional) The confidence level in the
identification of the contract term.
:param str text: (optional) The contract term (duration).
:param str text_normalized: (optional) The normalized form of the contract
term, which is listed as a string. This element is optional; it is returned
only if normalized text exists.
:param Interpretation interpretation: (optional) The details of the
normalized text, if applicable. This element is optional; it is returned
only if normalized text exists.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.text_normalized = text_normalized
self.interpretation = interpretation
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'ContractTerms':
"""Initialize a ContractTerms object from a json dictionary."""
args = {}
valid_keys = [
'confidence_level', 'text', 'text_normalized', 'interpretation',
'provenance_ids', 'location'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ContractTerms: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'interpretation' in _dict:
args['interpretation'] = Interpretation._from_dict(
_dict.get('interpretation'))
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ContractTerms object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self, 'interpretation') and self.interpretation is not None:
_dict['interpretation'] = self.interpretation._to_dict()
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ContractTerms object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ContractTerms') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ContractTerms') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the contract term.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class ContractTypes():
"""
The contract type identified in the input document.
:attr str confidence_level: (optional) The confidence level in the
identification of the contract type.
:attr str text: (optional) The contract type.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a ContractTypes object.
:param str confidence_level: (optional) The confidence level in the
identification of the contract type.
:param str text: (optional) The contract type.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'ContractTypes':
"""Initialize a ContractTypes object from a json dictionary."""
args = {}
valid_keys = ['confidence_level', 'text', 'provenance_ids', 'location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ContractTypes: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ContractTypes object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ContractTypes object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ContractTypes') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ContractTypes') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the contract type.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class DocCounts():
"""
Document counts.
:attr int total: (optional) Total number of documents.
:attr int pending: (optional) Number of pending documents.
:attr int successful: (optional) Number of documents successfully processed.
:attr int failed: (optional) Number of documents not successfully processed.
"""
def __init__(self,
*,
total: int = None,
pending: int = None,
successful: int = None,
failed: int = None) -> None:
"""
Initialize a DocCounts object.
:param int total: (optional) Total number of documents.
:param int pending: (optional) Number of pending documents.
:param int successful: (optional) Number of documents successfully
processed.
:param int failed: (optional) Number of documents not successfully
processed.
"""
self.total = total
self.pending = pending
self.successful = successful
self.failed = failed
@classmethod
def from_dict(cls, _dict: Dict) -> 'DocCounts':
"""Initialize a DocCounts object from a json dictionary."""
args = {}
valid_keys = ['total', 'pending', 'successful', 'failed']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class DocCounts: '
+ ', '.join(bad_keys))
if 'total' in _dict:
args['total'] = _dict.get('total')
if 'pending' in _dict:
args['pending'] = _dict.get('pending')
if 'successful' in _dict:
args['successful'] = _dict.get('successful')
if 'failed' in _dict:
args['failed'] = _dict.get('failed')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a DocCounts object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'total') and self.total is not None:
_dict['total'] = self.total
if hasattr(self, 'pending') and self.pending is not None:
_dict['pending'] = self.pending
if hasattr(self, 'successful') and self.successful is not None:
_dict['successful'] = self.successful
if hasattr(self, 'failed') and self.failed is not None:
_dict['failed'] = self.failed
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this DocCounts object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'DocCounts') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'DocCounts') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class DocInfo():
"""
Information about the parsed input document.
:attr str html: (optional) The full text of the parsed document in HTML format.
:attr str title: (optional) The title of the parsed document. If the service did
not detect a title, the value of this element is `null`.
:attr str hash: (optional) The MD5 hash of the input document.
"""
def __init__(self, *, html: str = None, title: str = None,
hash: str = None) -> None:
"""
Initialize a DocInfo object.
:param str html: (optional) The full text of the parsed document in HTML
format.
:param str title: (optional) The title of the parsed document. If the
service did not detect a title, the value of this element is `null`.
:param str hash: (optional) The MD5 hash of the input document.
"""
self.html = html
self.title = title
self.hash = hash
@classmethod
def from_dict(cls, _dict: Dict) -> 'DocInfo':
"""Initialize a DocInfo object from a json dictionary."""
args = {}
valid_keys = ['html', 'title', 'hash']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class DocInfo: ' +
', '.join(bad_keys))
if 'html' in _dict:
args['html'] = _dict.get('html')
if 'title' in _dict:
args['title'] = _dict.get('title')
if 'hash' in _dict:
args['hash'] = _dict.get('hash')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a DocInfo object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'html') and self.html is not None:
_dict['html'] = self.html
if hasattr(self, 'title') and self.title is not None:
_dict['title'] = self.title
if hasattr(self, 'hash') and self.hash is not None:
_dict['hash'] = self.hash
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this DocInfo object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'DocInfo') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'DocInfo') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class DocStructure():
"""
The structure of the input document.
:attr List[SectionTitles] section_titles: (optional) An array containing one
object per section or subsection identified in the input document.
:attr List[LeadingSentence] leading_sentences: (optional) An array containing
one object per section or subsection, in parallel with the `section_titles`
array, that details the leading sentences in the corresponding section or
subsection.
:attr List[Paragraphs] paragraphs: (optional) An array containing one object per
paragraph, in parallel with the `section_titles` and `leading_sentences` arrays.
"""
def __init__(self,
*,
section_titles: List['SectionTitles'] = None,
leading_sentences: List['LeadingSentence'] = None,
paragraphs: List['Paragraphs'] = None) -> None:
"""
Initialize a DocStructure object.
:param List[SectionTitles] section_titles: (optional) An array containing
one object per section or subsection identified in the input document.
:param List[LeadingSentence] leading_sentences: (optional) An array
containing one object per section or subsection, in parallel with the
`section_titles` array, that details the leading sentences in the
corresponding section or subsection.
:param List[Paragraphs] paragraphs: (optional) An array containing one
object per paragraph, in parallel with the `section_titles` and
`leading_sentences` arrays.
"""
self.section_titles = section_titles
self.leading_sentences = leading_sentences
self.paragraphs = paragraphs
@classmethod
def from_dict(cls, _dict: Dict) -> 'DocStructure':
"""Initialize a DocStructure object from a json dictionary."""
args = {}
valid_keys = ['section_titles', 'leading_sentences', 'paragraphs']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class DocStructure: '
+ ', '.join(bad_keys))
if 'section_titles' in _dict:
args['section_titles'] = [
SectionTitles._from_dict(x)
for x in (_dict.get('section_titles'))
]
if 'leading_sentences' in _dict:
args['leading_sentences'] = [
LeadingSentence._from_dict(x)
for x in (_dict.get('leading_sentences'))
]
if 'paragraphs' in _dict:
args['paragraphs'] = [
Paragraphs._from_dict(x) for x in (_dict.get('paragraphs'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a DocStructure object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'section_titles') and self.section_titles is not None:
_dict['section_titles'] = [
x._to_dict() for x in self.section_titles
]
if hasattr(self,
'leading_sentences') and self.leading_sentences is not None:
_dict['leading_sentences'] = [
x._to_dict() for x in self.leading_sentences
]
if hasattr(self, 'paragraphs') and self.paragraphs is not None:
_dict['paragraphs'] = [x._to_dict() for x in self.paragraphs]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this DocStructure object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'DocStructure') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'DocStructure') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Document():
"""
Basic information about the input document.
:attr str title: (optional) Document title, if detected.
:attr str html: (optional) The input document converted into HTML format.
:attr str hash: (optional) The MD5 hash value of the input document.
:attr str label: (optional) The label applied to the input document with the
calling method's `file_1_label` or `file_2_label` value. This field is specified
only in the output of the **Comparing two documents** method.
"""
def __init__(self,
*,
title: str = None,
html: str = None,
hash: str = None,
label: str = None) -> None:
"""
Initialize a Document object.
:param str title: (optional) Document title, if detected.
:param str html: (optional) The input document converted into HTML format.
:param str hash: (optional) The MD5 hash value of the input document.
:param str label: (optional) The label applied to the input document with
the calling method's `file_1_label` or `file_2_label` value. This field is
specified only in the output of the **Comparing two documents** method.
"""
self.title = title
self.html = html
self.hash = hash
self.label = label
@classmethod
def from_dict(cls, _dict: Dict) -> 'Document':
"""Initialize a Document object from a json dictionary."""
args = {}
valid_keys = ['title', 'html', 'hash', 'label']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Document: '
+ ', '.join(bad_keys))
if 'title' in _dict:
args['title'] = _dict.get('title')
if 'html' in _dict:
args['html'] = _dict.get('html')
if 'hash' in _dict:
args['hash'] = _dict.get('hash')
if 'label' in _dict:
args['label'] = _dict.get('label')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Document object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'title') and self.title is not None:
_dict['title'] = self.title
if hasattr(self, 'html') and self.html is not None:
_dict['html'] = self.html
if hasattr(self, 'hash') and self.hash is not None:
_dict['hash'] = self.hash
if hasattr(self, 'label') and self.label is not None:
_dict['label'] = self.label
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Document object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Document') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Document') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class EffectiveDates():
"""
An effective date.
:attr str confidence_level: (optional) The confidence level in the
identification of the effective date.
:attr str text: (optional) The effective date, listed as a string.
:attr str text_normalized: (optional) The normalized form of the effective date,
which is listed as a string. This element is optional; it is returned only if
normalized text exists.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
text_normalized: str = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a EffectiveDates object.
:param str confidence_level: (optional) The confidence level in the
identification of the effective date.
:param str text: (optional) The effective date, listed as a string.
:param str text_normalized: (optional) The normalized form of the effective
date, which is listed as a string. This element is optional; it is returned
only if normalized text exists.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.text_normalized = text_normalized
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'EffectiveDates':
"""Initialize a EffectiveDates object from a json dictionary."""
args = {}
valid_keys = [
'confidence_level', 'text', 'text_normalized', 'provenance_ids',
'location'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class EffectiveDates: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a EffectiveDates object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this EffectiveDates object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'EffectiveDates') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'EffectiveDates') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the effective date.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class Element():
"""
A component part of the document.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The text of the element.
:attr List[TypeLabel] types: (optional) Description of the action specified by
the element and whom it affects.
:attr List[Category] categories: (optional) List of functional categories into
which the element falls; in other words, the subject matter of the element.
:attr List[Attribute] attributes: (optional) List of document attributes.
"""
def __init__(self,
*,
location: 'Location' = None,
text: str = None,
types: List['TypeLabel'] = None,
categories: List['Category'] = None,
attributes: List['Attribute'] = None) -> None:
"""
Initialize a Element object.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The text of the element.
:param List[TypeLabel] types: (optional) Description of the action
specified by the element and whom it affects.
:param List[Category] categories: (optional) List of functional categories
into which the element falls; in other words, the subject matter of the
element.
:param List[Attribute] attributes: (optional) List of document attributes.
"""
self.location = location
self.text = text
self.types = types
self.categories = categories
self.attributes = attributes
@classmethod
def from_dict(cls, _dict: Dict) -> 'Element':
"""Initialize a Element object from a json dictionary."""
args = {}
valid_keys = ['location', 'text', 'types', 'categories', 'attributes']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Element: ' +
', '.join(bad_keys))
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'types' in _dict:
args['types'] = [
TypeLabel._from_dict(x) for x in (_dict.get('types'))
]
if 'categories' in _dict:
args['categories'] = [
Category._from_dict(x) for x in (_dict.get('categories'))
]
if 'attributes' in _dict:
args['attributes'] = [
Attribute._from_dict(x) for x in (_dict.get('attributes'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Element object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
if hasattr(self, 'attributes') and self.attributes is not None:
_dict['attributes'] = [x._to_dict() for x in self.attributes]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Element object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Element') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Element') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ElementLocations():
"""
A list of `begin` and `end` indexes that indicate the locations of the elements in the
input document.
:attr int begin: (optional) An integer that indicates the starting position of
the element in the input document.
:attr int end: (optional) An integer that indicates the ending position of the
element in the input document.
"""
def __init__(self, *, begin: int = None, end: int = None) -> None:
"""
Initialize a ElementLocations object.
:param int begin: (optional) An integer that indicates the starting
position of the element in the input document.
:param int end: (optional) An integer that indicates the ending position of
the element in the input document.
"""
self.begin = begin
self.end = end
@classmethod
def from_dict(cls, _dict: Dict) -> 'ElementLocations':
"""Initialize a ElementLocations object from a json dictionary."""
args = {}
valid_keys = ['begin', 'end']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ElementLocations: '
+ ', '.join(bad_keys))
if 'begin' in _dict:
args['begin'] = _dict.get('begin')
if 'end' in _dict:
args['end'] = _dict.get('end')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ElementLocations object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'begin') and self.begin is not None:
_dict['begin'] = self.begin
if hasattr(self, 'end') and self.end is not None:
_dict['end'] = self.end
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ElementLocations object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ElementLocations') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ElementLocations') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ElementPair():
"""
Details of semantically aligned elements.
:attr str document_label: (optional) The label of the document (that is, the
value of either the `file_1_label` or `file_2_label` parameters) in which the
element occurs.
:attr str text: (optional) The contents of the element.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr List[TypeLabelComparison] types: (optional) Description of the action
specified by the element and whom it affects.
:attr List[CategoryComparison] categories: (optional) List of functional
categories into which the element falls; in other words, the subject matter of
the element.
:attr List[Attribute] attributes: (optional) List of document attributes.
"""
def __init__(self,
*,
document_label: str = None,
text: str = None,
location: 'Location' = None,
types: List['TypeLabelComparison'] = None,
categories: List['CategoryComparison'] = None,
attributes: List['Attribute'] = None) -> None:
"""
Initialize a ElementPair object.
:param str document_label: (optional) The label of the document (that is,
the value of either the `file_1_label` or `file_2_label` parameters) in
which the element occurs.
:param str text: (optional) The contents of the element.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param List[TypeLabelComparison] types: (optional) Description of the
action specified by the element and whom it affects.
:param List[CategoryComparison] categories: (optional) List of functional
categories into which the element falls; in other words, the subject matter
of the element.
:param List[Attribute] attributes: (optional) List of document attributes.
"""
self.document_label = document_label
self.text = text
self.location = location
self.types = types
self.categories = categories
self.attributes = attributes
@classmethod
def from_dict(cls, _dict: Dict) -> 'ElementPair':
"""Initialize a ElementPair object from a json dictionary."""
args = {}
valid_keys = [
'document_label', 'text', 'location', 'types', 'categories',
'attributes'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ElementPair: '
+ ', '.join(bad_keys))
if 'document_label' in _dict:
args['document_label'] = _dict.get('document_label')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'types' in _dict:
args['types'] = [
TypeLabelComparison._from_dict(x) for x in (_dict.get('types'))
]
if 'categories' in _dict:
args['categories'] = [
CategoryComparison._from_dict(x)
for x in (_dict.get('categories'))
]
if 'attributes' in _dict:
args['attributes'] = [
Attribute._from_dict(x) for x in (_dict.get('attributes'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ElementPair object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_label') and self.document_label is not None:
_dict['document_label'] = self.document_label
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
if hasattr(self, 'attributes') and self.attributes is not None:
_dict['attributes'] = [x._to_dict() for x in self.attributes]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ElementPair object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ElementPair') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ElementPair') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class FeedbackDataInput():
"""
Feedback data for submission.
:attr str feedback_type: The type of feedback. The only permitted value is
`element_classification`.
:attr ShortDoc document: (optional) Brief information about the input document.
:attr str model_id: (optional) An optional string identifying the model ID. The
only permitted value is `contracts`.
:attr str model_version: (optional) An optional string identifying the version
of the model used.
:attr Location location: The numeric location of the identified element in the
document, represented with two integers labeled `begin` and `end`.
:attr str text: The text on which to submit feedback.
:attr OriginalLabelsIn original_labels: The original labeling from the input
document, without the submitted feedback.
:attr UpdatedLabelsIn updated_labels: The updated labeling from the input
document, accounting for the submitted feedback.
"""
def __init__(self,
feedback_type: str,
location: 'Location',
text: str,
original_labels: 'OriginalLabelsIn',
updated_labels: 'UpdatedLabelsIn',
*,
document: 'ShortDoc' = None,
model_id: str = None,
model_version: str = None) -> None:
"""
Initialize a FeedbackDataInput object.
:param str feedback_type: The type of feedback. The only permitted value is
`element_classification`.
:param Location location: The numeric location of the identified element in
the document, represented with two integers labeled `begin` and `end`.
:param str text: The text on which to submit feedback.
:param OriginalLabelsIn original_labels: The original labeling from the
input document, without the submitted feedback.
:param UpdatedLabelsIn updated_labels: The updated labeling from the input
document, accounting for the submitted feedback.
:param ShortDoc document: (optional) Brief information about the input
document.
:param str model_id: (optional) An optional string identifying the model
ID. The only permitted value is `contracts`.
:param str model_version: (optional) An optional string identifying the
version of the model used.
"""
self.feedback_type = feedback_type
self.document = document
self.model_id = model_id
self.model_version = model_version
self.location = location
self.text = text
self.original_labels = original_labels
self.updated_labels = updated_labels
@classmethod
def from_dict(cls, _dict: Dict) -> 'FeedbackDataInput':
"""Initialize a FeedbackDataInput object from a json dictionary."""
args = {}
valid_keys = [
'feedback_type', 'document', 'model_id', 'model_version',
'location', 'text', 'original_labels', 'updated_labels'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class FeedbackDataInput: '
+ ', '.join(bad_keys))
if 'feedback_type' in _dict:
args['feedback_type'] = _dict.get('feedback_type')
else:
raise ValueError(
'Required property \'feedback_type\' not present in FeedbackDataInput JSON'
)
if 'document' in _dict:
args['document'] = ShortDoc._from_dict(_dict.get('document'))
if 'model_id' in _dict:
args['model_id'] = _dict.get('model_id')
if 'model_version' in _dict:
args['model_version'] = _dict.get('model_version')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
else:
raise ValueError(
'Required property \'location\' not present in FeedbackDataInput JSON'
)
if 'text' in _dict:
args['text'] = _dict.get('text')
else:
raise ValueError(
'Required property \'text\' not present in FeedbackDataInput JSON'
)
if 'original_labels' in _dict:
args['original_labels'] = OriginalLabelsIn._from_dict(
_dict.get('original_labels'))
else:
raise ValueError(
'Required property \'original_labels\' not present in FeedbackDataInput JSON'
)
if 'updated_labels' in _dict:
args['updated_labels'] = UpdatedLabelsIn._from_dict(
_dict.get('updated_labels'))
else:
raise ValueError(
'Required property \'updated_labels\' not present in FeedbackDataInput JSON'
)
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a FeedbackDataInput object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'feedback_type') and self.feedback_type is not None:
_dict['feedback_type'] = self.feedback_type
if hasattr(self, 'document') and self.document is not None:
_dict['document'] = self.document._to_dict()
if hasattr(self, 'model_id') and self.model_id is not None:
_dict['model_id'] = self.model_id
if hasattr(self, 'model_version') and self.model_version is not None:
_dict['model_version'] = self.model_version
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'original_labels') and self.original_labels is not None:
_dict['original_labels'] = self.original_labels._to_dict()
if hasattr(self, 'updated_labels') and self.updated_labels is not None:
_dict['updated_labels'] = self.updated_labels._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this FeedbackDataInput object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'FeedbackDataInput') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'FeedbackDataInput') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class FeedbackDataOutput():
"""
Information returned from the **Add Feedback** method.
:attr str feedback_type: (optional) A string identifying the user adding the
feedback. The only permitted value is `element_classification`.
:attr ShortDoc document: (optional) Brief information about the input document.
:attr str model_id: (optional) An optional string identifying the model ID. The
only permitted value is `contracts`.
:attr str model_version: (optional) An optional string identifying the version
of the model used.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The text to which the feedback applies.
:attr OriginalLabelsOut original_labels: (optional) The original labeling from
the input document, without the submitted feedback.
:attr UpdatedLabelsOut updated_labels: (optional) The updated labeling from the
input document, accounting for the submitted feedback.
:attr Pagination pagination: (optional) Pagination details, if required by the
length of the output.
"""
def __init__(self,
*,
feedback_type: str = None,
document: 'ShortDoc' = None,
model_id: str = None,
model_version: str = None,
location: 'Location' = None,
text: str = None,
original_labels: 'OriginalLabelsOut' = None,
updated_labels: 'UpdatedLabelsOut' = None,
pagination: 'Pagination' = None) -> None:
"""
Initialize a FeedbackDataOutput object.
:param str feedback_type: (optional) A string identifying the user adding
the feedback. The only permitted value is `element_classification`.
:param ShortDoc document: (optional) Brief information about the input
document.
:param str model_id: (optional) An optional string identifying the model
ID. The only permitted value is `contracts`.
:param str model_version: (optional) An optional string identifying the
version of the model used.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The text to which the feedback applies.
:param OriginalLabelsOut original_labels: (optional) The original labeling
from the input document, without the submitted feedback.
:param UpdatedLabelsOut updated_labels: (optional) The updated labeling
from the input document, accounting for the submitted feedback.
:param Pagination pagination: (optional) Pagination details, if required by
the length of the output.
"""
self.feedback_type = feedback_type
self.document = document
self.model_id = model_id
self.model_version = model_version
self.location = location
self.text = text
self.original_labels = original_labels
self.updated_labels = updated_labels
self.pagination = pagination
@classmethod
def from_dict(cls, _dict: Dict) -> 'FeedbackDataOutput':
"""Initialize a FeedbackDataOutput object from a json dictionary."""
args = {}
valid_keys = [
'feedback_type', 'document', 'model_id', 'model_version',
'location', 'text', 'original_labels', 'updated_labels',
'pagination'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class FeedbackDataOutput: '
+ ', '.join(bad_keys))
if 'feedback_type' in _dict:
args['feedback_type'] = _dict.get('feedback_type')
if 'document' in _dict:
args['document'] = ShortDoc._from_dict(_dict.get('document'))
if 'model_id' in _dict:
args['model_id'] = _dict.get('model_id')
if 'model_version' in _dict:
args['model_version'] = _dict.get('model_version')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'original_labels' in _dict:
args['original_labels'] = OriginalLabelsOut._from_dict(
_dict.get('original_labels'))
if 'updated_labels' in _dict:
args['updated_labels'] = UpdatedLabelsOut._from_dict(
_dict.get('updated_labels'))
if 'pagination' in _dict:
args['pagination'] = Pagination._from_dict(_dict.get('pagination'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a FeedbackDataOutput object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'feedback_type') and self.feedback_type is not None:
_dict['feedback_type'] = self.feedback_type
if hasattr(self, 'document') and self.document is not None:
_dict['document'] = self.document._to_dict()
if hasattr(self, 'model_id') and self.model_id is not None:
_dict['model_id'] = self.model_id
if hasattr(self, 'model_version') and self.model_version is not None:
_dict['model_version'] = self.model_version
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'original_labels') and self.original_labels is not None:
_dict['original_labels'] = self.original_labels._to_dict()
if hasattr(self, 'updated_labels') and self.updated_labels is not None:
_dict['updated_labels'] = self.updated_labels._to_dict()
if hasattr(self, 'pagination') and self.pagination is not None:
_dict['pagination'] = self.pagination._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this FeedbackDataOutput object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'FeedbackDataOutput') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'FeedbackDataOutput') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class FeedbackDeleted():
"""
The status and message of the deletion request.
:attr int status: (optional) HTTP return code.
:attr str message: (optional) Status message returned from the service.
"""
def __init__(self, *, status: int = None, message: str = None) -> None:
"""
Initialize a FeedbackDeleted object.
:param int status: (optional) HTTP return code.
:param str message: (optional) Status message returned from the service.
"""
self.status = status
self.message = message
@classmethod
def from_dict(cls, _dict: Dict) -> 'FeedbackDeleted':
"""Initialize a FeedbackDeleted object from a json dictionary."""
args = {}
valid_keys = ['status', 'message']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class FeedbackDeleted: '
+ ', '.join(bad_keys))
if 'status' in _dict:
args['status'] = _dict.get('status')
if 'message' in _dict:
args['message'] = _dict.get('message')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a FeedbackDeleted object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'status') and self.status is not None:
_dict['status'] = self.status
if hasattr(self, 'message') and self.message is not None:
_dict['message'] = self.message
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this FeedbackDeleted object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'FeedbackDeleted') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'FeedbackDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class FeedbackList():
"""
The results of a successful **List Feedback** request for all feedback.
:attr List[GetFeedback] feedback: (optional) A list of all feedback for the
document.
"""
def __init__(self, *, feedback: List['GetFeedback'] = None) -> None:
"""
Initialize a FeedbackList object.
:param List[GetFeedback] feedback: (optional) A list of all feedback for
the document.
"""
self.feedback = feedback
@classmethod
def from_dict(cls, _dict: Dict) -> 'FeedbackList':
"""Initialize a FeedbackList object from a json dictionary."""
args = {}
valid_keys = ['feedback']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class FeedbackList: '
+ ', '.join(bad_keys))
if 'feedback' in _dict:
args['feedback'] = [
GetFeedback._from_dict(x) for x in (_dict.get('feedback'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a FeedbackList object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'feedback') and self.feedback is not None:
_dict['feedback'] = [x._to_dict() for x in self.feedback]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this FeedbackList object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'FeedbackList') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'FeedbackList') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class FeedbackReturn():
"""
Information about the document and the submitted feedback.
:attr str feedback_id: (optional) The unique ID of the feedback object.
:attr str user_id: (optional) An optional string identifying the person
submitting feedback.
:attr str comment: (optional) An optional comment from the person submitting the
feedback.
:attr datetime created: (optional) Timestamp listing the creation time of the
feedback submission.
:attr FeedbackDataOutput feedback_data: (optional) Information returned from the
**Add Feedback** method.
"""
def __init__(self,
*,
feedback_id: str = None,
user_id: str = None,
comment: str = None,
created: datetime = None,
feedback_data: 'FeedbackDataOutput' = None) -> None:
"""
Initialize a FeedbackReturn object.
:param str feedback_id: (optional) The unique ID of the feedback object.
:param str user_id: (optional) An optional string identifying the person
submitting feedback.
:param str comment: (optional) An optional comment from the person
submitting the feedback.
:param datetime created: (optional) Timestamp listing the creation time of
the feedback submission.
:param FeedbackDataOutput feedback_data: (optional) Information returned
from the **Add Feedback** method.
"""
self.feedback_id = feedback_id
self.user_id = user_id
self.comment = comment
self.created = created
self.feedback_data = feedback_data
@classmethod
def from_dict(cls, _dict: Dict) -> 'FeedbackReturn':
"""Initialize a FeedbackReturn object from a json dictionary."""
args = {}
valid_keys = [
'feedback_id', 'user_id', 'comment', 'created', 'feedback_data'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class FeedbackReturn: '
+ ', '.join(bad_keys))
if 'feedback_id' in _dict:
args['feedback_id'] = _dict.get('feedback_id')
if 'user_id' in _dict:
args['user_id'] = _dict.get('user_id')
if 'comment' in _dict:
args['comment'] = _dict.get('comment')
if 'created' in _dict:
args['created'] = string_to_datetime(_dict.get('created'))
if 'feedback_data' in _dict:
args['feedback_data'] = FeedbackDataOutput._from_dict(
_dict.get('feedback_data'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a FeedbackReturn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'feedback_id') and self.feedback_id is not None:
_dict['feedback_id'] = self.feedback_id
if hasattr(self, 'user_id') and self.user_id is not None:
_dict['user_id'] = self.user_id
if hasattr(self, 'comment') and self.comment is not None:
_dict['comment'] = self.comment
if hasattr(self, 'created') and self.created is not None:
_dict['created'] = datetime_to_string(self.created)
if hasattr(self, 'feedback_data') and self.feedback_data is not None:
_dict['feedback_data'] = self.feedback_data._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this FeedbackReturn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'FeedbackReturn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'FeedbackReturn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class GetFeedback():
"""
The results of a successful **Get Feedback** request for a single feedback entry.
:attr str feedback_id: (optional) A string uniquely identifying the feedback
entry.
:attr datetime created: (optional) A timestamp identifying the creation time of
the feedback entry.
:attr str comment: (optional) A string containing the user's comment about the
feedback entry.
:attr FeedbackDataOutput feedback_data: (optional) Information returned from the
**Add Feedback** method.
"""
def __init__(self,
*,
feedback_id: str = None,
created: datetime = None,
comment: str = None,
feedback_data: 'FeedbackDataOutput' = None) -> None:
"""
Initialize a GetFeedback object.
:param str feedback_id: (optional) A string uniquely identifying the
feedback entry.
:param datetime created: (optional) A timestamp identifying the creation
time of the feedback entry.
:param str comment: (optional) A string containing the user's comment about
the feedback entry.
:param FeedbackDataOutput feedback_data: (optional) Information returned
from the **Add Feedback** method.
"""
self.feedback_id = feedback_id
self.created = created
self.comment = comment
self.feedback_data = feedback_data
@classmethod
def from_dict(cls, _dict: Dict) -> 'GetFeedback':
"""Initialize a GetFeedback object from a json dictionary."""
args = {}
valid_keys = ['feedback_id', 'created', 'comment', 'feedback_data']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class GetFeedback: '
+ ', '.join(bad_keys))
if 'feedback_id' in _dict:
args['feedback_id'] = _dict.get('feedback_id')
if 'created' in _dict:
args['created'] = string_to_datetime(_dict.get('created'))
if 'comment' in _dict:
args['comment'] = _dict.get('comment')
if 'feedback_data' in _dict:
args['feedback_data'] = FeedbackDataOutput._from_dict(
_dict.get('feedback_data'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a GetFeedback object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'feedback_id') and self.feedback_id is not None:
_dict['feedback_id'] = self.feedback_id
if hasattr(self, 'created') and self.created is not None:
_dict['created'] = datetime_to_string(self.created)
if hasattr(self, 'comment') and self.comment is not None:
_dict['comment'] = self.comment
if hasattr(self, 'feedback_data') and self.feedback_data is not None:
_dict['feedback_data'] = self.feedback_data._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this GetFeedback object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'GetFeedback') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'GetFeedback') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class HTMLReturn():
"""
The HTML converted from an input document.
:attr str num_pages: (optional) The number of pages in the input document.
:attr str author: (optional) The author of the input document, if identified.
:attr str publication_date: (optional) The publication date of the input
document, if identified.
:attr str title: (optional) The title of the input document, if identified.
:attr str html: (optional) The HTML version of the input document.
"""
def __init__(self,
*,
num_pages: str = None,
author: str = None,
publication_date: str = None,
title: str = None,
html: str = None) -> None:
"""
Initialize a HTMLReturn object.
:param str num_pages: (optional) The number of pages in the input document.
:param str author: (optional) The author of the input document, if
identified.
:param str publication_date: (optional) The publication date of the input
document, if identified.
:param str title: (optional) The title of the input document, if
identified.
:param str html: (optional) The HTML version of the input document.
"""
self.num_pages = num_pages
self.author = author
self.publication_date = publication_date
self.title = title
self.html = html
@classmethod
def from_dict(cls, _dict: Dict) -> 'HTMLReturn':
"""Initialize a HTMLReturn object from a json dictionary."""
args = {}
valid_keys = [
'num_pages', 'author', 'publication_date', 'title', 'html'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class HTMLReturn: '
+ ', '.join(bad_keys))
if 'num_pages' in _dict:
args['num_pages'] = _dict.get('num_pages')
if 'author' in _dict:
args['author'] = _dict.get('author')
if 'publication_date' in _dict:
args['publication_date'] = _dict.get('publication_date')
if 'title' in _dict:
args['title'] = _dict.get('title')
if 'html' in _dict:
args['html'] = _dict.get('html')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a HTMLReturn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'num_pages') and self.num_pages is not None:
_dict['num_pages'] = self.num_pages
if hasattr(self, 'author') and self.author is not None:
_dict['author'] = self.author
if hasattr(self,
'publication_date') and self.publication_date is not None:
_dict['publication_date'] = self.publication_date
if hasattr(self, 'title') and self.title is not None:
_dict['title'] = self.title
if hasattr(self, 'html') and self.html is not None:
_dict['html'] = self.html
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this HTMLReturn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'HTMLReturn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'HTMLReturn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Interpretation():
"""
The details of the normalized text, if applicable. This element is optional; it is
returned only if normalized text exists.
:attr str value: (optional) The value that was located in the normalized text.
:attr float numeric_value: (optional) An integer or float expressing the numeric
value of the `value` key.
:attr str unit: (optional) A string listing the unit of the value that was found
in the normalized text.
**Note:** The value of `unit` is the [ISO-4217 currency
code](https://www.iso.org/iso-4217-currency-codes.html) identified for the
currency amount (for example, `USD` or `EUR`). If the service cannot
disambiguate a currency symbol (for example, `$` or `£`), the value of `unit`
contains the ambiguous symbol as-is.
"""
def __init__(self,
*,
value: str = None,
numeric_value: float = None,
unit: str = None) -> None:
"""
Initialize a Interpretation object.
:param str value: (optional) The value that was located in the normalized
text.
:param float numeric_value: (optional) An integer or float expressing the
numeric value of the `value` key.
:param str unit: (optional) A string listing the unit of the value that was
found in the normalized text.
**Note:** The value of `unit` is the [ISO-4217 currency
code](https://www.iso.org/iso-4217-currency-codes.html) identified for the
currency amount (for example, `USD` or `EUR`). If the service cannot
disambiguate a currency symbol (for example, `$` or `£`), the value of
`unit` contains the ambiguous symbol as-is.
"""
self.value = value
self.numeric_value = numeric_value
self.unit = unit
@classmethod
def from_dict(cls, _dict: Dict) -> 'Interpretation':
"""Initialize a Interpretation object from a json dictionary."""
args = {}
valid_keys = ['value', 'numeric_value', 'unit']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Interpretation: '
+ ', '.join(bad_keys))
if 'value' in _dict:
args['value'] = _dict.get('value')
if 'numeric_value' in _dict:
args['numeric_value'] = _dict.get('numeric_value')
if 'unit' in _dict:
args['unit'] = _dict.get('unit')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Interpretation object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'value') and self.value is not None:
_dict['value'] = self.value
if hasattr(self, 'numeric_value') and self.numeric_value is not None:
_dict['numeric_value'] = self.numeric_value
if hasattr(self, 'unit') and self.unit is not None:
_dict['unit'] = self.unit
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Interpretation object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Interpretation') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Interpretation') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Key():
"""
A key in a key-value pair.
:attr str cell_id: (optional) The unique ID of the key in the table.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The text content of the table cell without HTML
markup.
"""
def __init__(self,
*,
cell_id: str = None,
location: 'Location' = None,
text: str = None) -> None:
"""
Initialize a Key object.
:param str cell_id: (optional) The unique ID of the key in the table.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The text content of the table cell without HTML
markup.
"""
self.cell_id = cell_id
self.location = location
self.text = text
@classmethod
def from_dict(cls, _dict: Dict) -> 'Key':
"""Initialize a Key object from a json dictionary."""
args = {}
valid_keys = ['cell_id', 'location', 'text']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Key: ' +
', '.join(bad_keys))
if 'cell_id' in _dict:
args['cell_id'] = _dict.get('cell_id')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Key object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'cell_id') and self.cell_id is not None:
_dict['cell_id'] = self.cell_id
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Key object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Key') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Key') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class KeyValuePair():
"""
Key-value pairs detected across cell boundaries.
:attr Key key: (optional) A key in a key-value pair.
:attr List[Value] value: (optional) A list of values in a key-value pair.
"""
def __init__(self, *, key: 'Key' = None,
value: List['Value'] = None) -> None:
"""
Initialize a KeyValuePair object.
:param Key key: (optional) A key in a key-value pair.
:param List[Value] value: (optional) A list of values in a key-value pair.
"""
self.key = key
self.value = value
@classmethod
def from_dict(cls, _dict: Dict) -> 'KeyValuePair':
"""Initialize a KeyValuePair object from a json dictionary."""
args = {}
valid_keys = ['key', 'value']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class KeyValuePair: '
+ ', '.join(bad_keys))
if 'key' in _dict:
args['key'] = Key._from_dict(_dict.get('key'))
if 'value' in _dict:
args['value'] = [Value._from_dict(x) for x in (_dict.get('value'))]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a KeyValuePair object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'key') and self.key is not None:
_dict['key'] = self.key._to_dict()
if hasattr(self, 'value') and self.value is not None:
_dict['value'] = [x._to_dict() for x in self.value]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
""
|
def __eq__(self, other: 'KeyValuePair') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'KeyValuePair') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Label():
"""
A pair of `nature` and `party` objects. The `nature` object identifies the effect of
the element on the identified `party`, and the `party` object identifies the affected
party.
:attr str nature: The identified `nature` of the element.
:attr str party: The identified `party` of the element.
"""
def __init__(self, nature: str, party: str) -> None:
"""
Initialize a Label object.
:param str nature: The identified `nature` of the element.
:param str party: The identified `party` of the element.
"""
self.nature = nature
self.party = party
@classmethod
def from_dict(cls, _dict: Dict) -> 'Label':
"""Initialize a Label object from a json dictionary."""
args = {}
valid_keys = ['nature', 'party']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Label: ' +
', '.join(bad_keys))
if 'nature' in _dict:
args['nature'] = _dict.get('nature')
else:
raise ValueError(
'Required property \'nature\' not present in Label JSON')
if 'party' in _dict:
args['party'] = _dict.get('party')
else:
raise ValueError(
'Required property \'party\' not present in Label JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Label object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'nature') and self.nature is not None:
_dict['nature'] = self.nature
if hasattr(self, 'party') and self.party is not None:
_dict['party'] = self.party
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Label object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Label') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Label') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class LeadingSentence():
"""
The leading sentences in a section or subsection of the input document.
:attr str text: (optional) The text of the leading sentence.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr List[ElementLocations] element_locations: (optional) An array of
`location` objects that lists the locations of detected leading sentences.
"""
def __init__(self,
*,
text: str = None,
location: 'Location' = None,
element_locations: List['ElementLocations'] = None) -> None:
"""
Initialize a LeadingSentence object.
:param str text: (optional) The text of the leading sentence.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param List[ElementLocations] element_locations: (optional) An array of
`location` objects that lists the locations of detected leading sentences.
"""
self.text = text
self.location = location
self.element_locations = element_locations
@classmethod
def from_dict(cls, _dict: Dict) -> 'LeadingSentence':
"""Initialize a LeadingSentence object from a json dictionary."""
args = {}
valid_keys = ['text', 'location', 'element_locations']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class LeadingSentence: '
+ ', '.join(bad_keys))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'element_locations' in _dict:
args['element_locations'] = [
ElementLocations._from_dict(x)
for x in (_dict.get('element_locations'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a LeadingSentence object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self,
'element_locations') and self.element_locations is not None:
_dict['element_locations'] = [
x._to_dict() for x in self.element_locations
]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this LeadingSentence object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'LeadingSentence') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'LeadingSentence') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Location():
"""
The numeric location of the identified element in the document, represented with two
integers labeled `begin` and `end`.
:attr int begin: The element's `begin` index.
:attr int end: The element's `end` index.
"""
def __init__(self, begin: int, end: int) -> None:
"""
Initialize a Location object.
:param int begin: The element's `begin` index.
:param int end: The element's `end` index.
"""
self.begin = begin
self.end = end
@classmethod
def from_dict(cls, _dict: Dict) -> 'Location':
"""Initialize a Location object from a json dictionary."""
args = {}
valid_keys = ['begin', 'end']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Location: '
+ ', '.join(bad_keys))
if 'begin' in _dict:
args['begin'] = _dict.get('begin')
else:
raise ValueError(
'Required property \'begin\' not present in Location JSON')
if 'end' in _dict:
args['end'] = _dict.get('end')
else:
raise ValueError(
'Required property \'end\' not present in Location JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Location object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'begin') and self.begin is not None:
_dict['begin'] = self.begin
if hasattr(self, 'end') and self.end is not None:
_dict['end'] = self.end
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Location object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Location') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Location') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Mention():
"""
A mention of a party.
:attr str text: (optional) The name of the party.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self, *, text: str = None,
location: 'Location' = None) -> None:
"""
Initialize a Mention object.
:param str text: (optional) The name of the party.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.text = text
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'Mention':
"""Initialize a Mention object from a json dictionary."""
args = {}
valid_keys = ['text', 'location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Mention: ' +
', '.join(bad_keys))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Mention object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Mention object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Mention') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Mention') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class OriginalLabelsIn():
"""
The original labeling from the input document, without the submitted feedback.
:attr List[TypeLabel] types: Description of the action specified by the element
and whom it affects.
:attr List[Category] categories: List of functional categories into which the
element falls; in other words, the subject matter of the element.
"""
def __init__(self, types: List['TypeLabel'],
categories: List['Category']) -> None:
"""
Initialize a OriginalLabelsIn object.
:param List[TypeLabel] types: Description of the action specified by the
element and whom it affects.
:param List[Category] categories: List of functional categories into which
the element falls; in other words, the subject matter of the element.
"""
self.types = types
self.categories = categories
@classmethod
def from_dict(cls, _dict: Dict) -> 'OriginalLabelsIn':
"""Initialize a OriginalLabelsIn object from a json dictionary."""
args = {}
valid_keys = ['types', 'categories']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class OriginalLabelsIn: '
+ ', '.join(bad_keys))
if 'types' in _dict:
args['types'] = [
TypeLabel._from_dict(x) for x in (_dict.get('types'))
]
else:
raise ValueError(
'Required property \'types\' not present in OriginalLabelsIn JSON'
)
if 'categories' in _dict:
args['categories'] = [
Category._from_dict(x) for x in (_dict.get('categories'))
]
else:
raise ValueError(
'Required property \'categories\' not present in OriginalLabelsIn JSON'
)
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a OriginalLabelsIn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this OriginalLabelsIn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'OriginalLabelsIn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'OriginalLabelsIn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class OriginalLabelsOut():
"""
The original labeling from the input document, without the submitted feedback.
:attr List[TypeLabel] types: (optional) Description of the action specified by
the element and whom it affects.
:attr List[Category] categories: (optional) List of functional categories into
which the element falls; in other words, the subject matter of the element.
:attr str modification: (optional) A string identifying the type of modification
the feedback entry in the `updated_labels` array. Possible values are `added`,
`not_changed`, and `removed`.
"""
def __init__(self,
*,
types: List['TypeLabel'] = None,
categories: List['Category'] = None,
modification: str = None) -> None:
"""
Initialize a OriginalLabelsOut object.
:param List[TypeLabel] types: (optional) Description of the action
specified by the element and whom it affects.
:param List[Category] categories: (optional) List of functional categories
into which the element falls; in other words, the subject matter of the
element.
:param str modification: (optional) A string identifying the type of
modification the feedback entry in the `updated_labels` array. Possible
values are `added`, `not_changed`, and `removed`.
"""
self.types = types
self.categories = categories
self.modification = modification
@classmethod
def from_dict(cls, _dict: Dict) -> 'OriginalLabelsOut':
"""Initialize a OriginalLabelsOut object from a json dictionary."""
args = {}
valid_keys = ['types', 'categories', 'modification']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class OriginalLabelsOut: '
+ ', '.join(bad_keys))
if 'types' in _dict:
args['types'] = [
TypeLabel._from_dict(x) for x in (_dict.get('types'))
]
if 'categories' in _dict:
args['categories'] = [
Category._from_dict(x) for x in (_dict.get('categories'))
]
if 'modification' in _dict:
args['modification'] = _dict.get('modification')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a OriginalLabelsOut object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
if hasattr(self, 'modification') and self.modification is not None:
_dict['modification'] = self.modification
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this OriginalLabelsOut object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'OriginalLabelsOut') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'OriginalLabelsOut') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ModificationEnum(Enum):
"""
A string identifying the type of modification the feedback entry in the
`updated_labels` array. Possible values are `added`, `not_changed`, and `removed`.
"""
ADDED = "added"
NOT_CHANGED = "not_changed"
REMOVED = "removed"
class Pagination():
"""
Pagination details, if required by the length of the output.
:attr str refresh_cursor: (optional) A token identifying the current page of
results.
:attr str next_cursor: (optional) A token identifying the next page of results.
:attr str refresh_url: (optional) The URL that returns the current page of
results.
:attr str next_url: (optional) The URL that returns the next page of results.
:attr int total: (optional) Reserved for future use.
"""
def __init__(self,
*,
refresh_cursor: str = None,
next_cursor: str = None,
refresh_url: str = None,
next_url: str = None,
total: int = None) -> None:
"""
Initialize a Pagination object.
:param str refresh_cursor: (optional) A token identifying the current page
of results.
:param str next_cursor: (optional) A token identifying the next page of
results.
:param str refresh_url: (optional) The URL that returns the current page of
results.
:param str next_url: (optional) The URL that returns the next page of
results.
:param int total: (optional) Reserved for future use.
"""
self.refresh_cursor = refresh_cursor
self.next_cursor = next_cursor
self.refresh_url = refresh_url
self.next_url = next_url
self.total = total
@classmethod
def from_dict(cls, _dict: Dict) -> 'Pagination':
"""Initialize a Pagination object from a json dictionary."""
args = {}
valid_keys = [
'refresh_cursor', 'next_cursor', 'refresh_url', 'next_url', 'total'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Pagination: '
+ ', '.join(bad_keys))
if 'refresh_cursor' in _dict:
args['refresh_cursor'] = _dict.get('refresh_cursor')
if 'next_cursor' in _dict:
args['next_cursor'] = _dict.get('next_cursor')
if 'refresh_url' in _dict:
args['refresh_url'] = _dict.get('refresh_url')
if 'next_url' in _dict:
args['next_url'] = _dict.get('next_url')
if 'total' in _dict:
args['total'] = _dict.get('total')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Pagination object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'refresh_cursor') and self.refresh_cursor is not None:
_dict['refresh_cursor'] = self.refresh_cursor
if hasattr(self, 'next_cursor') and self.next_cursor is not None:
_dict['next_cursor'] = self.next_cursor
if hasattr(self, 'refresh_url') and self.refresh_url is not None:
_dict['refresh_url'] = self.refresh_url
if hasattr(self, 'next_url') and self.next_url is not None:
_dict['next_url'] = self.next_url
if hasattr(self, 'total') and self.total is not None:
_dict['total'] = self.total
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Pagination object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Pagination') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Pagination') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Paragraphs():
"""
The locations of each paragraph in the input document.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self, *, location: 'Location' = None) -> None:
"""
Initialize a Paragraphs object.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'Paragraphs':
"""Initialize a Paragraphs object from a json dictionary."""
args = {}
valid_keys = ['location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Paragraphs: '
+ ', '.join(bad_keys))
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Paragraphs object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Paragraphs object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Paragraphs') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Paragraphs') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Parties():
"""
A party and its corresponding role, including address and contact information if
identified.
:attr str party: (optional) The normalized form of the party's name.
:attr str role: (optional) A string identifying the party's role.
:attr str importance: (optional) A string that identifies the importance of the
party.
:attr List[Address] addresses: (optional) A list of the party's address or
addresses.
:attr List[Contact] contacts: (optional) A list of the names and roles of
contacts identified in the input document.
:attr List[Mention] mentions: (optional) A list of the party's mentions in the
input document.
"""
def __init__(self,
*,
party: str = None,
role: str = None,
importance: str = None,
addresses: List['Address'] = None,
contacts: List['Contact'] = None,
mentions: List['Mention'] = None) -> None:
"""
Initialize a Parties object.
:param str party: (optional) The normalized form of the party's name.
:param str role: (optional) A string identifying the party's role.
:param str importance: (optional) A string that identifies the importance
of the party.
:param List[Address] addresses: (optional) A list of the party's address or
addresses.
:param List[Contact] contacts: (optional) A list of the names and roles of
contacts identified in the input document.
:param List[Mention] mentions: (optional) A list of the party's mentions in
the input document.
"""
self.party = party
self.role = role
self.importance = importance
self.addresses = addresses
self.contacts = contacts
self.mentions = mentions
@classmethod
def from_dict(cls, _dict: Dict) -> 'Parties':
"""Initialize a Parties object from a json dictionary."""
args = {}
valid_keys = [
'party', 'role', 'importance', 'addresses', 'contacts', 'mentions'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Parties: ' +
', '.join(bad_keys))
if 'party' in _dict:
args['party'] = _dict.get('party')
if 'role' in _dict:
args['role'] = _dict.get('role')
if 'importance' in _dict:
args['importance'] = _dict.get('importance')
if 'addresses' in _dict:
args['addresses'] = [
Address._from_dict(x) for x in (_dict.get('addresses'))
]
if 'contacts' in _dict:
args['contacts'] = [
Contact._from_dict(x) for x in (_dict.get('contacts'))
]
if 'mentions' in _dict:
args['mentions'] = [
Mention._from_dict(x) for x in (_dict.get('mentions'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Parties object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'party') and self.party is not None:
_dict['party'] = self.party
if hasattr(self, 'role') and self.role is not None:
_dict['role'] = self.role
if hasattr(self, 'importance') and self.importance is not None:
_dict['importance'] = self.importance
if hasattr(self, 'addresses') and self.addresses is not None:
_dict['addresses'] = [x._to_dict() for x in self.addresses]
if hasattr(self, 'contacts') and self.contacts is not None:
_dict['contacts'] = [x._to_dict() for x in self.contacts]
if hasattr(self, 'mentions') and self.mentions is not None:
_dict['mentions'] = [x._to_dict() for x in self.mentions]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Parties object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Parties') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Parties') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ImportanceEnum(Enum):
"""
A string that identifies the importance of the party.
"""
PRIMARY = "Primary"
UNKNOWN = "Unknown"
class PaymentTerms():
"""
The document's payment duration or durations.
:attr str confidence_level: (optional) The confidence level in the
identification of the payment term.
:attr str text: (optional) The payment term (duration).
:attr str text_normalized: (optional) The normalized form of the payment term,
which is listed as a string. This element is optional; it is returned only if
normalized text exists.
:attr Interpretation interpretation: (optional) The details of the normalized
text, if applicable. This element is optional; it is returned only if normalized
text exists.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
text_normalized: str = None,
interpretation: 'Interpretation' = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a PaymentTerms object.
:param str confidence_level: (optional) The confidence level in the
identification of the payment term.
:param str text: (optional) The payment term (duration).
:param str text_normalized: (optional) The normalized form of the payment
term, which is listed as a string. This element is optional; it is returned
only if normalized text exists.
:param Interpretation interpretation: (optional) The details of the
normalized text, if applicable. This element is optional; it is returned
only if normalized text exists.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.text_normalized = text_normalized
self.interpretation = interpretation
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'PaymentTerms':
"""Initialize a PaymentTerms object from a json dictionary."""
args = {}
valid_keys = [
'confidence_level', 'text', 'text_normalized', 'interpretation',
'provenance_ids', 'location'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class PaymentTerms: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'interpretation' in _dict:
args['interpretation'] = Interpretation._from_dict(
_dict.get('interpretation'))
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a PaymentTerms object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self, 'interpretation') and self.interpretation is not None:
_dict['interpretation'] = self.interpretation._to_dict()
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this PaymentTerms object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'PaymentTerms') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'PaymentTerms') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the payment term.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class RowHeaders():
"""
Row-level cells, each applicable as a header to other cells in the same row as itself,
of the current table.
:attr str cell_id: (optional) The unique ID of the cell in the current table.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The textual contents of this cell from the input
document without associated markup content.
:attr str text_normalized: (optional) If you provide customization input, the
normalized version of the cell text according to the customization; otherwise,
the same value as `text`.
:attr int row_index_begin: (optional) The `begin` index of this cell's `row`
location in the current table.
:attr int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:attr int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:attr int column_index_end: (optional) The `end` index of this cell's `column`
location in the current table.
"""
def __init__(self,
*,
cell_id: str = None,
location: 'Location' = None,
text: str = None,
text_normalized: str = None,
row_index_begin: int = None,
row_index_end: int = None,
column_index_begin: int = None,
column_index_end: int = None) -> None:
"""
Initialize a RowHeaders object.
:param str cell_id: (optional) The unique ID of the cell in the current
table.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The textual contents of this cell from the
input document without associated markup content.
:param str text_normalized: (optional) If you provide customization input,
the normalized version of the cell text according to the customization;
otherwise, the same value as `text`.
:param int row_index_begin: (optional) The `begin` index of this cell's
`row` location in the current table.
:param int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:param int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:param int column_index_end: (optional) The `end` index of this cell's
`column` location in the current table.
"""
self.cell_id = cell_id
self.location = location
self.text = text
self.text_normalized = text_normalized
self.row_index_begin = row_index_begin
self.row_index_end = row_index_end
self.column_index_begin = column_index_begin
self.column_index_end = column_index_end
@classmethod
def from_dict(cls, _dict: Dict) -> 'RowHeaders':
"""Initialize a RowHeaders object from a json dictionary."""
args = {}
valid_keys = [
'cell_id', 'location', 'text', 'text_normalized', 'row_index_begin',
'row_index_end', 'column_index_begin', 'column_index_end'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class RowHeaders: '
+ ', '.join(bad_keys))
if 'cell_id' in _dict:
args['cell_id'] = _dict.get('cell_id')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'row_index_begin' in _dict:
args['row_index_begin'] = _dict.get('row_index_begin')
if 'row_index_end' in _dict:
args['row_index_end'] = _dict.get('row_index_end')
if 'column_index_begin' in _dict:
args['column_index_begin'] = _dict.get('column_index_begin')
if 'column_index_end' in _dict:
args['column_index_end'] = _dict.get('column_index_end')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a RowHeaders object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'cell_id') and self.cell_id is not None:
_dict['cell_id'] = self.cell_id
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self,
'row_index_begin') and self.row_index_begin is not None:
_dict['row_index_begin'] = self.row_index_begin
if hasattr(self, 'row_index_end') and self.row_index_end is not None:
_dict['row_index_end'] = self.row_index_end
if hasattr(
self,
'column_index_begin') and self.column_index_begin is not None:
_dict['column_index_begin'] = self.column_index_begin
if hasattr(self,
'column_index_end') and self.column_index_end is not None:
_dict['column_index_end'] = self.column_index_end
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this RowHeaders object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'RowHeaders') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'RowHeaders') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class SectionTitle():
"""
The table's section title, if identified.
:attr str text: (optional) The text of the section title, if identified.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self, *, text: str = None,
location: 'Location' = None) -> None:
"""
Initialize a SectionTitle object.
:param str text: (optional) The text of the section title, if identified.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.text = text
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'SectionTitle':
"""Initialize a SectionTitle object from a json dictionary."""
args = {}
valid_keys = ['text', 'location']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class SectionTitle: '
+ ', '.join(bad_keys))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a SectionTitle object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this SectionTitle object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'SectionTitle') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'SectionTitle') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class SectionTitles():
"""
An array containing one object per section or subsection detected in the input
document. Sections and subsections are not nested; instead, they are flattened out and
can be placed back in order by using the `begin` and `end` values of the element and
the `level` value of the section.
:attr str text: (optional) The text of the section title, if identified.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr int level: (optional) An integer indicating the level at which the section
is located in the input document. For example, `1` represents a top-level
section, `2` represents a subsection within the level `1` section, and so forth.
:attr List[ElementLocations] element_locations: (optional) An array of
`location` objects that lists the locations of detected section titles.
"""
def __init__(self,
*,
text: str = None,
location: 'Location' = None,
level: int = None,
element_locations: List['ElementLocations'] = None) -> None:
"""
Initialize a SectionTitles object.
:param str text: (optional) The text of the section title, if identified.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param int level: (optional) An integer indicating the level at which the
section is located in the input document. For example, `1` represents a
top-level section, `2` represents a subsection within the level `1`
section, and so forth.
:param List[ElementLocations] element_locations: (optional) An array of
`location` objects that lists the locations of detected section titles.
"""
self.text = text
self.location = location
self.level = level
self.element_locations = element_locations
@classmethod
def from_dict(cls, _dict: Dict) -> 'SectionTitles':
"""Initialize a SectionTitles object from a json dictionary."""
args = {}
valid_keys = ['text', 'location', 'level', 'element_locations']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class SectionTitles: '
+ ', '.join(bad_keys))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'level' in _dict:
args['level'] = _dict.get('level')
if 'element_locations' in _dict:
args['element_locations'] = [
ElementLocations._from_dict(x)
for x in (_dict.get('element_locations'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a SectionTitles object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'level') and self.level is not None:
_dict['level'] = self.level
if hasattr(self,
'element_locations') and self.element_locations is not None:
_dict['element_locations'] = [
x._to_dict() for x in self.element_locations
]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this SectionTitles object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'SectionTitles') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'SectionTitles') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ShortDoc():
"""
Brief information about the input document.
:attr str title: (optional) The title of the input document, if identified.
:attr str hash: (optional) The MD5 hash of the input document.
"""
def __init__(self, *, title: str = None, hash: str = None) -> None:
"""
Initialize a ShortDoc object.
:param str title: (optional) The title of the input document, if
identified.
:param str hash: (optional) The MD5 hash of the input document.
"""
self.title = title
self.hash = hash
@classmethod
def from_dict(cls, _dict: Dict) -> 'ShortDoc':
"""Initialize a ShortDoc object from a json dictionary."""
args = {}
valid_keys = ['title', 'hash']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class ShortDoc: '
+ ', '.join(bad_keys))
if 'title' in _dict:
args['title'] = _dict.get('title')
if 'hash' in _dict:
args['hash'] = _dict.get('hash')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ShortDoc object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'title') and self.title is not None:
_dict['title'] = self.title
if hasattr(self, 'hash') and self.hash is not None:
_dict['hash'] = self.hash
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ShortDoc object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'ShortDoc') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'ShortDoc') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class TableHeaders():
"""
The contents of the current table's header.
:attr str cell_id: (optional) The unique ID of the cell in the current table.
:attr object location: (optional) The location of the table header cell in the
current table as defined by its `begin` and `end` offsets, respectfully, in the
input document.
:attr str text: (optional) The textual contents of the cell from the input
document without associated markup content.
:attr int row_index_begin: (optional) The `begin` index of this cell's `row`
location in the current table.
:attr int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:attr int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:attr int column_index_end: (optional) The `end` index of this cell's `column`
location in the current table.
"""
def __init__(self,
*,
cell_id: str = None,
location: object = None,
text: str = None,
row_index_begin: int = None,
row_index_end: int = None,
column_index_begin: int = None,
column_index_end: int = None) -> None:
"""
Initialize a TableHeaders object.
:param str cell_id: (optional) The unique ID of the cell in the current
table.
:param object location: (optional) The location of the table header cell in
the current table as defined by its `begin` and `end` offsets,
respectfully, in the input document.
:param str text: (optional) The textual contents of the cell from the input
document without associated markup content.
:param int row_index_begin: (optional) The `begin` index of this cell's
`row` location in the current table.
:param int row_index_end: (optional) The `end` index of this cell's `row`
location in the current table.
:param int column_index_begin: (optional) The `begin` index of this cell's
`column` location in the current table.
:param int column_index_end: (optional) The `end` index of this cell's
`column` location in the current table.
"""
self.cell_id = cell_id
self.location = location
self.text = text
self.row_index_begin = row_index_begin
self.row_index_end = row_index_end
self.column_index_begin = column_index_begin
self.column_index_end = column_index_end
@classmethod
def from_dict(cls, _dict: Dict) -> 'TableHeaders':
"""Initialize a TableHeaders object from a json dictionary."""
args = {}
valid_keys = [
'cell_id', 'location', 'text', 'row_index_begin', 'row_index_end',
'column_index_begin', 'column_index_end'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class TableHeaders: '
+ ', '.join(bad_keys))
if 'cell_id' in _dict:
args['cell_id'] = _dict.get('cell_id')
if 'location' in _dict:
args['location'] = _dict.get('location')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'row_index_begin' in _dict:
args['row_index_begin'] = _dict.get('row_index_begin')
if 'row_index_end' in _dict:
args['row_index_end'] = _dict.get('row_index_end')
if 'column_index_begin' in _dict:
args['column_index_begin'] = _dict.get('column_index_begin')
if 'column_index_end' in _dict:
args['column_index_end'] = _dict.get('column_index_end')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a TableHeaders object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'cell_id') and self.cell_id is not None:
_dict['cell_id'] = self.cell_id
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'row_index_begin') and self.row_index_begin is not None:
_dict['row_index_begin'] = self.row_index_begin
if hasattr(self, 'row_index_end') and self.row_index_end is not None:
_dict['row_index_end'] = self.row_index_end
if hasattr(
self,
'column_index_begin') and self.column_index_begin is not None:
_dict['column_index_begin'] = self.column_index_begin
if hasattr(self,
'column_index_end') and self.column_index_end is not None:
_dict['column_index_end'] = self.column_index_end
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this TableHeaders object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'TableHeaders') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'TableHeaders') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class TableReturn():
"""
The analysis of the document's tables.
:attr DocInfo document: (optional) Information about the parsed input document.
:attr str model_id: (optional) The ID of the model used to extract the table
contents. The value for table extraction is `tables`.
:attr str model_version: (optional) The version of the `tables` model ID.
:attr List[Tables] tables: (optional) Definitions of the tables identified in
the input document.
"""
def __init__(self,
*,
document: 'DocInfo' = None,
model_id: str = None,
model_version: str = None,
tables: List['Tables'] = None) -> None:
"""
Initialize a TableReturn object.
:param DocInfo document: (optional) Information about the parsed input
document.
:param str model_id: (optional) The ID of the model used to extract the
table contents. The value for table extraction is `tables`.
:param str model_version: (optional) The version of the `tables` model ID.
:param List[Tables] tables: (optional) Definitions of the tables identified
in the input document.
"""
self.document = document
self.model_id = model_id
self.model_version = model_version
self.tables = tables
@classmethod
def from_dict(cls, _dict: Dict) -> 'TableReturn':
"""Initialize a TableReturn object from a json dictionary."""
args = {}
valid_keys = ['document', 'model_id', 'model_version', 'tables']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class TableReturn: '
+ ', '.join(bad_keys))
if 'document' in _dict:
args['document'] = DocInfo._from_dict(_dict.get('document'))
if 'model_id' in _dict:
args['model_id'] = _dict.get('model_id')
if 'model_version' in _dict:
args['model_version'] = _dict.get('model_version')
if 'tables' in _dict:
args['tables'] = [
Tables._from_dict(x) for x in (_dict.get('tables'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a TableReturn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document') and self.document is not None:
_dict['document'] = self.document._to_dict()
if hasattr(self, 'model_id') and self.model_id is not None:
_dict['model_id'] = self.model_id
if hasattr(self, 'model_version') and self.model_version is not None:
_dict['model_version'] = self.model_version
if hasattr(self, 'tables') and self.tables is not None:
_dict['tables'] = [x._to_dict() for x in self.tables]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this TableReturn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'TableReturn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'TableReturn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class TableTitle():
"""
If identified, the title or caption of the current table of the form `Table x.: ...`.
Empty when no title is identified. When exposed, the `title` is also excluded from the
`contexts` array of the same table.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The text of the identified table title or caption.
"""
def __init__(self, *, location: 'Location' = None,
text: str = None) -> None:
"""
Initialize a TableTitle object.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The text of the identified table title or
caption.
"""
self.location = location
self.text = text
@classmethod
def from_dict(cls, _dict: Dict) -> 'TableTitle':
"""Initialize a TableTitle object from a json dictionary."""
args = {}
valid_keys = ['location', 'text']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class TableTitle: '
+ ', '.join(bad_keys))
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a TableTitle object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this TableTitle object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'TableTitle') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'TableTitle') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class Tables():
"""
The contents of the tables extracted from a document.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The textual contents of the current table from the
input document without associated markup content.
:attr SectionTitle section_title: (optional) The table's section title, if
identified.
:attr TableTitle title: (optional) If identified, the title or caption of the
current table of the form `Table x.: ...`. Empty when no title is identified.
When exposed, the `title` is also excluded from the `contexts` array of the same
table.
:attr List[TableHeaders] table_headers: (optional) An array of table-level cells
that apply as headers to all the other cells in the current table.
:attr List[RowHeaders] row_headers: (optional) An array of row-level cells, each
applicable as a header to other cells in the same row as itself, of the current
table.
:attr List[ColumnHeaders] column_headers: (optional) An array of column-level
cells, each applicable as a header to other cells in the same column as itself,
of the current table.
:attr List[BodyCells] body_cells: (optional) An array of cells that are neither
table header nor column header nor row header cells, of the current table with
corresponding row and column header associations.
:attr List[Contexts] contexts: (optional) An array of objects that list text
that is related to the table contents and that precedes or follows the current
table.
:attr List[KeyValuePair] key_value_pairs: (optional) An array of key-value pairs
identified in the current table.
"""
def __init__(self,
*,
location: 'Location' = None,
text: str = None,
section_title: 'SectionTitle' = None,
title: 'TableTitle' = None,
table_headers: List['TableHeaders'] = None,
row_headers: List['RowHeaders'] = None,
column_headers: List['ColumnHeaders'] = None,
body_cells: List['BodyCells'] = None,
contexts: List['Contexts'] = None,
key_value_pairs: List['KeyValuePair'] = None) -> None:
"""
Initialize a Tables object.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The textual contents of the current table from
the input document without associated markup content.
:param SectionTitle section_title: (optional) The table's section title, if
identified.
:param TableTitle title: (optional) If identified, the title or caption of
the current table of the form `Table x.: ...`. Empty when no title is
identified. When exposed, the `title` is also excluded from the `contexts`
array of the same table.
:param List[TableHeaders] table_headers: (optional) An array of table-level
cells that apply as headers to all the other cells in the current table.
:param List[RowHeaders] row_headers: (optional) An array of row-level
cells, each applicable as a header to other cells in the same row as
itself, of the current table.
:param List[ColumnHeaders] column_headers: (optional) An array of
column-level cells, each applicable as a header to other cells in the same
column as itself, of the current table.
:param List[BodyCells] body_cells: (optional) An array of cells that are
neither table header nor column header nor row header cells, of the current
table with corresponding row and column header associations.
:param List[Contexts] contexts: (optional) An array of objects that list
text that is related to the table contents and that precedes or follows the
current table.
:param List[KeyValuePair] key_value_pairs: (optional) An array of key-value
pairs identified in the current table.
"""
self.location = location
self.text = text
self.section_title = section_title
self.title = title
self.table_headers = table_headers
self.row_headers = row_headers
self.column_headers = column_headers
self.body_cells = body_cells
self.contexts = contexts
self.key_value_pairs = key_value_pairs
@classmethod
def from_dict(cls, _dict: Dict) -> 'Tables':
"""Initialize a Tables object from a json dictionary."""
args = {}
valid_keys = [
'location', 'text', 'section_title', 'title', 'table_headers',
'row_headers', 'column_headers', 'body_cells', 'contexts',
'key_value_pairs'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Tables: ' +
', '.join(bad_keys))
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'section_title' in _dict:
args['section_title'] = SectionTitle._from_dict(
_dict.get('section_title'))
if 'title' in _dict:
args['title'] = TableTitle._from_dict(_dict.get('title'))
if 'table_headers' in _dict:
args['table_headers'] = [
TableHeaders._from_dict(x) for x in (_dict.get('table_headers'))
]
if 'row_headers' in _dict:
args['row_headers'] = [
RowHeaders._from_dict(x) for x in (_dict.get('row_headers'))
]
if 'column_headers' in _dict:
args['column_headers'] = [
ColumnHeaders._from_dict(x)
for x in (_dict.get('column_headers'))
]
if 'body_cells' in _dict:
args['body_cells'] = [
BodyCells._from_dict(x) for x in (_dict.get('body_cells'))
]
if 'contexts' in _dict:
args['contexts'] = [
Contexts._from_dict(x) for x in (_dict.get('contexts'))
]
if 'key_value_pairs' in _dict:
args['key_value_pairs'] = [
KeyValuePair._from_dict(x)
for x in (_dict.get('key_value_pairs'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Tables object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'section_title') and self.section_title is not None:
_dict['section_title'] = self.section_title._to_dict()
if hasattr(self, 'title') and self.title is not None:
_dict['title'] = self.title._to_dict()
if hasattr(self, 'table_headers') and self.table_headers is not None:
_dict['table_headers'] = [x._to_dict() for x in self.table_headers]
if hasattr(self, 'row_headers') and self.row_headers is not None:
_dict['row_headers'] = [x._to_dict() for x in self.row_headers]
if hasattr(self, 'column_headers') and self.column_headers is not None:
_dict['column_headers'] = [
x._to_dict() for x in self.column_headers
]
if hasattr(self, 'body_cells') and self.body_cells is not None:
_dict['body_cells'] = [x._to_dict() for x in self.body_cells]
if hasattr(self, 'contexts') and self.contexts is not None:
_dict['contexts'] = [x._to_dict() for x in self.contexts]
if hasattr(self,
'key_value_pairs') and self.key_value_pairs is not None:
_dict['key_value_pairs'] = [
x._to_dict() for x in self.key_value_pairs
]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Tables object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Tables') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Tables') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class TerminationDates():
"""
Termination dates identified in the input document.
:attr str confidence_level: (optional) The confidence level in the
identification of the termination date.
:attr str text: (optional) The termination date.
:attr str text_normalized: (optional) The normalized form of the termination
date, which is listed as a string. This element is optional; it is returned only
if normalized text exists.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
def __init__(self,
*,
confidence_level: str = None,
text: str = None,
text_normalized: str = None,
provenance_ids: List[str] = None,
location: 'Location' = None) -> None:
"""
Initialize a TerminationDates object.
:param str confidence_level: (optional) The confidence level in the
identification of the termination date.
:param str text: (optional) The termination date.
:param str text_normalized: (optional) The normalized form of the
termination date, which is listed as a string. This element is optional; it
is returned only if normalized text exists.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
"""
self.confidence_level = confidence_level
self.text = text
self.text_normalized = text_normalized
self.provenance_ids = provenance_ids
self.location = location
@classmethod
def from_dict(cls, _dict: Dict) -> 'TerminationDates':
"""Initialize a TerminationDates object from a json dictionary."""
args = {}
valid_keys = [
'confidence_level', 'text', 'text_normalized', 'provenance_ids',
'location'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class TerminationDates: '
+ ', '.join(bad_keys))
if 'confidence_level' in _dict:
args['confidence_level'] = _dict.get('confidence_level')
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'text_normalized' in _dict:
args['text_normalized'] = _dict.get('text_normalized')
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a TerminationDates object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'confidence_level') and self.confidence_level is not None:
_dict['confidence_level'] = self.confidence_level
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self,
'text_normalized') and self.text_normalized is not None:
_dict['text_normalized'] = self.text_normalized
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this TerminationDates object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'TerminationDates') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'TerminationDates') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ConfidenceLevelEnum(Enum):
"""
The confidence level in the identification of the termination date.
"""
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"
class TypeLabel():
"""
Identification of a specific type.
:attr Label label: (optional) A pair of `nature` and `party` objects. The
`nature` object identifies the effect of the element on the identified `party`,
and the `party` object identifies the affected party.
:attr List[str] provenance_ids: (optional) Hashed values that you can send to
IBM to provide feedback or receive support.
"""
def __init__(self,
*,
label: 'Label' = None,
provenance_ids: List[str] = None) -> None:
"""
Initialize a TypeLabel object.
:param Label label: (optional) A pair of `nature` and `party` objects. The
`nature` object identifies the effect of the element on the identified
`party`, and the `party` object identifies the affected party.
:param List[str] provenance_ids: (optional) Hashed values that you can send
to IBM to provide feedback or receive support.
"""
self.label = label
self.provenance_ids = provenance_ids
@classmethod
def from_dict(cls, _dict: Dict) -> 'TypeLabel':
"""Initialize a TypeLabel object from a json dictionary."""
args = {}
valid_keys = ['label', 'provenance_ids']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class TypeLabel: '
+ ', '.join(bad_keys))
if 'label' in _dict:
args['label'] = Label._from_dict(_dict.get('label'))
if 'provenance_ids' in _dict:
args['provenance_ids'] = _dict.get('provenance_ids')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a TypeLabel object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'label') and self.label is not None:
_dict['label'] = self.label._to_dict()
if hasattr(self, 'provenance_ids') and self.provenance_ids is not None:
_dict['provenance_ids'] = self.provenance_ids
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this TypeLabel object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'TypeLabel') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'TypeLabel') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class TypeLabelComparison():
"""
Identification of a specific type.
:attr Label label: (optional) A pair of `nature` and `party` objects. The
`nature` object identifies the effect of the element on the identified `party`,
and the `party` object identifies the affected party.
"""
def __init__(self, *, label: 'Label' = None) -> None:
"""
Initialize a TypeLabelComparison object.
:param Label label: (optional) A pair of `nature` and `party` objects. The
`nature` object identifies the effect of the element on the identified
`party`, and the `party` object identifies the affected party.
"""
self.label = label
@classmethod
def from_dict(cls, _dict: Dict) -> 'TypeLabelComparison':
"""Initialize a TypeLabelComparison object from a json dictionary."""
args = {}
valid_keys = ['label']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class TypeLabelComparison: '
+ ', '.join(bad_keys))
if 'label' in _dict:
args['label'] = Label._from_dict(_dict.get('label'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a TypeLabelComparison object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'label') and self.label is not None:
_dict['label'] = self.label._to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this TypeLabelComparison object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'TypeLabelComparison') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'TypeLabelComparison') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class UnalignedElement():
"""
Element that does not align semantically between two compared documents.
:attr str document_label: (optional) The label assigned to the document by the
value of the `file_1_label` or `file_2_label` parameters on the **Compare two
documents** method.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The text of the element.
:attr List[TypeLabelComparison] types: (optional) Description of the action
specified by the element and whom it affects.
:attr List[CategoryComparison] categories: (optional) List of functional
categories into which the element falls; in other words, the subject matter of
the element.
:attr List[Attribute] attributes: (optional) List of document attributes.
"""
def __init__(self,
*,
document_label: str = None,
location: 'Location' = None,
text: str = None,
types: List['TypeLabelComparison'] = None,
categories: List['CategoryComparison'] = None,
attributes: List['Attribute'] = None) -> None:
"""
Initialize a UnalignedElement object.
:param str document_label: (optional) The label assigned to the document by
the value of the `file_1_label` or `file_2_label` parameters on the
**Compare two documents** method.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The text of the element.
:param List[TypeLabelComparison] types: (optional) Description of the
action specified by the element and whom it affects.
:param List[CategoryComparison] categories: (optional) List of functional
categories into which the element falls; in other words, the subject matter
of the element.
:param List[Attribute] attributes: (optional) List of document attributes.
"""
self.document_label = document_label
self.location = location
self.text = text
self.types = types
self.categories = categories
self.attributes = attributes
@classmethod
def from_dict(cls, _dict: Dict) -> 'UnalignedElement':
"""Initialize a UnalignedElement object from a json dictionary."""
args = {}
valid_keys = [
'document_label', 'location', 'text', 'types', 'categories',
'attributes'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class UnalignedElement: '
+ ', '.join(bad_keys))
if 'document_label' in _dict:
args['document_label'] = _dict.get('document_label')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
if 'types' in _dict:
args['types'] = [
TypeLabelComparison._from_dict(x) for x in (_dict.get('types'))
]
if 'categories' in _dict:
args['categories'] = [
CategoryComparison._from_dict(x)
for x in (_dict.get('categories'))
]
if 'attributes' in _dict:
args['attributes'] = [
Attribute._from_dict(x) for x in (_dict.get('attributes'))
]
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a UnalignedElement object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_label') and self.document_label is not None:
_dict['document_label'] = self.document_label
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
if hasattr(self, 'attributes') and self.attributes is not None:
_dict['attributes'] = [x._to_dict() for x in self.attributes]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this UnalignedElement object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'UnalignedElement') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'UnalignedElement') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class UpdatedLabelsIn():
"""
The updated labeling from the input document, accounting for the submitted feedback.
:attr List[TypeLabel] types: Description of the action specified by the element
and whom it affects.
:attr List[Category] categories: List of functional categories into which the
element falls; in other words, the subject matter of the element.
"""
def __init__(self, types: List['TypeLabel'],
categories: List['Category']) -> None:
"""
Initialize a UpdatedLabelsIn object.
:param List[TypeLabel] types: Description of the action specified by the
element and whom it affects.
:param List[Category] categories: List of functional categories into which
the element falls; in other words, the subject matter of the element.
"""
self.types = types
self.categories = categories
@classmethod
def from_dict(cls, _dict: Dict) -> 'UpdatedLabelsIn':
"""Initialize a UpdatedLabelsIn object from a json dictionary."""
args = {}
valid_keys = ['types', 'categories']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class UpdatedLabelsIn: '
+ ', '.join(bad_keys))
if 'types' in _dict:
args['types'] = [
TypeLabel._from_dict(x) for x in (_dict.get('types'))
]
else:
raise ValueError(
'Required property \'types\' not present in UpdatedLabelsIn JSON'
)
if 'categories' in _dict:
args['categories'] = [
Category._from_dict(x) for x in (_dict.get('categories'))
]
else:
raise ValueError(
'Required property \'categories\' not present in UpdatedLabelsIn JSON'
)
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a UpdatedLabelsIn object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this UpdatedLabelsIn object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'UpdatedLabelsIn') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'UpdatedLabelsIn') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class UpdatedLabelsOut():
"""
The updated labeling from the input document, accounting for the submitted feedback.
:attr List[TypeLabel] types: (optional) Description of the action specified by
the element and whom it affects.
:attr List[Category] categories: (optional) List of functional categories into
which the element falls; in other words, the subject matter of the element.
:attr str modification: (optional) The type of modification the feedback entry
in the `updated_labels` array. Possible values are `added`, `not_changed`, and
`removed`.
"""
def __init__(self,
*,
types: List['TypeLabel'] = None,
categories: List['Category'] = None,
modification: str = None) -> None:
"""
Initialize a UpdatedLabelsOut object.
:param List[TypeLabel] types: (optional) Description of the action
specified by the element and whom it affects.
:param List[Category] categories: (optional) List of functional categories
into which the element falls; in other words, the subject matter of the
element.
:param str modification: (optional) The type of modification the feedback
entry in the `updated_labels` array. Possible values are `added`,
`not_changed`, and `removed`.
"""
self.types = types
self.categories = categories
self.modification = modification
@classmethod
def from_dict(cls, _dict: Dict) -> 'UpdatedLabelsOut':
"""Initialize a UpdatedLabelsOut object from a json dictionary."""
args = {}
valid_keys = ['types', 'categories', 'modification']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class UpdatedLabelsOut: '
+ ', '.join(bad_keys))
if 'types' in _dict:
args['types'] = [
TypeLabel._from_dict(x) for x in (_dict.get('types'))
]
if 'categories' in _dict:
args['categories'] = [
Category._from_dict(x) for x in (_dict.get('categories'))
]
if 'modification' in _dict:
args['modification'] = _dict.get('modification')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a UpdatedLabelsOut object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'types') and self.types is not None:
_dict['types'] = [x._to_dict() for x in self.types]
if hasattr(self, 'categories') and self.categories is not None:
_dict['categories'] = [x._to_dict() for x in self.categories]
if hasattr(self, 'modification') and self.modification is not None:
_dict['modification'] = self.modification
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this UpdatedLabelsOut object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'UpdatedLabelsOut') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'UpdatedLabelsOut') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
class ModificationEnum(Enum):
"""
The type of modification the feedback entry in the `updated_labels` array.
Possible values are `added`, `not_changed`, and `removed`.
"""
ADDED = "added"
NOT_CHANGED = "not_changed"
REMOVED = "removed"
class Value():
"""
A value in a key-value pair.
:attr str cell_id: (optional) The unique ID of the value in the table.
:attr Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:attr str text: (optional) The text content of the table cell without HTML
markup.
"""
def __init__(self,
*,
cell_id: str = None,
location: 'Location' = None,
text: str = None) -> None:
"""
Initialize a Value object.
:param str cell_id: (optional) The unique ID of the value in the table.
:param Location location: (optional) The numeric location of the identified
element in the document, represented with two integers labeled `begin` and
`end`.
:param str text: (optional) The text content of the table cell without HTML
markup.
"""
self.cell_id = cell_id
self.location = location
self.text = text
@classmethod
def from_dict(cls, _dict: Dict) -> 'Value':
"""Initialize a Value object from a json dictionary."""
args = {}
valid_keys = ['cell_id', 'location', 'text']
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
raise ValueError(
'Unrecognized keys detected in dictionary for class Value: ' +
', '.join(bad_keys))
if 'cell_id' in _dict:
args['cell_id'] = _dict.get('cell_id')
if 'location' in _dict:
args['location'] = Location._from_dict(_dict.get('location'))
if 'text' in _dict:
args['text'] = _dict.get('text')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a Value object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'cell_id') and self.cell_id is not None:
_dict['cell_id'] = self.cell_id
if hasattr(self, 'location') and self.location is not None:
_dict['location'] = self.location._to_dict()
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Value object."""
return json.dumps(self._to_dict(), indent=2)
def __eq__(self, other: 'Value') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other: 'Value') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
|
"Return a `str` version of this KeyValuePair object."""
return json.dumps(self._to_dict(), indent=2)
|
_deployments_operations.py
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
class DeploymentsOperations(object):
"""DeploymentsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.appplatform.v2022_01_01_preview.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = _models
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def get(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> "_models.DeploymentResource"
"""Get a Deployment and its properties.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DeploymentResource, or the result of cls(response)
:rtype: ~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def _create_or_update_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
deployment_resource, # type: "_models.DeploymentResource"
**kwargs # type: Any
):
# type: (...) -> "_models.DeploymentResource"
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(deployment_resource, 'DeploymentResource')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if response.status_code == 201:
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def begin_create_or_update(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
deployment_resource, # type: "_models.DeploymentResource"
**kwargs # type: Any
):
# type: (...) -> LROPoller["_models.DeploymentResource"]
"""Create a new Deployment or update an exiting Deployment.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:param deployment_resource: Parameters for the create or update operation.
:type deployment_resource: ~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResource
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either DeploymentResource or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
deployment_resource=deployment_resource,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def _delete_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def begin_delete(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Operation to delete a Deployment.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def _update_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
deployment_resource, # type: "_models.DeploymentResource"
**kwargs # type: Any
):
# type: (...) -> "_models.DeploymentResource"
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(deployment_resource, 'DeploymentResource')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def begin_update(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
deployment_resource, # type: "_models.DeploymentResource"
**kwargs # type: Any
):
# type: (...) -> LROPoller["_models.DeploymentResource"]
"""Operation to update an exiting Deployment.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:param deployment_resource: Parameters for the update operation.
:type deployment_resource: ~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResource
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either DeploymentResource or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._update_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
deployment_resource=deployment_resource,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('DeploymentResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore
def list(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
version=None, # type: Optional[List[str]]
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.DeploymentResourceCollection"]
"""Handles requests to list all resources in an App.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param version: Version of the deployments to be listed.
:type version: list[str]
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DeploymentResourceCollection or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResourceCollection]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResourceCollection"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
if version is not None:
query_parameters['version'] = [self._serialize.query("version", q, 'str') if q is not None else '' for q in version]
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('DeploymentResourceCollection', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments'} # type: ignore
def list_for_cluster(
self,
resource_group_name, # type: str
service_name, # type: str
version=None, # type: Optional[List[str]]
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.DeploymentResourceCollection"]
"""List deployments for a certain service.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param version: Version of the deployments to be listed.
:type version: list[str]
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DeploymentResourceCollection or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2022_01_01_preview.models.DeploymentResourceCollection]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResourceCollection"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list_for_cluster.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
if version is not None:
query_parameters['version'] = [self._serialize.query("version", q, 'str') if q is not None else '' for q in version]
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
def
|
(pipeline_response):
deserialized = self._deserialize('DeploymentResourceCollection', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(
get_next, extract_data
)
list_for_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments'} # type: ignore
def _start_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
# Construct URL
url = self._start_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} # type: ignore
def begin_start(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Start the deployment.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._start_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} # type: ignore
def _stop_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
# Construct URL
url = self._stop_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} # type: ignore
def begin_stop(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Stop the deployment.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._stop_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} # type: ignore
def _restart_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
# Construct URL
url = self._restart_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} # type: ignore
def begin_restart(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Restart the deployment.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._restart_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} # type: ignore
def get_log_file_url(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
**kwargs # type: Any
):
# type: (...) -> Optional["_models.LogFileUrlResponse"]
"""Get deployment log file URL.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: LogFileUrlResponse, or the result of cls(response)
:rtype: ~azure.mgmt.appplatform.v2022_01_01_preview.models.LogFileUrlResponse or None
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.LogFileUrlResponse"]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
accept = "application/json"
# Construct URL
url = self.get_log_file_url.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('LogFileUrlResponse', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get_log_file_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl'} # type: ignore
def _generate_heap_dump_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
diagnostic_parameters, # type: "_models.DiagnosticParameters"
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self._generate_heap_dump_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(diagnostic_parameters, 'DiagnosticParameters')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_generate_heap_dump_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump'} # type: ignore
def begin_generate_heap_dump(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
diagnostic_parameters, # type: "_models.DiagnosticParameters"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Generate Heap Dump.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:param diagnostic_parameters: Parameters for the diagnostic operation.
:type diagnostic_parameters: ~azure.mgmt.appplatform.v2022_01_01_preview.models.DiagnosticParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._generate_heap_dump_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
diagnostic_parameters=diagnostic_parameters,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_generate_heap_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump'} # type: ignore
def _generate_thread_dump_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
diagnostic_parameters, # type: "_models.DiagnosticParameters"
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self._generate_thread_dump_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(diagnostic_parameters, 'DiagnosticParameters')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_generate_thread_dump_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump'} # type: ignore
def begin_generate_thread_dump(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
diagnostic_parameters, # type: "_models.DiagnosticParameters"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Generate Thread Dump.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:param diagnostic_parameters: Parameters for the diagnostic operation.
:type diagnostic_parameters: ~azure.mgmt.appplatform.v2022_01_01_preview.models.DiagnosticParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._generate_thread_dump_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
diagnostic_parameters=diagnostic_parameters,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_generate_thread_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump'} # type: ignore
def _start_jfr_initial(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
diagnostic_parameters, # type: "_models.DiagnosticParameters"
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2022-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self._start_jfr_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(diagnostic_parameters, 'DiagnosticParameters')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_start_jfr_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/startJFR'} # type: ignore
def begin_start_jfr(
self,
resource_group_name, # type: str
service_name, # type: str
app_name, # type: str
deployment_name, # type: str
diagnostic_parameters, # type: "_models.DiagnosticParameters"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Start JFR.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal.
:type resource_group_name: str
:param service_name: The name of the Service resource.
:type service_name: str
:param app_name: The name of the App resource.
:type app_name: str
:param deployment_name: The name of the Deployment resource.
:type deployment_name: str
:param diagnostic_parameters: Parameters for the diagnostic operation.
:type diagnostic_parameters: ~azure.mgmt.appplatform.v2022_01_01_preview.models.DiagnosticParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._start_jfr_initial(
resource_group_name=resource_group_name,
service_name=service_name,
app_name=app_name,
deployment_name=deployment_name,
diagnostic_parameters=diagnostic_parameters,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'appName': self._serialize.url("app_name", app_name, 'str'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'),
}
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_start_jfr.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/startJFR'} # type: ignore
|
extract_data
|
role_test.go
|
// Copyright 2016 The etcd Authors
//
// 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.
package integration
import (
"testing"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
"golang.org/x/net/context"
)
func TestRoleError(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
defer clus.Terminate(t)
authapi := clientv3.NewAuth(clus.RandClient())
_, err := authapi.RoleAdd(context.TODO(), "test-role")
if err != nil
|
_, err = authapi.RoleAdd(context.TODO(), "test-role")
if err != rpctypes.ErrRoleAlreadyExist {
t.Fatalf("expected %v, got %v", rpctypes.ErrRoleAlreadyExist, err)
}
}
|
{
t.Fatal(err)
}
|
filter.rs
|
use crate::stream::{Action, Logic, LogicEvent, StreamContext};
pub struct Filter<F> {
filter: F,
}
impl<F> Filter<F> {
pub fn new<A>(filter: F) -> Self
where
F: FnMut(&A) -> bool,
{
Self { filter }
}
}
impl<A: Send, F: FnMut(&A) -> bool + Send> Logic<A, A> for Filter<F> {
type Ctl = ();
fn name(&self) -> &'static str {
"Filter"
}
fn
|
(
&mut self,
msg: LogicEvent<A, Self::Ctl>,
_: &mut StreamContext<A, A, Self::Ctl>,
) -> Action<A, Self::Ctl> {
match msg {
LogicEvent::Pushed(element) => {
if (self.filter)(&element) {
Action::Push(element)
} else {
Action::Pull
}
}
LogicEvent::Pulled => Action::Pull,
LogicEvent::Cancelled => Action::Cancel,
LogicEvent::Stopped => Action::Stop(None),
LogicEvent::Started => Action::None,
LogicEvent::Forwarded(()) => Action::None,
}
}
}
|
receive
|
config.ts
|
/** @fileoverview Config file parser */
import * as Either from 'fp-ts/lib/Either';
import { join, isAbsolute } from 'path';
import * as t from 'io-ts';
import { reporter } from 'io-ts-reporters';
import tls from 'tls';
import parseDatabaseUrl, { DatabaseConfig } from 'ts-parse-database-url';
const transformCodecProps = {
include: t.string,
/** @deprecated emitFileName is deprecated */
emitFileName: t.union([t.string, t.undefined]),
emitTemplate: t.union([t.string, t.undefined]),
};
const TSTransformCodec = t.type({
mode: t.literal('ts'),
...transformCodecProps,
});
const SQLTransformCodec = t.type({
mode: t.literal('sql'),
...transformCodecProps,
});
const TransformCodec = t.union([TSTransformCodec, SQLTransformCodec]);
export type TransformConfig = t.TypeOf<typeof TransformCodec>;
const configParser = t.type({
transforms: t.array(TransformCodec),
srcDir: t.string,
failOnError: t.union([t.boolean, t.undefined]),
camelCaseColumnNames: t.union([t.boolean, t.undefined]),
dbUrl: t.union([t.string, t.undefined]),
db: t.union([
t.type({
host: t.union([t.string, t.undefined]),
password: t.union([t.string, t.undefined]),
port: t.union([t.number, t.undefined]),
user: t.union([t.string, t.undefined]),
dbName: t.union([t.string, t.undefined]),
ssl: t.union([t.UnknownRecord, t.boolean, t.undefined]),
}),
t.undefined,
]),
});
export type IConfig = typeof configParser._O;
export interface ParsedConfig {
db: {
host: string;
user: string;
password: string | undefined;
dbName: string;
port: number;
ssl?: tls.ConnectionOptions | boolean;
};
failOnError: boolean;
camelCaseColumnNames: boolean;
transforms: IConfig['transforms'];
srcDir: IConfig['srcDir'];
}
function merge<T>(base: T, ...overrides: Partial<T>[]): T {
return overrides.reduce<T>(
(acc, o) =>
Object.entries(o).reduce(
(oAcc, [k, v]) => (v ? { ...oAcc, [k]: v } : oAcc),
acc,
),
{ ...base },
);
}
function
|
({
host,
password,
user,
port,
database,
}: DatabaseConfig) {
return {
host,
password,
user,
port,
dbName: database,
};
}
export function parseConfig(path: string): ParsedConfig {
const fullPath = isAbsolute(path) ? path : join(process.cwd(), path);
const configObject = require(fullPath);
const result = configParser.decode(configObject);
if (Either.isLeft(result)) {
const message = reporter(result);
throw new Error(message[0]);
}
const defaultDBConfig = {
host: '127.0.0.1',
user: 'postgres',
password: '',
dbName: 'postgres',
port: 5432,
};
const envDBConfig = {
host: process.env.PGHOST,
user: process.env.PGUSER,
password: process.env.PGPASSWORD,
dbName: process.env.PGDATABASE,
port: process.env.PGPORT ? Number(process.env.PGPORT) : undefined,
};
const {
db = defaultDBConfig,
dbUrl,
transforms,
srcDir,
failOnError,
camelCaseColumnNames,
} = configObject as IConfig;
const urlDBConfig = dbUrl
? convertParsedURLToDBConfig(parseDatabaseUrl(dbUrl))
: {};
if (transforms.some((tr) => !!tr.emitFileName)) {
// tslint:disable:no-console
console.log(
'Warning: Setting "emitFileName" is deprecated. Consider using "emitTemplate" instead.',
);
}
const finalDBConfig = merge(defaultDBConfig, db, urlDBConfig, envDBConfig);
return {
db: finalDBConfig,
transforms,
srcDir,
failOnError: failOnError ?? false,
camelCaseColumnNames: camelCaseColumnNames ?? false,
};
}
|
convertParsedURLToDBConfig
|
py_contextmanager.py
|
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import codecs
from contextlib import contextmanager
@contextmanager
def Open(filename, mode, encoding='utf-8'):
fp = codecs.open(filename, mode, encoding)
try:
yield fp
finally:
fp.close()
|
data = u"context汉字测试"
with Open('data.txt', 'w') as f:
f.write(data)
|
|
bad_default_shorthand_with_no_exports.ts
|
/**
* @fileoverview negative tests for the tsMigrationDefaultExportsShim
|
* Suppress expected errors for :test_files_compilation_test
* @suppress {checkTypes,visibility}
*/
// Default exports in JavaScript only make sense when the corresponding
// TypeScript has exactly one export.
goog.tsMigrationDefaultExportsShim('requires.exactly.one.export');
|
* transformation.
*
|
runtests_script.py
|
# -*- coding: utf-8 -*-
"""
This is the script that is actually frozen into an executable: simply executes
py.test main().
"""
if __name__ == "__main__":
import sys
|
import pytest
sys.exit(pytest.main())
|
|
0012_user_auth_type.py
|
# Generated by Django 2.2.4 on 2019-08-21 12:09
from django.db import migrations, models
class Migration(migrations.Migration):
|
dependencies = [("users", "0011_postgresql_auth_group_id_sequence")]
operations = [
migrations.AddField(
model_name="user",
name="auth_type",
field=models.CharField(default="default", max_length=64),
)
]
|
|
compat.rs
|
//! Compatibility between the `tokio::io` and `futures-io` versions of the
//! `AsyncRead` and `AsyncWrite` traits.
use futures_core::ready;
use pin_project_lite::pin_project;
use std::io;
use std::pin::Pin;
use std::task::{Context, Poll};
pin_project! {
/// A compatibility layer that allows conversion between the
/// `tokio::io` and `futures-io` `AsyncRead` and `AsyncWrite` traits.
#[derive(Copy, Clone, Debug)]
pub struct Compat<T> {
#[pin]
inner: T,
}
}
/// Extension trait that allows converting a type implementing
/// `futures_io::AsyncRead` to implement `tokio::io::AsyncRead`.
pub trait FuturesAsyncReadCompatExt: futures_io::AsyncRead {
/// Wraps `self` with a compatibility layer that implements
/// `tokio_io::AsyncWrite`.
fn compat(self) -> Compat<Self>
where
Self: Sized,
{
Compat::new(self)
}
}
impl<T: futures_io::AsyncRead> FuturesAsyncReadCompatExt for T {}
/// Extension trait that allows converting a type implementing
/// `futures_io::AsyncWrite` to implement `tokio::io::AsyncWrite`.
pub trait FuturesAsyncWriteCompatExt: futures_io::AsyncWrite {
/// Wraps `self` with a compatibility layer that implements
/// `tokio::io::AsyncWrite`.
fn compat_write(self) -> Compat<Self>
where
Self: Sized,
{
Compat::new(self)
}
}
impl<T: futures_io::AsyncWrite> FuturesAsyncWriteCompatExt for T {}
/// Extension trait that allows converting a type implementing
/// `tokio::io::AsyncRead` to implement `futures_io::AsyncRead`.
pub trait Tokio02AsyncReadCompatExt: tokio::io::AsyncRead {
/// Wraps `self` with a compatibility layer that implements
/// `futures_io::AsyncRead`.
fn compat(self) -> Compat<Self>
where
Self: Sized,
{
Compat::new(self)
}
}
impl<T: tokio::io::AsyncRead> Tokio02AsyncReadCompatExt for T {}
/// Extension trait that allows converting a type implementing
/// `tokio::io::AsyncWrite` to implement `futures_io::AsyncWrite`.
pub trait Tokio02AsyncWriteCompatExt: tokio::io::AsyncWrite {
/// Wraps `self` with a compatibility layer that implements
/// `futures_io::AsyncWrite`.
fn compat_write(self) -> Compat<Self>
where
Self: Sized,
{
Compat::new(self)
}
}
impl<T: tokio::io::AsyncWrite> Tokio02AsyncWriteCompatExt for T {}
// === impl Compat ===
impl<T> Compat<T> {
fn new(inner: T) -> Self {
Self { inner }
}
/// Get a reference to the `Future`, `Stream`, `AsyncRead`, or `AsyncWrite` object
/// contained within.
pub fn get_ref(&self) -> &T {
&self.inner
}
/// Get a mutable reference to the `Future`, `Stream`, `AsyncRead`, or `AsyncWrite` object
/// contained within.
pub fn get_mut(&mut self) -> &mut T {
&mut self.inner
}
/// Returns the wrapped item.
pub fn into_inner(self) -> T {
self.inner
}
}
impl<T> tokio::io::AsyncRead for Compat<T>
where
T: futures_io::AsyncRead,
{
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut tokio::io::ReadBuf<'_>,
) -> Poll<io::Result<()>>
|
}
impl<T> futures_io::AsyncRead for Compat<T>
where
T: tokio::io::AsyncRead,
{
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
slice: &mut [u8],
) -> Poll<io::Result<usize>> {
let mut buf = tokio::io::ReadBuf::new(slice);
ready!(tokio::io::AsyncRead::poll_read(
self.project().inner,
cx,
&mut buf
))?;
Poll::Ready(Ok(buf.filled().len()))
}
}
impl<T> tokio::io::AsyncBufRead for Compat<T>
where
T: futures_io::AsyncBufRead,
{
fn poll_fill_buf<'a>(
self: Pin<&'a mut Self>,
cx: &mut Context<'_>,
) -> Poll<io::Result<&'a [u8]>> {
futures_io::AsyncBufRead::poll_fill_buf(self.project().inner, cx)
}
fn consume(self: Pin<&mut Self>, amt: usize) {
futures_io::AsyncBufRead::consume(self.project().inner, amt)
}
}
impl<T> futures_io::AsyncBufRead for Compat<T>
where
T: tokio::io::AsyncBufRead,
{
fn poll_fill_buf<'a>(
self: Pin<&'a mut Self>,
cx: &mut Context<'_>,
) -> Poll<io::Result<&'a [u8]>> {
tokio::io::AsyncBufRead::poll_fill_buf(self.project().inner, cx)
}
fn consume(self: Pin<&mut Self>, amt: usize) {
tokio::io::AsyncBufRead::consume(self.project().inner, amt)
}
}
impl<T> tokio::io::AsyncWrite for Compat<T>
where
T: futures_io::AsyncWrite,
{
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<io::Result<usize>> {
futures_io::AsyncWrite::poll_write(self.project().inner, cx, buf)
}
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
futures_io::AsyncWrite::poll_flush(self.project().inner, cx)
}
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
futures_io::AsyncWrite::poll_close(self.project().inner, cx)
}
}
impl<T> futures_io::AsyncWrite for Compat<T>
where
T: tokio::io::AsyncWrite,
{
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<io::Result<usize>> {
tokio::io::AsyncWrite::poll_write(self.project().inner, cx, buf)
}
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
tokio::io::AsyncWrite::poll_flush(self.project().inner, cx)
}
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
tokio::io::AsyncWrite::poll_shutdown(self.project().inner, cx)
}
}
|
{
// We can't trust the inner type to not peak at the bytes,
// so we must defensively initialize the buffer.
let slice = buf.initialize_unfilled();
let n = ready!(futures_io::AsyncRead::poll_read(
self.project().inner,
cx,
slice
))?;
buf.advance(n);
Poll::Ready(Ok(()))
}
|
singlefile_test.go
|
package reader
import (
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"github.com/stretchr/testify/assert"
. "github.com/qiniu/logkit/reader/config"
. "github.com/qiniu/logkit/reader/test"
. "github.com/qiniu/logkit/utils/models"
utilsos "github.com/qiniu/logkit/utils/os"
)
//测试single file rotate的情况
func Test_singleFileRotate(t *testing.T) {
fileName := filepath.Join(os.TempDir(), "test.singleFile")
fileNameRotated := filepath.Join(os.TempDir(), "test.singleFile.rotated")
metaDir := filepath.Join(os.TempDir(), "rotates")
//create file & write file
CreateFile(fileName, "12345")
//create sf
meta, err := NewMeta(metaDir, metaDir, testlogpath, ModeFile, "", DefautFileRetention)
if err != nil {
t.Error(err)
}
sf, err := NewSingleFile(meta, fileName, WhenceOldest, false)
if err != nil {
t.Error(err)
}
absPath, err := filepath.Abs(fileName)
assert.NoError(t, err)
assert.Equal(t, absPath, sf.Source())
oldInode, err := utilsos.GetIdentifyIDByPath(absPath)
assert.NoError(t, err)
//rotate file(rename old file + create new file)
renameTestFile(fileName, fileNameRotated)
CreateFile(fileName, "67890")
//read file 正常读
p := make([]byte, 5)
n, err := sf.Read(p)
if err != nil {
t.Error(err)
}
assert.Equal(t, 5, n)
assert.Equal(t, "12345", string(p))
//应该遇到EOF,pfi被更新
n, err = sf.Read(p)
if err != nil {
t.Error(err)
}
newInode, err := utilsos.GetIdentifyIDByPath(fileName)
assert.NoError(t, err)
assert.NotEqual(t, newInode, oldInode)
assert.Equal(t, 5, n)
assert.Equal(t, "67890", string(p))
filedone, err := ioutil.ReadFile(sf.meta.DoneFile())
assert.NoError(t, err)
assert.True(t, strings.Contains(string(filedone), fileNameRotated))
}
//测试single file不rotate的情况
func Test_singleFileNotRotate(t *testing.T) {
fileName := os.TempDir() + "/test.singleFile"
metaDir := os.TempDir() + "/rotates"
//create file & write file
CreateFile(fileName, "12345")
defer DeleteFile(fileName)
//create sf
meta, err := NewMeta(metaDir, metaDir, testlogpath, ModeFile, "", DefautFileRetention)
if err != nil {
t.Error(err)
}
sf, err := NewSingleFile(meta, fileName, WhenceOldest, false)
if err != nil {
t.Error(err)
}
oldInode, err := utilsos.GetIdentifyIDByFile(sf.f)
assert.NoError(t, err)
//read file 正常读
p := make([]byte, 5)
n, err := sf.Read(p)
if err != nil {
t.Error(err)
}
assert.Equal(t, 5, n)
assert.Equal(t, "12345", string(p))
//应该遇到EOF,pfi没有被更新
n, err = sf.Read(p)
assert.Equal(t, io.EOF, err)
newInode, err := utilsos.GetIdentifyIDByFile(sf.f)
assert.NoError(t, err)
assert.Equal(t, newInode, oldInode)
//append文件
appendTestFile(fileName, "67890")
n, err = sf.Read(p)
if err != nil {
t.Error(err)
}
assert.Equal(t, 5, n)
assert.Equal(t, "67890", string(p))
}
func appendTestFile(fileName, content string) {
f, _ := os.OpenFile(fileName, os.O_APPEND|os.O_WRONLY, DefaultFileP
|
erm)
f.WriteString(content)
f.Sync()
f.Close()
}
func renameTestFile(from, to string) {
os.Rename(from, to)
}
|
|
fragments.js
|
const FluidImageFragment = `
fragment GatsbyImageSharpFluid_tracedSVG on ImageSharpFluid {
tracedSVG
aspectRatio
src
srcSet
sizes
}
`
|
module.exports.FluidImageFragment = FluidImageFragment
| |
build-script-helper.py
|
#!/usr/bin/env python
from __future__ import print_function
import argparse
from distutils import file_util
import os
import json
import platform
import shutil
import subprocess
import sys
import errno
if platform.system() == 'Darwin':
shared_lib_ext = '.dylib'
else:
shared_lib_ext = '.so'
macos_deployment_target = '10.15'
def error(message):
print("--- %s: error: %s" % (os.path.basename(sys.argv[0]), message))
sys.stdout.flush()
raise SystemExit(1)
# Tools constructed as a part of the a development build toolchain
driver_toolchain_tools = ['swift', 'swift-frontend', 'clang', 'swift-help',
'swift-autolink-extract', 'lldb']
def mkdir_p(path):
"""Create the given directory, if it does not exist."""
try:
os.makedirs(path)
except OSError as e:
# Ignore EEXIST, which may occur during a race condition.
if e.errno != errno.EEXIST:
raise
def call_output(cmd, cwd=None, stderr=False, verbose=False):
"""Calls a subprocess for its return data."""
if verbose:
print(' '.join(cmd))
try:
return subprocess.check_output(cmd, cwd=cwd, stderr=stderr, universal_newlines=True).strip()
except Exception as e:
if not verbose:
print(' '.join(cmd))
error(str(e))
def get_dispatch_cmake_arg(args):
"""Returns the CMake argument to the Dispatch configuration to use for bulding SwiftPM."""
dispatch_dir = os.path.join(args.dispatch_build_dir, 'cmake/modules')
return '-Ddispatch_DIR=' + dispatch_dir
def get_foundation_cmake_arg(args):
"""Returns the CMake argument to the Foundation configuration to use for bulding SwiftPM."""
foundation_dir = os.path.join(args.foundation_build_dir, 'cmake/modules')
return '-DFoundation_DIR=' + foundation_dir
def swiftpm(action, swift_exec, swiftpm_args, env=None):
cmd = [swift_exec, action] + swiftpm_args
print(' '.join(cmd))
subprocess.check_call(cmd, env=env)
def swiftpm_bin_path(swift_exec, swiftpm_args, env=None):
swiftpm_args = list(filter(lambda arg: arg != '-v' and arg != '--verbose', swiftpm_args))
cmd = [swift_exec, 'build', '--show-bin-path'] + swiftpm_args
print(' '.join(cmd))
return subprocess.check_output(cmd, env=env).strip()
def get_swiftpm_options(args):
swiftpm_args = [
'--package-path', args.package_path,
'--build-path', args.build_path,
'--configuration', args.configuration,
]
if args.verbose:
swiftpm_args += ['--verbose']
if platform.system() == 'Darwin':
swiftpm_args += [
# Relative library rpath for swift; will only be used when /usr/lib/swift
# is not available.
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/../lib/swift/macosx',
]
else:
swiftpm_args += [
# Dispatch headers
'-Xcxx', '-I', '-Xcxx',
os.path.join(args.toolchain, 'lib', 'swift'),
# For <Block.h>
'-Xcxx', '-I', '-Xcxx',
os.path.join(args.toolchain, 'lib', 'swift', 'Block'),
]
if 'ANDROID_DATA' in os.environ:
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
# SwiftPM will otherwise try to compile against GNU strerror_r on
# Android and fail.
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE',
]
else:
# Library rpath for swift, dispatch, Foundation, etc. when installing
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/linux',
]
return swiftpm_args
def install_binary(file, source_dir, install_dir, verbose):
print('Installing %s into: %s' % (file, install_dir))
cmd = ['rsync', '-a', os.path.join(source_dir.decode('UTF-8'), file), install_dir]
if verbose:
print(' '.join(cmd))
subprocess.check_call(cmd)
def delete_rpath(rpath, binary, verbose):
cmd = ['install_name_tool', '-delete_rpath', rpath, binary]
if verbose:
print(' '.join(cmd))
installToolProcess = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = installToolProcess.communicate()
if installToolProcess.returncode != 0:
print('install_name_tool -delete_rpath command failed, assume incremental build and proceed.')
if verbose:
print(stdout)
def add_rpath(rpath, binary, verbose):
cmd = ['install_name_tool', '-add_rpath', rpath, binary]
if verbose:
print(' '.join(cmd))
installToolProcess = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = installToolProcess.communicate()
if installToolProcess.returncode != 0:
print('install_name_tool -add_rpath command failed, assume incremental build and proceed.')
if verbose:
print(stdout)
def should_test_parallel():
if platform.system() == 'Linux':
distro = platform.linux_distribution()
if distro[0] != 'Ubuntu':
# Workaround hang in Process.run() that hasn't been tracked down yet.
return False
return True
def handle_invocation(args):
swiftpm_args = get_swiftpm_options(args)
toolchain_bin = os.path.join(args.toolchain, 'bin')
swift_exec = os.path.join(toolchain_bin, 'swift')
swiftc_exec = os.path.join(toolchain_bin, 'swiftc')
# Platform-specific targets for which we must build swift-driver
if args.cross_compile_hosts:
targets = args.cross_compile_hosts
elif platform.system() == 'Darwin':
targets = [get_build_target(swiftc_exec, args) + macos_deployment_target]
else:
targets = [get_build_target(swiftc_exec, args)]
env = os.environ
# Use local dependencies (i.e. checked out next to swift-driver).
if not args.no_local_deps:
env['SWIFTCI_USE_LOCAL_DEPS'] = "1"
if args.ninja_bin:
env['NINJA_BIN'] = args.ninja_bin
if args.sysroot:
env['SDKROOT'] = args.sysroot
if args.action == 'build':
build_using_cmake(args, toolchain_bin, args.build_path, targets)
elif args.action == 'clean':
print('Cleaning ' + args.build_path)
shutil.rmtree(args.build_path, ignore_errors=True)
elif args.action == 'test':
for tool in driver_toolchain_tools:
tool_path = os.path.join(toolchain_bin, tool)
if os.path.exists(tool_path):
env['SWIFT_DRIVER_' + tool.upper().replace('-','_') + '_EXEC'] = '%s' % (tool_path)
env['SWIFT_EXEC'] = '%sc' % (swift_exec)
test_args = swiftpm_args
test_args += ['-Xswiftc', '-enable-testing']
if should_test_parallel():
test_args += ['--parallel']
swiftpm('test', swift_exec, test_args, env)
elif args.action == 'install':
if platform.system() == 'Darwin':
build_using_cmake(args, toolchain_bin, args.build_path, targets)
install(args, args.build_path, targets)
else:
bin_path = swiftpm_bin_path(swift_exec, swiftpm_args, env)
swiftpm('build', swift_exec, swiftpm_args, env)
non_darwin_install(bin_path, args.toolchain, args.verbose)
else:
assert False, 'unknown action \'{}\''.format(args.action)
# Installation flow for non-darwin platforms, only copies over swift-driver and swift-help
# TODO: Unify CMake-based installation flow used on Darwin with this
def non_darwin_install(swiftpm_bin_path, toolchain, verbose):
toolchain_bin = os.path.join(toolchain, 'bin')
for exe in ['swift-driver', 'swift-help']:
install_binary(exe, swiftpm_bin_path, toolchain_bin, verbose)
def install(args, build_dir, targets):
# Construct and install universal swift-driver, swift-help executables
# and libSwiftDriver, libSwiftOptions libraries, along with their dependencies.
for prefix in args.install_prefixes:
install_swiftdriver(args, build_dir, prefix, targets)
def install_swiftdriver(args, build_dir, prefix, targets) :
install_bin = os.path.join(prefix, 'bin')
install_lib = os.path.join(prefix, 'lib', 'swift', 'macosx')
install_include = os.path.join(prefix, 'include', 'swift')
universal_dir = os.path.join(build_dir, 'universal-apple-macos%s' % macos_deployment_target)
bin_dir = os.path.join(universal_dir, 'bin')
lib_dir = os.path.join(universal_dir, 'lib')
mkdir_p(universal_dir)
mkdir_p(bin_dir)
mkdir_p(lib_dir)
# swift-driver and swift-help
install_executables(args, build_dir, bin_dir, install_bin, targets)
# libSwiftDriver and libSwiftDriverExecution and libSwiftOptions
install_libraries(args, build_dir, lib_dir, install_lib, targets)
# Binary Swift Modules:
# swift-driver: SwiftDriver.swiftmodule, SwiftOptions.swiftmodule
# TODO: swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed)
# swift-tools-support-core: TSCUtility.swiftmodule, TSCLibc.swiftmodule, TSCBasic.swiftmodule
install_binary_swift_modules(args, build_dir, install_lib, targets)
# Modulemaps for C Modules:
# TSCclibc
install_c_module_includes(args, build_dir, install_include)
# Install universal binaries for swift-driver and swift-help into the toolchain bin
# directory
def install_executables(args, build_dir, universal_bin_dir, toolchain_bin_dir, targets):
for exe in ['swift-driver', 'swift-help']:
# Fixup rpaths
for target in targets:
exe_bin_path = os.path.join(build_dir, target,
args.configuration, 'bin', exe)
driver_lib_dir_path = os.path.join(build_dir, target,
args.configuration, 'lib')
delete_rpath(driver_lib_dir_path, exe_bin_path, args.verbose)
for lib in ['swift-tools-support-core', 'swift-argument-parser']:
lib_dir_path = os.path.join(build_dir, target,
args.configuration, 'dependencies',
lib, 'lib')
delete_rpath(lib_dir_path, exe_bin_path, args.verbose)
# Point to the installation toolchain's lib directory
add_rpath('@executable_path/../lib/swift/macosx', exe_bin_path, args.verbose)
# Merge the multiple architecture binaries into a universal binary and install
output_bin_path = os.path.join(universal_bin_dir, exe)
lipo_cmd = ['lipo']
# Inputs
for target in targets:
input_bin_path = os.path.join(build_dir, target,
args.configuration, 'bin', exe)
lipo_cmd.append(input_bin_path)
lipo_cmd.extend(['-create', '-output', output_bin_path])
subprocess.check_call(lipo_cmd)
install_binary(exe, universal_bin_dir, toolchain_bin_dir, args.verbose)
# Install shared libraries for the driver and its dependencies into the toolchain
def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir, targets):
# Fixup the SwiftDriver rpath for libSwiftDriver and libSwiftDriverExecution
for lib in ['libSwiftDriver', 'libSwiftDriverExecution']:
for target in targets:
lib_path = os.path.join(build_dir, target,
args.configuration, 'lib', lib + shared_lib_ext)
driver_lib_dir_path = os.path.join(build_dir, target,
args.configuration, 'lib')
delete_rpath(driver_lib_dir_path, lib_path, args.verbose)
# Fixup the TSC and llbuild rpaths
driver_libs = map(lambda d: os.path.join('lib', d), ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution'])
tsc_libs = map(lambda d: os.path.join('dependencies', 'swift-tools-support-core', 'lib', d),
['libTSCBasic', 'libTSCLibc', 'libTSCUtility'])
for lib in driver_libs + tsc_libs:
for target in targets:
lib_path = os.path.join(build_dir, target,
args.configuration, lib + shared_lib_ext)
for dep in ['swift-tools-support-core', 'llbuild']:
lib_dir_path = os.path.join(build_dir, target,
args.configuration, 'dependencies',
dep, 'lib')
delete_rpath(lib_dir_path, lib_path, args.verbose)
# Install the libSwiftDriver and libSwiftOptions and libSwiftDriverExecution
# shared libraries into the toolchain lib
|
for lib in ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution']:
install_library(args, build_dir, package_subpath, lib,
universal_lib_dir, toolchain_lib_dir, 'swift-driver', targets)
# Instal the swift-tools-support core shared libraries into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-tools-support-core')
for lib in ['libTSCBasic', 'libTSCLibc', 'libTSCUtility']:
install_library(args, build_dir, package_subpath, lib,
universal_lib_dir, toolchain_lib_dir, 'swift-tools-support-core', targets)
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser')
install_library(args, build_dir, package_subpath, 'libArgumentParser',
universal_lib_dir, toolchain_lib_dir,'swift-argument-parser', targets)
package_subpath = os.path.join(args.configuration, 'dependencies', 'llbuild')
for lib in ['libllbuildSwift', 'libllbuild']:
install_library(args, build_dir, package_subpath, lib,
universal_lib_dir, toolchain_lib_dir,'llbuild', targets)
# Create a universal shared-library file and install it into the toolchain lib
def install_library(args, build_dir, package_subpath, lib_name,
universal_lib_dir, toolchain_lib_dir, package_name, targets):
shared_lib_file = lib_name + shared_lib_ext
output_dylib_path = os.path.join(universal_lib_dir, shared_lib_file)
lipo_cmd = ['lipo']
for target in targets:
input_lib_path = os.path.join(build_dir, target,
package_subpath, 'lib', shared_lib_file)
lipo_cmd.append(input_lib_path)
lipo_cmd.extend(['-create', '-output', output_dylib_path])
subprocess.check_call(lipo_cmd)
install_binary(shared_lib_file, universal_lib_dir, toolchain_lib_dir, args.verbose)
# Install binary .swiftmodule files for the driver and its dependencies into the toolchain lib
def install_binary_swift_modules(args, build_dir, toolchain_lib_dir, targets):
# The common subpath from a project's build directory to where its build products are found
product_subpath = 'swift'
# swift-driver
package_subpath = os.path.join(args.configuration, product_subpath)
for module in ['SwiftDriver', 'SwiftOptions']:
install_module(args, build_dir, package_subpath, toolchain_lib_dir, module, targets)
# swift-tools-support-core
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-tools-support-core',
product_subpath)
for module in ['TSCUtility', 'TSCLibc', 'TSCBasic']:
install_module(args, build_dir, package_subpath, toolchain_lib_dir, module, targets)
# swift-argument-parser
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser',
product_subpath)
install_module(args, build_dir, package_subpath, toolchain_lib_dir, 'ArgumentParser', targets)
# Install the modulemaps and headers of the driver's C module dependencies into the toolchain
# include directory
def install_c_module_includes(args, build_dir, toolchain_include_dir):
# TSCclibc C module's modulemap and header files
tscc_include_dir = os.path.join(os.path.dirname(args.package_path), 'swift-tools-support-core', 'Sources',
'TSCclibc', 'include')
install_include_artifacts(args, toolchain_include_dir, tscc_include_dir, 'TSCclibc')
def install_module(args, build_dir, package_subpath, toolchain_lib, module_name, targets):
toolchain_module_dir = os.path.join(toolchain_lib, module_name + '.swiftmodule')
mkdir_p(toolchain_module_dir)
for target in targets:
swift_dir = os.path.join(build_dir, target,
package_subpath)
for fileext in ['.swiftmodule', '.swiftdoc']:
install_binary(module_name + fileext, swift_dir, toolchain_module_dir, args.verbose)
os.rename(os.path.join(toolchain_module_dir, module_name + fileext),
os.path.join(toolchain_module_dir, target + fileext))
# Copy over the contents of a module's include directory contents (modulemap, headers, etc.)
def install_include_artifacts(args, toolchain_include_dir, src_include_dir, dst_module_name):
toolchain_module_include_dir = os.path.join(toolchain_include_dir, dst_module_name)
if os.path.exists(toolchain_module_include_dir):
shutil.rmtree(toolchain_module_include_dir, ignore_errors=True)
shutil.copytree(src_include_dir, toolchain_module_include_dir)
def build_using_cmake(args, toolchain_bin, build_dir, targets):
swiftc_exec = os.path.join(toolchain_bin, 'swiftc')
swift_flags = []
if args.configuration == 'debug':
swift_flags.append('-Onone')
swift_flags.append('-DDEBUG')
# Ensure we are not sharing the module cache with concurrent builds in CI
swift_flags.append('-module-cache-path "{}"'.format(os.path.join(build_dir, 'module-cache')))
base_cmake_flags = []
for target in targets:
swift_flags.append('-target %s' % target)
if platform.system() == 'Darwin':
base_cmake_flags.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=%s' % macos_deployment_target)
# Target directory for build artifacts
cmake_target_dir = os.path.join(build_dir, target)
driver_dir = os.path.join(cmake_target_dir, args.configuration)
dependencies_dir = os.path.join(driver_dir, 'dependencies')
# LLBuild
build_llbuild_using_cmake(args, target, swiftc_exec, dependencies_dir,
base_cmake_flags, swift_flags)
# TSC
build_tsc_using_cmake(args, target, swiftc_exec, dependencies_dir,
base_cmake_flags, swift_flags)
# Argument Parser
build_argument_parser_using_cmake(args, target, swiftc_exec, dependencies_dir,
base_cmake_flags, swift_flags)
# Yams
build_yams_using_cmake(args, target, swiftc_exec, dependencies_dir,
base_cmake_flags, swift_flags)
# SwiftDriver
build_swift_driver_using_cmake(args, target, swiftc_exec, driver_dir,
base_cmake_flags, swift_flags)
def build_llbuild_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags):
print('Building llbuild for target: %s' % target)
llbuild_source_dir = os.path.join(os.path.dirname(args.package_path), 'llbuild')
llbuild_build_dir = os.path.join(build_dir, 'llbuild')
llbuild_api_dir = os.path.join(llbuild_build_dir, '.cmake/api/v1/query')
mkdir_p(llbuild_api_dir)
subprocess.check_call(['touch', os.path.join(llbuild_api_dir, 'codemodel-v2')])
flags = [
'-DCMAKE_C_COMPILER:=clang',
'-DCMAKE_CXX_COMPILER:=clang++',
'-DCMAKE_CXX_FLAGS=-target %s' % target,
'-DLLBUILD_SUPPORT_BINDINGS:=Swift'
]
if platform.system() == 'Darwin':
flags.append('-DCMAKE_OSX_ARCHITECTURES=%s' % target.split('-')[0])
llbuild_cmake_flags = base_cmake_flags + flags
if args.sysroot:
llbuild_cmake_flags.append('-DSQLite3_INCLUDE_DIR=%s/usr/include' % args.sysroot)
# FIXME: This may be particularly hacky but CMake finds a different version of libsqlite3
# on some machines. This is also Darwin-specific...
if platform.system() == 'Darwin':
llbuild_cmake_flags.append('-DSQLite3_LIBRARY=%s/usr/lib/libsqlite3.tbd' % args.sysroot)
llbuild_swift_flags = swift_flags[:]
# Build only a subset of llbuild (in particular skipping tests)
cmake_build(args, swiftc_exec, llbuild_cmake_flags, llbuild_swift_flags,
llbuild_source_dir, llbuild_build_dir, 'products/all')
def build_tsc_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags):
print('Building TSC for target: %s' % target)
tsc_source_dir = os.path.join(os.path.dirname(args.package_path), 'swift-tools-support-core')
tsc_build_dir = os.path.join(build_dir, 'swift-tools-support-core')
tsc_swift_flags = swift_flags[:]
cmake_build(args, swiftc_exec, base_cmake_flags, tsc_swift_flags,
tsc_source_dir, tsc_build_dir)
def build_yams_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags):
print('Building Yams for target: %s' % target)
yams_source_dir = os.path.join(os.path.dirname(args.package_path), 'yams')
yams_build_dir = os.path.join(build_dir, 'yams')
yams_cmake_flags = base_cmake_flags + [
'-DCMAKE_C_COMPILER:=clang',
'-DBUILD_SHARED_LIBS=OFF']
if platform.system() == 'Darwin':
yams_cmake_flags.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=%s' % macos_deployment_target)
yams_cmake_flags.append('-DCMAKE_C_FLAGS=-target %s' % target)
else:
yams_cmake_flags.append('-DCMAKE_C_FLAGS=-fPIC -target %s' % target)
if args.dispatch_build_dir:
yams_cmake_flags.append(get_dispatch_cmake_arg(args))
if args.foundation_build_dir:
yams_cmake_flags.append(get_foundation_cmake_arg(args))
yams_swift_flags = swift_flags[:]
cmake_build(args, swiftc_exec, yams_cmake_flags, yams_swift_flags,
yams_source_dir, yams_build_dir)
def build_argument_parser_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags):
print('Building Argument Parser for target: %s' % target)
parser_source_dir = os.path.join(os.path.dirname(args.package_path), 'swift-argument-parser')
parser_build_dir = os.path.join(build_dir, 'swift-argument-parser')
custom_flags = ['-DBUILD_TESTING=NO', '-DBUILD_EXAMPLES=NO']
parser_cmake_flags = base_cmake_flags + custom_flags
parser_swift_flags = swift_flags[:]
cmake_build(args, swiftc_exec, parser_cmake_flags, parser_swift_flags,
parser_source_dir, parser_build_dir)
return
def build_swift_driver_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags):
print('Building Swift Driver for target: %s' % target)
driver_source_dir = args.package_path
driver_build_dir = build_dir
dependencies_dir = os.path.join(build_dir, 'dependencies')
# TODO: Enable Library Evolution
driver_swift_flags = swift_flags[:]
flags = [
'-DLLBuild_DIR=' + os.path.join(os.path.join(dependencies_dir, 'llbuild'), 'cmake/modules'),
'-DTSC_DIR=' + os.path.join(os.path.join(dependencies_dir, 'swift-tools-support-core'), 'cmake/modules'),
'-DYams_DIR=' + os.path.join(os.path.join(dependencies_dir, 'yams'), 'cmake/modules'),
'-DArgumentParser_DIR=' + os.path.join(os.path.join(dependencies_dir, 'swift-argument-parser'), 'cmake/modules')]
driver_cmake_flags = base_cmake_flags + flags
cmake_build(args, swiftc_exec, driver_cmake_flags, driver_swift_flags,
driver_source_dir, driver_build_dir)
def cmake_build(args, swiftc_exec, cmake_args, swift_flags, source_path,
build_dir, ninja_target=None):
"""Configure with CMake and build with Ninja"""
if args.sysroot:
swift_flags.append('-sdk %s' % args.sysroot)
cmd = [
args.cmake_bin, '-G', 'Ninja',
'-DCMAKE_MAKE_PROGRAM=%s' % args.ninja_bin,
'-DCMAKE_BUILD_TYPE:=Release',
'-DCMAKE_Swift_FLAGS=' + ' '.join(swift_flags),
'-DCMAKE_Swift_COMPILER:=%s' % (swiftc_exec),
] + cmake_args + [source_path]
if args.verbose:
print(' '.join(cmd))
mkdir_p(build_dir)
subprocess.check_output(cmd, cwd=build_dir)
# Invoke Ninja
ninja_cmd = [args.ninja_bin]
if args.verbose:
ninja_cmd.append('-v')
if ninja_target is not None:
ninja_cmd.append(ninja_target)
if args.verbose:
print(' '.join(ninja_cmd))
ninjaProcess = subprocess.Popen(ninja_cmd, cwd=build_dir,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env = os.environ)
stdout, stderr = ninjaProcess.communicate()
if ninjaProcess.returncode != 0:
print(stdout)
print('Ninja invocation failed: ')
print(stderr)
sys.exit(ninjaProcess.returncode)
if args.verbose:
print(stdout)
def get_build_target(swiftc_path, args):
"""Returns the target-triple of the current machine."""
try:
target_info_json = subprocess.check_output([swiftc_path, '-print-target-info'],
stderr=subprocess.PIPE,
universal_newlines=True).strip()
args.target_info = json.loads(target_info_json)
return args.target_info['target']['unversionedTriple']
except Exception as e:
error(str(e))
def main():
parser = argparse.ArgumentParser(description='Build along with the Swift build-script.')
def add_common_args(parser):
parser.add_argument('--package-path', metavar='PATH', help='directory of the package to build', default='.')
parser.add_argument('--toolchain', required=True, metavar='PATH', help='build using the toolchain at PATH')
parser.add_argument(
'--prefix',
dest='install_prefixes',
nargs='*',
help='paths (relative to the project root) where to install build products [%(default)s]',
metavar='PATHS')
parser.add_argument(
'--cross-compile-hosts',
dest='cross_compile_hosts',
nargs='*',
help='List of cross compile hosts targets.',
default=[])
parser.add_argument('--ninja-bin', metavar='PATH', help='ninja binary to use for testing')
parser.add_argument('--cmake-bin', metavar='PATH', help='cmake binary to use for building')
parser.add_argument('--build-path', metavar='PATH', default='.build', help='build in the given path')
parser.add_argument('--foundation-build-dir', metavar='PATH', help='Path to the Foundation build directory')
parser.add_argument('--dispatch-build-dir', metavar='PATH', help='Path to the Dispatch build directory')
parser.add_argument('--configuration', '-c', default='debug', help='build using configuration (release|debug)')
parser.add_argument('--no-local-deps', action='store_true', help='use normal remote dependencies when building')
parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output')
subparsers = parser.add_subparsers(title='subcommands', dest='action', metavar='action')
clean_parser = subparsers.add_parser('clean', help='clean the package')
add_common_args(clean_parser)
build_parser = subparsers.add_parser('build', help='build the package')
add_common_args(build_parser)
test_parser = subparsers.add_parser('test', help='test the package')
add_common_args(test_parser)
install_parser = subparsers.add_parser('install', help='build the package')
add_common_args(install_parser)
args = parser.parse_args(sys.argv[1:])
# Canonicalize paths
args.package_path = os.path.abspath(args.package_path)
args.build_path = os.path.abspath(args.build_path)
args.toolchain = os.path.abspath(args.toolchain)
if platform.system() == 'Darwin':
args.sysroot = call_output(["xcrun", "--sdk", "macosx", "--show-sdk-path"], verbose=args.verbose)
else:
args.sysroot = None
if args.cross_compile_hosts and not all('apple-macos' in target for target in args.cross_compile_hosts):
error('Cross-compilation is currently only supported for the Darwin platform.')
if args.dispatch_build_dir:
args.dispatch_build_dir = os.path.abspath(args.dispatch_build_dir)
if args.foundation_build_dir:
args.foundation_build_dir = os.path.abspath(args.foundation_build_dir)
# If a separate prefix has not been specified, installed into the specified toolchain
if not args.install_prefixes:
args.install_prefixes = [args.toolchain]
handle_invocation(args)
if __name__ == '__main__':
main()
|
package_subpath = args.configuration
|
client.js
|
const { EventEmitter } = require('events');
const { makeEscape } = require('./util/string');
const QueryBuilder = require('./query/querybuilder');
const QueryCompiler = require('./query/querycompiler');
const SchemaBuilder = require('./schema/builder');
const SchemaCompiler = require('./schema/compiler');
const TableBuilder = require('./schema/tablebuilder');
const TableCompiler = require('./schema/tablecompiler');
const ColumnBuilder = require('./schema/columnbuilder');
const ColumnCompiler = require('./schema/columncompiler');
const { outputQuery, unwrapRaw } = require('./formatter/wrappingFormatter');
const { compileCallback } = require('./formatter/formatterUtils');
const Raw = require('./raw');
const Ref = require('./ref');
const Formatter = require('./formatter');
const Logger = require('./logger');
const ViewBuilder = require('./schema/viewbuilder.js');
const ViewCompiler = require('./schema/viewcompiler.js');
const isPlainObject = require('lodash/isPlainObject');
class Client extends EventEmitter {
constructor(config = {}) {
super();
this.config = config;
this.logger = new Logger(config);
if (config.version) {
this.version = config.version;
}
this.valueForUndefined = this.raw('DEFAULT');
if (config.useNullAsDefault) {
this.valueForUndefined = null;
}
}
formatter(builder) {
return new Formatter(this, builder);
}
queryBuilder() {
return new QueryBuilder(this);
}
queryCompiler(builder, formatter) {
return new QueryCompiler(this, builder, formatter);
}
schemaBuilder() {
return new SchemaBuilder(this);
}
schemaCompiler(builder) {
return new SchemaCompiler(this, builder);
}
tableBuilder(type, tableName, tableNameLike, fn) {
return new TableBuilder(this, type, tableName, tableNameLike, fn);
|
viewBuilder(type, viewBuilder, fn) {
return new ViewBuilder(this, type, viewBuilder, fn);
}
tableCompiler(tableBuilder) {
return new TableCompiler(this, tableBuilder);
}
viewCompiler(viewCompiler) {
return new ViewCompiler(this, viewCompiler);
}
columnBuilder(tableBuilder, type, args) {
return new ColumnBuilder(this, tableBuilder, type, args);
}
columnCompiler(tableBuilder, columnBuilder) {
return new ColumnCompiler(this, tableBuilder, columnBuilder);
}
transaction(container, config, outerTx) {
throw new Error('Transaction not implemented');
}
raw() {
return new Raw(this).set(...arguments);
}
ref() {
return new Ref(this, ...arguments);
}
query(connection, queryParam) {
throw new Error('Query execution not implemented');
}
stream(connection, queryParam, stream, options) {
throw new Error('Query execution not implemented');
}
prepBindings(bindings) {
return bindings;
}
positionBindings(sql) {
return sql;
}
postProcessResponse(resp, queryContext) {
if (this.config.postProcessResponse) {
return this.config.postProcessResponse(resp, queryContext);
}
return resp;
}
wrapIdentifier(value, queryContext) {
return this.customWrapIdentifier(
value,
this.wrapIdentifierImpl,
queryContext
);
}
customWrapIdentifier(value, origImpl, queryContext) {
if (this.config.wrapIdentifier) {
return this.config.wrapIdentifier(value, origImpl, queryContext);
}
return origImpl(value);
}
wrapIdentifierImpl(value) {
return value !== '*' ? `"${value.replace(/"/g, '""')}"` : '*';
}
initializeDriver() {
try {
this.driver = this._driver();
} catch (e) {
const message = `Knex: run\n$ npm install ${this.driverName} --save`;
this.logger.error(`${message}\n${e.message}\n${e.stack}`);
throw new Error(`${message}\n${e.message}`);
}
}
poolDefaults() {
return { min: 2, max: 10, propagateCreateError: true };
}
getPoolSettings(poolConfig) {
throw new Error('Pool not implemented');
}
initializePool(config = this.config) {
throw new Error('Pool not implemented');
}
validateConnection(connection) {
return true;
}
// Acquire a connection from the pool.
async acquireConnection() {
throw new Error('Database connection not implemented');
}
// Releases a connection back to the connection pool,
// returning a promise resolved when the connection is released.
releaseConnection(connection) {
throw new Error('Database connection not implemented');
}
// Destroy the current connection pool for the client.
async destroy(callback) {
try {
if (this.pool && this.pool.destroy) {
await this.pool.destroy();
}
this.pool = undefined;
if (typeof callback === 'function') {
callback();
}
} catch (err) {
if (typeof callback === 'function') {
return callback(err);
}
throw err;
}
}
// Return the database being used by this client.
database() {
return this.connectionSettings.database;
}
toString() {
return '[object KnexClient]';
}
assertCanCancelQuery() {
if (!this.canCancelQuery) {
throw new Error('Query cancelling not supported for this dialect');
}
}
cancelQuery() {
throw new Error('Query cancelling not supported for this dialect');
}
// Formatter part
alias(first, second) {
return first + ' as ' + second;
}
// Checks whether a value is a function... if it is, we compile it
// otherwise we check whether it's a raw
parameter(value, builder, bindingsHolder) {
if (typeof value === 'function') {
return outputQuery(
compileCallback(value, undefined, this, bindingsHolder),
true,
builder,
this
);
}
return unwrapRaw(value, true, builder, this, bindingsHolder) || '?';
}
// Turns a list of values into a list of ?'s, joining them with commas unless
// a "joining" value is specified (e.g. ' and ')
parameterize(values, notSetValue, builder, bindingsHolder) {
if (typeof values === 'function')
return this.parameter(values, builder, bindingsHolder);
values = Array.isArray(values) ? values : [values];
let str = '',
i = -1;
while (++i < values.length) {
if (i > 0) str += ', ';
let value = values[i];
// json columns can have object in values.
if (isPlainObject(value)) {
value = JSON.stringify(value);
}
str += this.parameter(
value === undefined ? notSetValue : value,
builder,
bindingsHolder
);
}
return str;
}
// Formats `values` into a parenthesized list of parameters for a `VALUES`
// clause.
//
// [1, 2] -> '(?, ?)'
// [[1, 2], [3, 4]] -> '((?, ?), (?, ?))'
// knex('table') -> '(select * from "table")'
// knex.raw('select ?', 1) -> '(select ?)'
//
values(values, builder, bindingsHolder) {
if (Array.isArray(values)) {
if (Array.isArray(values[0])) {
return `(${values
.map(
(value) =>
`(${this.parameterize(
value,
undefined,
builder,
bindingsHolder
)})`
)
.join(', ')})`;
}
return `(${this.parameterize(
values,
undefined,
builder,
bindingsHolder
)})`;
}
if (values && values.isRawInstance) {
return `(${this.parameter(values, builder, bindingsHolder)})`;
}
return this.parameter(values, builder, bindingsHolder);
}
processPassedConnection(connection) {
// Default implementation is noop
}
toPathForJson(jsonPath) {
// By default, we want a json path, so if this function is not overriden,
// we return the path.
return jsonPath;
}
}
Object.assign(Client.prototype, {
_escapeBinding: makeEscape({
escapeString(str) {
return `'${str.replace(/'/g, "''")}'`;
},
}),
canCancelQuery: false,
});
module.exports = Client;
|
}
|
bundle.js
|
const contractABI = [
{
constant: true,
inputs: [],
name: "hello",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
payable: false,
stateMutability: "pure",
type: "function",
},
]
const contractAddress = "0xF6a597409aa565840d050507853a9100939a97f1"
const web3 = new Web3("http://127.0.0.1:9545")
// pointer to an existing smart contract on the blockchain
const simpleSmartContract = new web3.eth.Contract(contractABI, contractAddress)
|
// console.log(simpleSmartContract)
document.addEventListener("DOMContentLoaded", () => {
simpleSmartContract.methods
.hello()
.call()
.then((result) => {
document.getElementById("output").innerHTML = result
})
})
| |
resnet.py
|
'''
Properly implemented ResNet-s for CIFAR10 as described in paper [1].
The implementation and structure of this file is hugely influenced by [2]
which is implemented for ImageNet and doesn't have option A for identity.
Moreover, most of the implementations on the web is copy-paste from
torchvision's resnet and has wrong number of params.
Proper ResNet-s for CIFAR10 (for fair comparision and etc.) has following
number of layers and parameters:
name | layers | params
ResNet20 | 20 | 0.27M
ResNet32 | 32 | 0.46M
ResNet44 | 44 | 0.66M
ResNet56 | 56 | 0.85M
ResNet110 | 110 | 1.7M
ResNet1202| 1202 | 19.4m
which this implementation indeed has.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
[2] https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py
If you use this implementation in you work, please don't forget to mention the
author, Yerlan Idelbayev.
'''
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from layers.layers import MaskedConv
__all__ = ['ResNet', 'resnet20', 'resnet32', 'resnet44', 'resnet56', 'resnet110', 'resnet1202']
def _weights_init(m):
classname = m.__class__.__name__
# print(classname)
if isinstance(m, nn.Linear) or isinstance(m, MaskedConv):
init.xavier_normal_(m.weight)
_AFFINE = True
class LambdaLayer(nn.Module):
def __init__(self, lambd):
super(LambdaLayer, self).__init__()
self.lambd = lambd
def forward(self, x):
|
class BasicBlock(nn.Module):
expansion = 1
def __init__(self, in_planes, planes, stride=1):
super(BasicBlock, self).__init__()
self.conv1 = MaskedConv(in_planes, planes, kernel_size=3, stride=stride, padding=1, bias=False)
self.bn1 = nn.BatchNorm2d(planes, affine=_AFFINE)
self.conv2 = MaskedConv(planes, planes, kernel_size=3, stride=1, padding=1, bias=False)
self.bn2 = nn.BatchNorm2d(planes, affine=_AFFINE)
self.downsample = None
self.bn3 = None
if stride != 1 or in_planes != planes:
self.downsample = nn.Sequential(
MaskedConv(in_planes, self.expansion * planes, kernel_size=1, stride=stride, bias=False))
self.bn3 = nn.BatchNorm2d(self.expansion * planes, affine=_AFFINE)
def forward(self, x):
# x: batch_size * in_c * h * w
residual = x
out = F.relu(self.bn1(self.conv1(x)))
out = self.bn2(self.conv2(out))
if self.downsample is not None:
residual = self.bn3(self.downsample(x))
out += residual
out = F.relu(out)
return out
class ResNet(nn.Module):
def __init__(self, block, num_blocks, num_classes=10):
super(ResNet, self).__init__()
_outputs = [32, 64, 128]
self.in_planes = _outputs[0]
self.conv1 = MaskedConv(3, _outputs[0], kernel_size=3, stride=1, padding=1, bias=False)
self.bn = nn.BatchNorm2d(_outputs[0], affine=_AFFINE)
self.layer1 = self._make_layer(block, _outputs[0], num_blocks[0], stride=1)
self.layer2 = self._make_layer(block, _outputs[1], num_blocks[1], stride=2)
self.layer3 = self._make_layer(block, _outputs[2], num_blocks[2], stride=2)
self.linear = nn.Linear(_outputs[2], num_classes)
self.apply(_weights_init)
def _make_layer(self, block, planes, num_blocks, stride):
strides = [stride] + [1] * (num_blocks - 1)
layers = []
for stride in strides:
layers.append(block(self.in_planes, planes, stride))
self.in_planes = planes * block.expansion
return nn.Sequential(*layers)
def forward(self, x):
out = F.relu(self.bn(self.conv1(x)))
out = self.layer1(out)
out = self.layer2(out)
out = self.layer3(out)
out = F.avg_pool2d(out, out.size()[3])
out = out.view(out.size(0), -1)
out = self.linear(out)
return out
def resnet20(num_classes):
return ResNet(BasicBlock, [3, 3, 3], num_classes=num_classes)
def resnet32(num_classes):
return ResNet(BasicBlock, [5, 5, 5], num_classes=num_classes)
def resnet44(num_classes):
return ResNet(BasicBlock, [7, 7, 7], num_classes=num_classes)
def resnet56(num_classes):
return ResNet(BasicBlock, [9, 9, 9], num_classes=num_classes)
def resnet110(num_classes):
return ResNet(BasicBlock, [18, 18, 18], num_classes=num_classes)
def resnet1202(num_classes):
return ResNet(BasicBlock, [200, 200, 200], num_clases=num_classes)
|
return self.lambd(x)
|
relative_stream_power_index.rs
|
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: Dr. John Lindsay
Created: 02/07/2017
Last Modified: 30/01/2020
License: MIT
*/
use crate::raster::*;
use crate::tools::*;
use num_cpus;
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
use std::sync::mpsc;
use std::sync::Arc;
use std::thread;
/// This tool can be used to calculate the relative stream power (*RSP*) index. This index is directly related
/// to the stream power if the assumption can be made that discharge is directly proportional to upslope
/// contributing area (*A<sub>s</sub>*; `--sca`). The index is calculated as:
///
/// > *RSP* = *A<sub>s</sub>*<sup>*p*</sup> × tan(β)
///
/// where *A<sub>s</sub>* is the specific catchment area (i.e. the upslope contributing area per unit
/// contour length) estimated using one of the available flow accumulation algorithms; β is the local
/// slope gradient in degrees (`--slope`); and, *p* (`--exponent`) is a user-defined exponent term that
/// controls the location-specific relation between contributing area and discharge. Notice that
/// *A<sub>s</sub>* must not be log-transformed prior to being used; *A<sub>s</sub>* is commonly
/// log-transformed to enhance visualization of the data. The slope raster can be created from the base
/// digital elevation model (DEM) using the `Slope` tool. The input images must have the same grid dimensions.
///
/// # Reference
/// Moore, I. D., Grayson, R. B., and Ladson, A. R. (1991). Digital terrain modelling:
/// a review of hydrological, geomorphological, and biological applications. *Hydrological
/// processes*, 5(1), 3-30.
///
/// # See Also
/// `SedimentTransportIndex`, `Slope`, `D8FlowAccumulation` `DInfFlowAccumulation`, `FD8FlowAccumulation`
pub struct StreamPowerIndex {
name: String,
description: String,
toolbox: String,
parameters: Vec<ToolParameter>,
example_usage: String,
}
impl StreamPowerIndex {
pub fn new() -> StreamPowerIndex {
// public constructor
let name = "StreamPowerIndex".to_string();
let toolbox = "Geomorphometric Analysis".to_string();
let description = "Calculates the relative stream power index.".to_string();
let mut parameters = vec![];
parameters.push(ToolParameter {
name: "Input Specific Contributing Area (SCA) File".to_owned(),
flags: vec!["--sca".to_owned()],
description: "Input raster specific contributing area (SCA) file.".to_owned(),
parameter_type: ParameterType::ExistingFile(ParameterFileType::Raster),
default_value: None,
optional: false,
});
parameters.push(ToolParameter {
name: "Input Slope File".to_owned(),
flags: vec!["--slope".to_owned()],
description: "Input raster slope file.".to_owned(),
parameter_type: ParameterType::ExistingFile(ParameterFileType::Raster),
default_value: None,
optional: false,
});
parameters.push(ToolParameter {
name: "Output File".to_owned(),
flags: vec!["-o".to_owned(), "--output".to_owned()],
description: "Output raster file.".to_owned(),
parameter_type: ParameterType::NewFile(ParameterFileType::Raster),
default_value: None,
optional: false,
});
parameters.push(ToolParameter {
name: "Specific Contributing Area (SCA) Exponent".to_owned(),
flags: vec!["--exponent".to_owned()],
description: "SCA exponent value.".to_owned(),
parameter_type: ParameterType::Float,
default_value: Some("1.0".to_owned()),
optional: false,
});
let sep: String = path::MAIN_SEPARATOR.to_string();
let p = format!("{}", env::current_dir().unwrap().display());
let e = format!("{}", env::current_exe().unwrap().display());
let mut short_exe = e
.replace(&p, "")
.replace(".exe", "")
.replace(".", "")
.replace(&sep, "");
if e.contains(".exe") {
short_exe += ".exe";
}
let usage = format!(">>.*{0} -r={1} -v --wd=\"*path*to*data*\" --sca='flow_accum.tif' --slope='slope.tif' -o=output.tif --exponent=1.1", short_exe, name).replace("*", &sep);
StreamPowerIndex {
name: name,
description: description,
toolbox: toolbox,
parameters: parameters,
example_usage: usage,
}
}
}
impl WhiteboxTool for StreamPowerIndex {
fn get_source_file(&self) -> String {
String::from(file!())
}
fn get_tool_name(&self) -> String {
self.name.clone()
}
fn get_tool_description(&self) -> String {
self.description.clone()
}
fn get_tool_parameters(&self) -> String {
let mut s = String::from("{\"parameters\": [");
for i in 0..self.parameters.len() {
if i < self.parameters.len() - 1 {
s.push_str(&(self.parameters[i].to_string()));
s.push_str(",");
} else {
s.push_str(&(self.parameters[i].to_string()));
}
}
s.push_str("]}");
s
}
fn get_example_usage(&self) -> String {
self.example_usage.clone()
}
fn get_toolbox(&self) -> String {
self.toolbox.clone()
}
fn run<'a>(
&self,
args: Vec<String>,
working_directory: &'a str,
verbose: bool,
) -> Result<(), Error> {
let mut sca_file = String::new();
let mut slope_file = String::new();
let mut output_file = String::new();
let mut sca_exponent = 1.0;
|
return Err(Error::new(
ErrorKind::InvalidInput,
"Tool run with no parameters.",
));
}
for i in 0..args.len() {
let mut arg = args[i].replace("\"", "");
arg = arg.replace("\'", "");
let cmd = arg.split("="); // in case an equals sign was used
let vec = cmd.collect::<Vec<&str>>();
let mut keyval = false;
if vec.len() > 1 {
keyval = true;
}
let flag_val = vec[0].to_lowercase().replace("--", "-");
if flag_val == "-sca" {
if keyval {
sca_file = vec[1].to_string();
} else {
sca_file = args[i + 1].to_string();
}
} else if flag_val == "-slope" {
if keyval {
slope_file = vec[1].to_string();
} else {
slope_file = args[i + 1].to_string();
}
} else if flag_val == "-o" || flag_val == "-output" {
if keyval {
output_file = vec[1].to_string();
} else {
output_file = args[i + 1].to_string();
}
} else if flag_val == "-exponent" {
if keyval {
sca_exponent = vec[1]
.to_string()
.parse::<f64>()
.expect(&format!("Error parsing {}", flag_val));
} else {
sca_exponent = args[i + 1]
.to_string()
.parse::<f64>()
.expect(&format!("Error parsing {}", flag_val));
}
}
}
if verbose {
println!("***************{}", "*".repeat(self.get_tool_name().len()));
println!("* Welcome to {} *", self.get_tool_name());
println!("***************{}", "*".repeat(self.get_tool_name().len()));
}
let sep: String = path::MAIN_SEPARATOR.to_string();
let mut progress: usize;
let mut old_progress: usize = 1;
if !output_file.contains(&sep) && !output_file.contains("/") {
output_file = format!("{}{}", working_directory, output_file);
}
if !sca_file.contains(&sep) && !sca_file.contains("/") {
sca_file = format!("{}{}", working_directory, sca_file);
}
if !slope_file.contains(&sep) && !slope_file.contains("/") {
slope_file = format!("{}{}", working_directory, slope_file);
}
if verbose {
println!("Reading data...")
};
let sca = Arc::new(Raster::new(&sca_file, "r")?);
let slope = Arc::new(Raster::new(&slope_file, "r")?);
let start = Instant::now();
let rows = sca.configs.rows as isize;
let columns = sca.configs.columns as isize;
let sca_nodata = sca.configs.nodata;
let slope_nodata = slope.configs.nodata;
// make sure the input files have the same size
if sca.configs.rows != slope.configs.rows || sca.configs.columns != slope.configs.columns {
return Err(Error::new(
ErrorKind::InvalidInput,
"The input files must have the same number of rows and columns and spatial extent.",
));
}
// calculate the number of downslope cells
let num_procs = num_cpus::get() as isize;
let (tx, rx) = mpsc::channel();
for tid in 0..num_procs {
let sca = sca.clone();
let slope = slope.clone();
let tx = tx.clone();
thread::spawn(move || {
let mut sca_val: f64;
let mut slope_val: f64;
for row in (0..rows).filter(|r| r % num_procs == tid) {
let mut data: Vec<f64> = vec![sca_nodata; columns as usize];
for col in 0..columns {
sca_val = sca[(row, col)];
slope_val = slope[(row, col)];
if sca_val != sca_nodata && slope_val != slope_nodata {
data[col as usize] =
sca_val.powf(sca_exponent) * slope_val.to_radians().tan();
}
}
tx.send((row, data)).unwrap();
}
});
}
let mut output = Raster::initialize_using_file(&output_file, &sca);
for r in 0..rows {
let (row, data) = rx.recv().expect("Error receiving data from thread.");
output.set_row_data(row, data);
if verbose {
progress = (100.0_f64 * r as f64 / (rows - 1) as f64) as usize;
if progress != old_progress {
println!("Progress: {}%", progress);
old_progress = progress;
}
}
}
let elapsed_time = get_formatted_elapsed_time(start);
output.configs.data_type = DataType::F32;
output.configs.palette = "grey.plt".to_string();
output.configs.photometric_interp = PhotometricInterpretation::Continuous;
output.clip_display_min_max(1.0);
output.add_metadata_entry(format!(
"Created by whitebox_tools\' {} tool",
self.get_tool_name()
));
output.add_metadata_entry(format!("SCA raster: {}", sca_file));
output.add_metadata_entry(format!("Slope raster: {}", slope_file));
output.add_metadata_entry(format!("SCA exponent: {}", sca_exponent));
output.add_metadata_entry(format!("Elapsed Time (excluding I/O): {}", elapsed_time));
if verbose {
println!("Saving data...")
};
let _ = match output.write() {
Ok(_) => {
if verbose {
println!("Output file written")
}
}
Err(e) => return Err(e),
};
if sca.configs.maximum < 100.0 {
println!("WARNING: The input SCA data layer contained only low values. It is likely that it has been
log-transformed. This tool requires non-transformed SCA as an input.")
}
if verbose {
println!(
"{}",
&format!("Elapsed Time (excluding I/O): {}", elapsed_time)
);
}
Ok(())
}
}
|
if args.len() == 0 {
|
gen_esp_err_to_name.py
|
#!/usr/bin/env python
#
# Copyright 2018 Espressif Systems (Shanghai) PTE LTD
#
# 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.
import os
import argparse
import re
import fnmatch
import string
import collections
import textwrap
# list files here which should not be parsed
ignore_files = [ 'components/mdns/test_afl_fuzz_host/esp32_compat.h' ]
# macros from here have higher priorities in case of collisions
priority_headers = [ 'components/esp32/include/esp_err.h' ]
err_dict = collections.defaultdict(list) #identified errors are stored here; mapped by the error code
rev_err_dict = dict() #map of error string to error code
unproc_list = list() #errors with unknown codes which depend on other errors
class ErrItem:
"""
Contains information about the error:
- name - error string
- file - relative path inside the IDF project to the file which defines this error
- comment - (optional) comment for the error
- rel_str - (optional) error string which is a base for the error
- rel_off - (optional) offset in relation to the base error
"""
def __init__(self, name, file, comment, rel_str = "", rel_off = 0):
self.name = name
self.file = file
self.comment = comment
self.rel_str = rel_str
self.rel_off = rel_off
def __str__(self):
ret = self.name + " from " + self.file
if (self.rel_str != ""):
ret += " is (" + self.rel_str + " + " + str(self.rel_off) + ")"
if self.comment != "":
ret += " // " + self.comment
return ret
def __cmp__(self, other):
if self.file in priority_headers and other.file not in priority_headers:
return -1
elif self.file not in priority_headers and other.file in priority_headers:
return 1
base = "_BASE"
if self.file == other.file:
if self.name.endswith(base) and not(other.name.endswith(base)):
return 1
elif not(self.name.endswith(base)) and other.name.endswith(base):
return -1
self_key = self.file + self.name
other_key = other.file + other.name
if self_key < other_key:
return -1
elif self_key > other_key:
return 1
else:
return 0
class InputError(RuntimeError):
"""
Represents and error on the input
"""
def __init__(self, p, e):
super(InputError, self).__init__(p + ": " + e)
def process(line, idf_path):
"""
Process a line of text from file idf_path (relative to IDF project).
Fills the global list unproc_list and dictionaries err_dict, rev_err_dict
"""
if idf_path.endswith(".c"):
# We would not try to include a C file
raise InputError(idf_path, "This line should be in a header file: %s" % line)
words = re.split(r' +', line, 2)
# words[1] is the error name
# words[2] is the rest of the line (value, base + value, comment)
if len(words) < 2:
raise InputError(idf_path, "Error at line %s" % line)
line = ""
todo_str = words[2]
comment = ""
# identify possible comment
m = re.search(r'/\*!<(.+?(?=\*/))', todo_str)
if m:
comment = string.strip(m.group(1))
todo_str = string.strip(todo_str[:m.start()]) # keep just the part before the comment
# identify possible parentheses ()
m = re.search(r'\((.+)\)', todo_str)
if m:
todo_str = m.group(1) #keep what is inside the parentheses
# identify BASE error code, e.g. from the form BASE + 0x01
m = re.search(r'\s*(\w+)\s*\+(.+)', todo_str)
if m:
related = m.group(1) # BASE
todo_str = m.group(2) # keep and process only what is after "BASE +"
# try to match a hexadecimal number
m = re.search(r'0x([0-9A-Fa-f]+)', todo_str)
if m:
num = int(m.group(1), 16)
else:
# Try to match a decimal number. Negative value is possible for some numbers, e.g. ESP_FAIL
m = re.search(r'(-?[0-9]+)', todo_str)
if m:
num = int(m.group(1), 10)
elif re.match(r'\w+', todo_str):
# It is possible that there is no number, e.g. #define ERROR BASE
related = todo_str # BASE error
num = 0 # (BASE + 0)
else:
raise InputError(idf_path, "Cannot parse line %s" % line)
try:
related
except NameError:
# The value of the error is known at this moment because it do not depends on some other BASE error code
err_dict[num].append(ErrItem(words[1], idf_path, comment))
rev_err_dict[words[1]] = num
else:
# Store the information available now and compute the error code later
unproc_list.append(ErrItem(words[1], idf_path, comment, related, num))
def process_remaining_errors():
"""
Create errors which could not be processed before because the error code
for the BASE error code wasn't known.
This works for sure only if there is no multiple-time dependency, e.g.:
#define BASE1 0
#define BASE2 (BASE1 + 10)
#define ERROR (BASE2 + 10) - ERROR will be processed successfully only if it processed later than BASE2
"""
for item in unproc_list:
if item.rel_str in rev_err_dict:
base_num = rev_err_dict[item.rel_str]
base = err_dict[base_num][0]
num = base_num + item.rel_off
err_dict[num].append(ErrItem(item.name, item.file, item.comment))
rev_err_dict[item.name] = num
else:
print(item.rel_str + " referenced by " + item.name + " in " + item.file + " is unknown")
del unproc_list[:]
def path_to_include(path):
"""
Process the path (relative to the IDF project) in a form which can be used
to include in a C file. Using just the filename does not work all the
time because some files are deeper in the tree. This approach tries to
find an 'include' parent directory an include its subdirectories, e.g.
"components/XY/include/esp32/file.h" will be transported into "esp32/file.h"
So this solution works only works when the subdirectory or subdirectories
are inside the "include" directory. Other special cases need to be handled
here when the compiler gives an unknown header file error message.
"""
spl_path = string.split(path, os.sep)
try:
i = spl_path.index('include')
except ValueError:
# no include in the path -> use just the filename
return os.path.basename(path)
else:
return str(os.sep).join(spl_path[i+1:]) # subdirectories and filename in "include"
def print_warning(error_list, error_code):
"""
Print warning about errors with the same error code
"""
print("[WARNING] The following errors have the same code (%d):" % error_code)
for e in error_list:
print(" " + str(e))
def max_string_width():
max = 0
for k in err_dict.keys():
for e in err_dict[k]:
x = len(e.name)
if x > max:
max = x
return max
def generate_c_output(fin, fout):
"""
Writes the output to fout based on th error dictionary err_dict and
template file fin.
"""
# make includes unique by using a set
includes = set()
for k in err_dict.keys():
for e in err_dict[k]:
includes.add(path_to_include(e.file))
# The order in a set in non-deterministic therefore it could happen that the
# include order will be different in other machines and false difference
# in the output file could be reported. In order to avoid this, the items
# are sorted in a list.
include_list = list(includes)
include_list.sort()
max_width = max_string_width() + 17 + 1 # length of " ERR_TBL_IT()," with spaces is 17
max_decdig = max(len(str(k)) for k in err_dict.keys())
for line in fin:
if re.match(r'@COMMENT@', line):
fout.write("//Do not edit this file because it is autogenerated by " + os.path.basename(__file__) + "\n")
elif re.match(r'@HEADERS@', line):
for i in include_list:
fout.write("#if __has_include(\"" + i + "\")\n#include \"" + i + "\"\n#endif\n")
elif re.match(r'@ERROR_ITEMS@', line):
last_file = ""
for k in sorted(err_dict.keys()):
if len(err_dict[k]) > 1:
err_dict[k].sort()
print_warning(err_dict[k], k)
for e in err_dict[k]:
if e.file != last_file:
last_file = e.file
fout.write(" // %s\n" % last_file)
table_line = (" ERR_TBL_IT(" + e.name + "), ").ljust(max_width) + "/* " + str(k).rjust(max_decdig)
fout.write("# ifdef %s\n" % e.name)
fout.write(table_line)
hexnum_length = 0
if k > 0: # negative number and zero should be only ESP_FAIL and ESP_OK
hexnum = " 0x%x" % k
hexnum_length = len(hexnum)
fout.write(hexnum)
if e.comment != "":
if len(e.comment) < 50:
fout.write(" %s" % e.comment)
else:
indent = " " * (len(table_line) + hexnum_length + 1)
w = textwrap.wrap(e.comment, width=120, initial_indent = indent, subsequent_indent = indent)
# this couldn't be done with initial_indent because there is no initial_width option
|
fout.write("\n%s" % w[i])
fout.write(" */\n# endif\n")
else:
fout.write(line)
def generate_rst_output(fout):
for k in sorted(err_dict.keys()):
v = err_dict[k][0]
fout.write(':c:macro:`{}` '.format(v.name))
if k > 0:
fout.write('**(0x{:x})**'.format(k))
else:
fout.write('({:d})'.format(k))
if len(v.comment) > 0:
fout.write(': {}'.format(v.comment))
fout.write('\n\n')
def main():
parser = argparse.ArgumentParser(description='ESP32 esp_err_to_name lookup generator for esp_err_t')
parser.add_argument('--c_input', help='Path to the esp_err_to_name.c.in template input.', default=os.environ['IDF_PATH'] + '/components/esp32/esp_err_to_name.c.in')
parser.add_argument('--c_output', help='Path to the esp_err_to_name.c output.', default=os.environ['IDF_PATH'] + '/components/esp32/esp_err_to_name.c')
parser.add_argument('--rst_output', help='Generate .rst output and save it into this file')
args = parser.parse_args()
for root, dirnames, filenames in os.walk(os.environ['IDF_PATH']):
for filename in fnmatch.filter(filenames, '*.[ch]'):
full_path = os.path.join(root, filename)
idf_path = os.path.relpath(full_path, os.environ['IDF_PATH'])
if idf_path in ignore_files:
continue
with open(full_path, "r+") as f:
for line in f:
# match also ESP_OK and ESP_FAIL because some of ESP_ERRs are referencing them
if re.match(r"\s*#define\s+(ESP_ERR_|ESP_OK|ESP_FAIL)", line):
try:
process(str.strip(line), idf_path)
except InputError as e:
print (e)
process_remaining_errors()
if args.rst_output is not None:
with open(args.rst_output, 'w') as fout:
generate_rst_output(fout)
else:
with open(args.c_input, 'r') as fin, open(args.c_output, 'w') as fout:
generate_c_output(fin, fout)
if __name__ == "__main__":
main()
|
fout.write(" %s" % w[0].strip())
for i in range(1, len(w)):
|
smart_continue.py
|
#! /usr/bin/env python
# Thomas Nagy, 2011
# Try to cancel the tasks that cannot run with the option -k when an error occurs:
# 1 direct file dependencies
# 2 tasks listed in the before/after/ext_in/ext_out attributes
from waflib import Task, Runner
Task.CANCELED = 4
def cancel_next(self, tsk):
if not isinstance(tsk, Task.TaskBase):
return
if tsk.hasrun >= Task.SKIPPED:
# normal execution, no need to do anything here
return
try:
canceled_tasks, canceled_nodes = self.canceled_tasks, self.canceled_nodes
except AttributeError:
canceled_tasks = self.canceled_tasks = set()
canceled_nodes = self.canceled_nodes = set()
try:
canceled_nodes.update(tsk.outputs)
except AttributeError:
pass
try:
canceled_tasks.add(tsk)
except AttributeError:
pass
def
|
(self):
tsk = self.out.get()
if not self.stop:
self.add_more_tasks(tsk)
self.count -= 1
self.dirty = True
self.cancel_next(tsk) # new code
def error_handler(self, tsk):
if not self.bld.keep:
self.stop = True
self.error.append(tsk)
self.cancel_next(tsk) # new code
Runner.Parallel.cancel_next = cancel_next
Runner.Parallel.get_out = get_out
Runner.Parallel.error_handler = error_handler
def get_next_task(self):
tsk = self.get_next_task_smart_continue()
if not tsk:
return tsk
try:
canceled_tasks, canceled_nodes = self.canceled_tasks, self.canceled_nodes
except AttributeError:
pass
else:
# look in the tasks that this one is waiting on
# if one of them was canceled, cancel this one too
for x in tsk.run_after:
if x in canceled_tasks:
tsk.hasrun = Task.CANCELED
self.cancel_next(tsk)
break
else:
# so far so good, now consider the nodes
for x in getattr(tsk, 'inputs', []) + getattr(tsk, 'deps', []):
if x in canceled_nodes:
tsk.hasrun = Task.CANCELED
self.cancel_next(tsk)
break
return tsk
Runner.Parallel.get_next_task_smart_continue = Runner.Parallel.get_next_task
Runner.Parallel.get_next_task = get_next_task
|
get_out
|
rpc_get_block.go
|
package rpcclient
import "github.com/kaspanet/kaspad/app/appmessage"
|
*appmessage.GetBlockResponseMessage, error) {
err := c.rpcRouter.outgoingRoute().Enqueue(
appmessage.NewGetBlockRequestMessage(hash, includeTransactions))
if err != nil {
return nil, err
}
response, err := c.route(appmessage.CmdGetBlockResponseMessage).DequeueWithTimeout(c.timeout)
if err != nil {
return nil, err
}
GetBlockResponse := response.(*appmessage.GetBlockResponseMessage)
if GetBlockResponse.Error != nil {
return nil, c.convertRPCError(GetBlockResponse.Error)
}
return GetBlockResponse, nil
}
|
// GetBlock sends an RPC request respective to the function's name and returns the RPC server's response
func (c *RPCClient) GetBlock(hash string, includeTransactions bool) (
|
adamax.py
|
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# 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.
# ==============================================================================
"""Adamax optimizer implementation."""
import tensorflow.compat.v2 as tf
from keras import backend_config
from keras.optimizer_v2 import optimizer_v2
from tensorflow.python.util.tf_export import keras_export
@keras_export('keras.optimizers.Adamax')
class Adamax(optimizer_v2.OptimizerV2):
"""Optimizer that implements the Adamax algorithm.
It is a variant of Adam based on the infinity norm.
Default parameters follow those provided in the paper.
Adamax is sometimes superior to adam, specially in models with embeddings.
Initialization:
```python
m = 0 # Initialize initial 1st moment vector
v = 0 # Initialize the exponentially weighted infinity norm
t = 0 # Initialize timestep
```
The update rule for parameter `w` with gradient `g` is
described at the end of section 7.1 of the paper:
```python
t += 1
m = beta1 * m + (1 - beta) * g
v = max(beta2 * v, abs(g))
current_lr = learning_rate / (1 - beta1 ** t)
w = w - current_lr * m / (v + epsilon)
```
Similarly to `Adam`, the epsilon is added for numerical stability
(especially to get rid of division by zero when `v_t == 0`).
In contrast to `Adam`, the sparse implementation of this algorithm
(used when the gradient is an IndexedSlices object, typically because of
`tf.gather` or an embedding lookup in the forward pass) only updates
variable slices and corresponding `m_t`, `v_t` terms when that part of
the variable was used in the forward pass. This means that the sparse
behavior is contrast to the dense behavior (similar to some momentum
implementations which ignore momentum unless a variable slice was actually
used).
Args:
learning_rate: A `Tensor`, floating point value, or a schedule that is a
`tf.keras.optimizers.schedules.LearningRateSchedule`. The learning rate.
beta_1: A float value or a constant float tensor. The exponential decay
rate for the 1st moment estimates.
beta_2: A float value or a constant float tensor. The exponential decay
rate for the exponentially weighted infinity norm.
epsilon: A small constant for numerical stability.
name: Optional name for the operations created when applying gradients.
Defaults to `"Adamax"`.
**kwargs: Keyword arguments. Allowed to be one of
`"clipnorm"` or `"clipvalue"`.
`"clipnorm"` (float) clips gradients by norm; `"clipvalue"` (float) clips
gradients by value.
Reference:
- [Kingma et al., 2014](http://arxiv.org/abs/1412.6980)
"""
_HAS_AGGREGATE_GRAD = True
def __init__(self,
learning_rate=0.001,
beta_1=0.9,
beta_2=0.999,
epsilon=1e-7,
name='Adamax',
**kwargs):
super(Adamax, self).__init__(name, **kwargs)
self._set_hyper('learning_rate', kwargs.get('lr', learning_rate))
self._set_hyper('decay', self._initial_decay)
self._set_hyper('beta_1', beta_1)
self._set_hyper('beta_2', beta_2)
self.epsilon = epsilon or backend_config.epsilon()
def
|
(self, var_list):
# Separate for-loops to respect the ordering of slot variables from v1.
for var in var_list:
self.add_slot(var, 'm') # Create slots for the first moments.
for var in var_list:
self.add_slot(var, 'v') # Create slots for the second moments.
def _prepare_local(self, var_device, var_dtype, apply_state):
super(Adamax, self)._prepare_local(var_device, var_dtype, apply_state)
local_step = tf.cast(self.iterations + 1, var_dtype)
beta_1_t = tf.identity(self._get_hyper('beta_1', var_dtype))
beta_2_t = tf.identity(self._get_hyper('beta_2', var_dtype))
beta_1_power = tf.pow(beta_1_t, local_step)
lr_t = apply_state[(var_device, var_dtype)]['lr_t']
apply_state[(var_device, var_dtype)].update(
dict(
neg_scaled_lr=-lr_t / (1 - beta_1_power),
epsilon=tf.convert_to_tensor(
self.epsilon, var_dtype),
beta_1_t=beta_1_t,
beta_1_power=beta_1_power,
one_minus_beta_1_t=1 - beta_1_t,
beta_2_t=beta_2_t,
zero=tf.zeros((), dtype=tf.int64)))
def _resource_apply_dense(self, grad, var, apply_state=None):
var_device, var_dtype = var.device, var.dtype.base_dtype
coefficients = ((apply_state or {}).get((var_device, var_dtype))
or self._fallback_apply_state(var_device, var_dtype))
m = self.get_slot(var, 'm')
v = self.get_slot(var, 'v')
return tf.raw_ops.ResourceApplyAdaMax(
var=var.handle,
m=m.handle,
v=v.handle,
beta1_power=coefficients['beta_1_power'],
lr=coefficients['lr_t'],
beta1=coefficients['beta_1_t'],
beta2=coefficients['beta_2_t'],
epsilon=coefficients['epsilon'],
grad=grad,
use_locking=self._use_locking)
def _resource_apply_sparse(self, grad, var, indices, apply_state=None):
var_device, var_dtype = var.device, var.dtype.base_dtype
coefficients = ((apply_state or {}).get((var_device, var_dtype))
or self._fallback_apply_state(var_device, var_dtype))
# m_t = beta1 * m + (1 - beta1) * g_t
m = self.get_slot(var, 'm')
m_slice = tf.gather(m, indices, axis=coefficients['zero'])
m_t_slice = (m_slice * coefficients['beta_1_t'] +
grad * coefficients['one_minus_beta_1_t'])
with tf.control_dependencies([m_t_slice]):
m_t = self._resource_scatter_update(m, indices, m_t_slice)
# u_t = max(beta2 * u, abs(g_t))
v = self.get_slot(var, 'v')
v_slice = tf.gather(v, indices, axis=coefficients['zero'])
v_t_slice = tf.maximum(v_slice * coefficients['beta_2_t'],
tf.abs(grad))
with tf.control_dependencies([v_t_slice]):
v_t = self._resource_scatter_update(v, indices, v_t_slice)
# theta_t = theta - lr / (1 - beta1^t) * m_t / u_t
var_slice = coefficients['neg_scaled_lr'] * (
m_t_slice / (v_t_slice + coefficients['epsilon']))
with tf.control_dependencies([var_slice]):
var_update = self._resource_scatter_add(var, indices, var_slice)
return tf.group(*[var_update, m_t, v_t])
def get_config(self):
config = super(Adamax, self).get_config()
config.update({
'learning_rate': self._serialize_hyperparameter('learning_rate'),
'decay': self._initial_decay,
'beta_1': self._serialize_hyperparameter('beta_1'),
'beta_2': self._serialize_hyperparameter('beta_2'),
'epsilon': self.epsilon,
})
return config
|
_create_slots
|
healthcheck.rs
|
use std::sync::Arc;
use actix::prelude::*;
use futures::future;
use futures::prelude::*;
use relay_config::{Config, RelayMode};
use relay_statsd::metric;
use crate::actors::controller::{Controller, Shutdown};
use crate::actors::upstream::{IsAuthenticated, IsNetworkOutage, UpstreamRelay};
use crate::statsd::RelayGauges;
pub struct Healthcheck {
is_shutting_down: bool,
config: Arc<Config>,
}
|
is_shutting_down: false,
config,
}
}
}
impl Actor for Healthcheck {
type Context = Context<Self>;
fn started(&mut self, context: &mut Self::Context) {
Controller::subscribe(context.address());
}
}
impl Supervised for Healthcheck {}
impl SystemService for Healthcheck {}
impl Default for Healthcheck {
fn default() -> Self {
unimplemented!("register with the SystemRegistry instead")
}
}
impl Handler<Shutdown> for Healthcheck {
type Result = Result<(), ()>;
fn handle(&mut self, _message: Shutdown, _context: &mut Self::Context) -> Self::Result {
self.is_shutting_down = true;
Ok(())
}
}
pub enum IsHealthy {
/// Check if the Relay is alive at all.
Liveness,
/// Check if the Relay is in a state where the load balancer should route traffic to it (i.e.
/// it's both live/alive and not too busy).
Readiness,
}
impl Message for IsHealthy {
type Result = Result<bool, ()>;
}
impl Handler<IsHealthy> for Healthcheck {
type Result = ResponseFuture<bool, ()>;
fn handle(&mut self, message: IsHealthy, context: &mut Self::Context) -> Self::Result {
let upstream = UpstreamRelay::from_registry();
if self.config.relay_mode() == RelayMode::Managed {
upstream
.send(IsNetworkOutage)
.map_err(|_| ())
.map(|is_network_outage| {
metric!(
gauge(RelayGauges::NetworkOutage) = if is_network_outage { 1 } else { 0 }
);
})
.into_actor(self)
.spawn(context);
}
match message {
IsHealthy::Liveness => Box::new(future::ok(true)),
IsHealthy::Readiness => {
if self.is_shutting_down {
Box::new(future::ok(false))
} else if self.config.requires_auth() {
Box::new(upstream.send(IsAuthenticated).map_err(|_| ()))
} else {
Box::new(future::ok(true))
}
}
}
}
}
|
impl Healthcheck {
pub fn new(config: Arc<Config>) -> Self {
Healthcheck {
|
__init__.py
|
from .base import Block, GenesisBlock, BlockChain
|
||
routing.rs
|
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use {
crate::{
capability::{
CapabilityProvider, CapabilitySource, ComponentCapability, FrameworkCapability,
},
model::{
error::ModelError,
hooks::{Event, EventPayload},
moniker::{AbsoluteMoniker, ChildMoniker, PartialMoniker, RelativeMoniker},
realm::{Realm, WeakRealm},
rights::{RightWalkState, Rights, READ_RIGHTS, WRITE_RIGHTS},
storage,
},
path::PathBufExt,
},
async_trait::async_trait,
cm_rust::{
self, CapabilityPath, ExposeDecl, ExposeDirectoryDecl, ExposeTarget, OfferDecl,
OfferDirectoryDecl, OfferDirectorySource, OfferEventSource, OfferRunnerSource,
OfferServiceSource, OfferStorageSource, StorageDirectorySource, UseDecl, UseDirectoryDecl,
UseStorageDecl,
},
fidl::endpoints::ServerEnd,
fidl_fuchsia_io as fio, fuchsia_zircon as zx,
futures::lock::Mutex,
std::{path::PathBuf, sync::Arc},
};
const SERVICE_OPEN_FLAGS: u32 =
fio::OPEN_FLAG_DESCRIBE | fio::OPEN_RIGHT_READABLE | fio::OPEN_RIGHT_WRITABLE;
/// Describes the source of a capability, for any type of capability.
#[derive(Debug)]
enum OfferSource<'a> {
// TODO(CF-908): Enable this once unified services are implemented.
#[allow(dead_code)]
Service(&'a OfferServiceSource),
Protocol(&'a OfferServiceSource),
Directory(&'a OfferDirectorySource),
Storage(&'a OfferStorageSource),
Runner(&'a OfferRunnerSource),
Event(&'a OfferEventSource),
}
/// Describes the source of a capability, for any type of capability.
#[derive(Debug)]
enum ExposeSource<'a> {
Protocol(&'a cm_rust::ExposeSource),
Directory(&'a cm_rust::ExposeSource),
Runner(&'a cm_rust::ExposeSource),
}
/// Finds the source of the `capability` used by `absolute_moniker`, and pass along the
/// `server_chan` to the hosting component's out directory (or componentmgr's namespace, if
/// applicable) using an open request with `open_mode`.
pub(super) async fn route_use_capability<'a>(
flags: u32,
open_mode: u32,
relative_path: String,
use_decl: &'a UseDecl,
target_realm: &'a Arc<Realm>,
server_chan: zx::Channel,
) -> Result<(), ModelError> {
match use_decl {
UseDecl::Service(_) | UseDecl::Protocol(_) | UseDecl::Directory(_) | UseDecl::Runner(_) => {
let (source, cap_state) = find_used_capability_source(use_decl, target_realm).await?;
let relative_path = cap_state.make_relative_path(relative_path);
open_capability_at_source(
flags,
open_mode,
relative_path,
source,
target_realm,
server_chan,
)
.await
}
UseDecl::Storage(storage_decl) => {
route_and_open_storage_capability(storage_decl, open_mode, target_realm, server_chan)
.await
}
UseDecl::Event(_) => {
// Events are logged separately through route_use_event_capability.
Ok(())
}
}
}
pub(super) async fn route_use_event_capability<'a>(
use_decl: &'a UseDecl,
target_realm: &'a Arc<Realm>,
) -> Result<CapabilitySource, ModelError> {
let (source, _cap_state) = find_used_capability_source(use_decl, target_realm).await?;
Ok(source)
}
/// Finds the source of the expose capability used at `source_path` by `target_realm`, and pass
/// along the `server_chan` to the hosting component's out directory (or componentmgr's namespace,
/// if applicable)
pub(super) async fn route_expose_capability<'a>(
flags: u32,
open_mode: u32,
relative_path: String,
expose_decl: &'a ExposeDecl,
target_realm: &'a Arc<Realm>,
server_chan: zx::Channel,
) -> Result<(), ModelError> {
let capability = ComponentCapability::UsedExpose(expose_decl.clone());
let cap_state = CapabilityState::new(&capability);
let mut pos = WalkPosition {
capability,
cap_state,
last_child_moniker: None,
realm: Some(target_realm.clone()),
};
let source = walk_expose_chain(&mut pos).await?;
let relative_path = pos.cap_state.make_relative_path(relative_path);
open_capability_at_source(flags, open_mode, relative_path, source, target_realm, server_chan)
.await
}
/// The default provider for a ComponentCapability.
/// This provider will bind to the source moniker's realm and then open the service
/// from the realm's outgoing directory.
struct DefaultComponentCapabilityProvider {
source_realm: WeakRealm,
path: CapabilityPath,
}
#[async_trait]
impl CapabilityProvider for DefaultComponentCapabilityProvider {
async fn open(
self: Box<Self>,
flags: u32,
open_mode: u32,
relative_path: PathBuf,
server_end: zx::Channel,
) -> Result<(), ModelError> {
// Start the source component, if necessary
let path = self.path.to_path_buf().attach(relative_path);
let source_realm = self.source_realm.upgrade()?.bind().await?;
source_realm.open_outgoing(flags, open_mode, path, server_end).await?;
Ok(())
}
}
/// This method gets an optional default capability provider based on the
/// capability source.
fn get_default_provider(source: &CapabilitySource) -> Option<Box<dyn CapabilityProvider>> {
match source {
CapabilitySource::Framework { .. } => {
// There is no default provider for a Framework capability
None
}
CapabilitySource::Component { capability, realm } => {
// Route normally for a component capability with a source path
if let Some(path) = capability.source_path() {
Some(Box::new(DefaultComponentCapabilityProvider {
source_realm: realm.clone(),
path: path.clone(),
}))
} else {
None
}
}
_ => None,
}
}
/// Returns the optional path for a global framework capability, None otherwise.
pub fn get_framework_capability_path(source: &CapabilitySource) -> Option<&CapabilityPath> {
match source {
CapabilitySource::Framework { capability, scope_moniker: None } => capability.path(),
_ => None,
}
}
/// Open the capability at the given source, binding to its component instance if necessary.
pub async fn open_capability_at_source(
flags: u32,
open_mode: u32,
relative_path: PathBuf,
source: CapabilitySource,
target_realm: &Arc<Realm>,
server_chan: zx::Channel,
) -> Result<(), ModelError> {
let capability_provider = Arc::new(Mutex::new(get_default_provider(&source)));
let event = Event::new(
target_realm.abs_moniker.clone(),
EventPayload::CapabilityRouted {
source: source.clone(),
capability_provider: capability_provider.clone(),
},
);
// This hack changes the flags for a scoped framework service
let mut flags = flags;
if let CapabilitySource::Framework { scope_moniker: Some(_), .. } = source {
flags = SERVICE_OPEN_FLAGS;
}
// Get a capability provider from the tree
target_realm.hooks.dispatch(&event).await?;
let capability_provider = capability_provider.lock().await.take();
// If a hook in the component tree gave a capability provider, then use it.
if let Some(capability_provider) = capability_provider {
capability_provider.open(flags, open_mode, relative_path, server_chan).await?;
Ok(())
} else if let Some(cap_path) = get_framework_capability_path(&source) {
// TODO(fsamuel): This is a temporary hack. If a global path-based framework capability
// is not provided by a hook in the component tree, then attempt to connect to the service
// in component manager's namespace. We could have modeled this as a default provider,
// but several hooks (such as WorkScheduler) require that a provider is not set.
let path = cap_path.to_path_buf().attach(relative_path);
let path = path.to_str().ok_or_else(|| ModelError::path_is_not_utf8(path.clone()))?;
io_util::connect_in_namespace(path, server_chan, flags).map_err(|e| {
ModelError::capability_discovery_error(format!(
"Failed to connect to capability in component manager's namespace: {}",
e
))
})
} else {
Err(ModelError::capability_discovery_error(format!(
"No capability provider was found for {:?}",
relative_path
)))
}
}
/// Routes a `UseDecl::Storage` to the component instance providing the backing directory and
/// opens its isolated storage with `server_chan`.
pub async fn route_and_open_storage_capability<'a>(
use_decl: &'a UseStorageDecl,
open_mode: u32,
target_realm: &'a Arc<Realm>,
server_chan: zx::Channel,
) -> Result<(), ModelError> {
// TODO: Actually use `CapabilityState` to apply rights.
let (dir_source_realm, dir_source_path, relative_moniker, _) =
route_storage_capability(use_decl, target_realm).await?;
let storage_dir_proxy = storage::open_isolated_storage(
dir_source_realm,
&dir_source_path,
use_decl.type_(),
&relative_moniker,
open_mode,
)
.await
.map_err(|e| ModelError::from(e))?;
// clone the final connection to connect the channel we're routing to its destination
storage_dir_proxy.clone(fio::CLONE_FLAG_SAME_RIGHTS, ServerEnd::new(server_chan)).map_err(
|e| {
ModelError::capability_discovery_error(format!(
"Failed to clone storage directory for {}: {}",
relative_moniker, e
))
},
)?;
Ok(())
}
/// Routes a `UseDecl::Storage` to the component instance providing the backing directory and
/// deletes its isolated storage.
pub(super) async fn route_and_delete_storage<'a>(
use_decl: &'a UseStorageDecl,
target_realm: &'a Arc<Realm>,
) -> Result<(), ModelError> {
let (dir_source_realm, dir_source_path, relative_moniker, _) =
route_storage_capability(use_decl, target_realm).await?;
storage::delete_isolated_storage(dir_source_realm, &dir_source_path, &relative_moniker)
.await
.map_err(|e| ModelError::from(e))?;
Ok(())
}
/// Assuming `use_decl` is a UseStorage declaration, returns information about the source of the
/// storage capability, including:
/// - AbsoluteMoniker of the component hosting the backing directory capability
/// - Path to the backing directory capability
/// - Relative moniker between the backing directory component and the consumer, which identifies
/// the isolated storage directory.
async fn route_storage_capability<'a>(
use_decl: &'a UseStorageDecl,
target_realm: &'a Arc<Realm>,
) -> Result<(Option<Arc<Realm>>, CapabilityPath, RelativeMoniker, CapabilityState), ModelError> {
// Walk the offer chain to find the storage decl
let parent_realm =
target_realm.try_get_parent()?.ok_or(ModelError::capability_discovery_error(format!(
"Storage capabilities cannot come from component manager's namespace."
)))?;
// Storage capabilities are always require rw rights to be valid so this must be
// explicitly encoded into its starting walk state.
let capability = ComponentCapability::Use(UseDecl::Storage(use_decl.clone()));
let cap_state = CapabilityState::new(&capability);
let mut pos = WalkPosition {
capability,
cap_state,
last_child_moniker: target_realm.abs_moniker.path().last().map(|c| c.clone()),
realm: Some(parent_realm),
};
let source = walk_offer_chain(&mut pos).await?;
let (storage_decl, source_realm) = match source {
Some(CapabilitySource::StorageDecl(decl, realm)) => (decl, realm.upgrade()?),
_ => {
return Err(ModelError::capability_discovery_error(format!(
"Storage capability must come from a storage declaration."
)))
}
};
let relative_moniker =
RelativeMoniker::from_absolute(&source_realm.abs_moniker, &target_realm.abs_moniker);
// Find the path and source of the directory consumed by the storage capability.
let (dir_source_path, dir_source_realm, cap_state) = match storage_decl.source {
StorageDirectorySource::Self_ => {
(storage_decl.source_path, Some(source_realm), pos.cap_state)
}
StorageDirectorySource::Realm => {
let capability = ComponentCapability::Storage(storage_decl);
let (source, cap_state) = find_capability_source(capability, &source_realm).await?;
match source {
CapabilitySource::Component { capability, realm } => {
(capability.source_path().unwrap().clone(), Some(realm.upgrade()?), cap_state)
}
CapabilitySource::Framework { capability, scope_moniker: None } => {
(capability.path().unwrap().clone(), None, cap_state)
}
CapabilitySource::Framework { scope_moniker: Some(_), .. } => panic!(
"using scoped framework capabilities for storage declarations is unsupported"
),
CapabilitySource::StorageDecl(..) => {
panic!("storage directory sources can't come from storage declarations")
}
}
}
StorageDirectorySource::Child(ref name) => {
let mut pos = {
let partial = PartialMoniker::new(name.to_string(), None);
let realm_state = source_realm.lock_resolved_state().await?;
let child_realm = realm_state.get_live_child_realm(&partial).ok_or(
ModelError::capability_discovery_error(format!(
"The directory backing storage capability `{}` at `{}` is sourced from \
child `{}`, but this child does not exist.",
storage_decl.name, source_realm.abs_moniker, partial,
)),
)?;
let capability = ComponentCapability::Storage(storage_decl);
WalkPosition {
capability,
cap_state: pos.cap_state.clone(),
last_child_moniker: None,
realm: Some(child_realm),
}
};
let source = walk_expose_chain(&mut pos).await?;
match source {
CapabilitySource::Component { capability, realm } => (
capability.source_path().unwrap().clone(),
Some(realm.upgrade()?),
pos.cap_state,
),
_ => {
return Err(ModelError::capability_discovery_error(format!(
"Storage capability backing directory must be provided by a component."
)))
}
}
}
};
Ok((dir_source_realm, dir_source_path, relative_moniker, cap_state))
}
/// Check if a used capability is a framework service, and if so return a framework `CapabilitySource`.
async fn find_scoped_framework_capability_source<'a>(
use_decl: &'a UseDecl,
target_realm: &'a Arc<Realm>,
) -> Result<Option<CapabilitySource>, ModelError> {
if let Ok(capability) = FrameworkCapability::framework_from_use_decl(use_decl) {
return Ok(Some(CapabilitySource::Framework {
capability,
scope_moniker: Some(target_realm.abs_moniker.clone()),
}));
}
return Ok(None);
}
/// Holds state about the current position when walking the tree.
#[derive(Debug)]
struct WalkPosition {
/// The capability declaration as it's represented in the current component.
capability: ComponentCapability,
/// Holds any capability-specific state.
cap_state: CapabilityState,
/// The moniker of the child we came from.
last_child_moniker: Option<ChildMoniker>,
/// The realm of the component we are currently looking at. `None` for component manager's
/// realm.
realm: Option<Arc<Realm>>,
}
impl WalkPosition {
fn realm(&self) -> &Arc<Realm> {
&self.realm.as_ref().expect("no realm in WalkPosition")
}
fn moniker(&self) -> &AbsoluteMoniker {
&self.realm.as_ref().expect("no moniker in WalkPosition").abs_moniker
}
fn abs_last_child_moniker(&self) -> AbsoluteMoniker {
self.moniker().child(self.last_child_moniker.as_ref().expect("no child moniker").clone())
}
fn at_componentmgr_realm(&self) -> bool {
self.realm.is_none()
}
}
/// Holds state related to a capability when walking the tree
#[derive(Debug, Clone)]
enum CapabilityState {
// TODO: `dead_code` is required to compile, even though this variants is constructed by
// `new`. Compiler bug?
#[allow(dead_code)]
Directory {
/// Holds the state of the rights. This is used to enforce directory rights.
rights_state: RightWalkState,
/// Holds the subdirectory path to open.
subdir: PathBuf,
},
Other,
}
impl CapabilityState {
fn new(cap: &ComponentCapability) -> Self {
match cap {
ComponentCapability::Use(UseDecl::Directory(UseDirectoryDecl { subdir, .. }))
| ComponentCapability::Expose(ExposeDecl::Directory(ExposeDirectoryDecl {
subdir,
..
}))
| ComponentCapability::Offer(OfferDecl::Directory(OfferDirectoryDecl {
subdir, ..
})) => Self::Directory {
rights_state: RightWalkState::new(),
subdir: subdir.as_ref().map_or(PathBuf::new(), |s| PathBuf::from(s)),
},
ComponentCapability::UsedExpose(ExposeDecl::Directory(ExposeDirectoryDecl {
..
})) => Self::Directory { rights_state: RightWalkState::new(), subdir: PathBuf::new() },
ComponentCapability::Storage(_) => Self::Directory {
rights_state: RightWalkState::at(Rights::from(*READ_RIGHTS | *WRITE_RIGHTS)),
subdir: PathBuf::new(),
},
_ => Self::Other,
}
}
fn make_relative_path(&self, in_relative_path: String) -> PathBuf {
match self {
Self::Directory { subdir, .. } => subdir.clone().attach(in_relative_path),
_ => PathBuf::from(in_relative_path),
}
}
fn update_subdir(subdir: &mut PathBuf, decl_subdir: Option<PathBuf>) {
let decl_subdir = decl_subdir.unwrap_or(PathBuf::new());
let old_subdir = subdir.clone();
*subdir = decl_subdir.attach(old_subdir);
}
}
async fn find_used_capability_source<'a>(
use_decl: &'a UseDecl,
target_realm: &'a Arc<Realm>,
) -> Result<(CapabilitySource, CapabilityState), ModelError> {
let capability = ComponentCapability::Use(use_decl.clone());
if let Some(framework_capability) =
find_scoped_framework_capability_source(use_decl, target_realm).await?
{
let cap_state = CapabilityState::new(&capability);
return Ok((framework_capability, cap_state));
}
find_capability_source(capability, target_realm).await
}
/// Finds the providing realm and path of a directory exposed by the root realm to component
/// manager.
pub async fn find_exposed_root_directory_capability(
root_realm: &Arc<Realm>,
path: CapabilityPath,
) -> Result<(CapabilityPath, Arc<Realm>), ModelError> {
let expose_dir_decl = {
let realm_state = root_realm.lock_state().await;
let root_decl = realm_state
.as_ref()
.expect("find_exposed_root_directory_capability: not resolved")
.decl();
root_decl
.exposes
.iter()
.find_map(|e| match e {
ExposeDecl::Directory(dir_decl) if dir_decl.target_path == path => Some(dir_decl),
_ => None,
})
.ok_or(ModelError::capability_discovery_error(format!(
"Root component does not expose directory `{}`",
path
)))?
.clone()
};
match &expose_dir_decl.source {
cm_rust::ExposeSource::Framework => {
return Err(ModelError::capability_discovery_error(format!(
"Root component cannot expose a directory to the framework."
)))
}
cm_rust::ExposeSource::Self_ => {
return Ok((expose_dir_decl.source_path.clone(), Arc::clone(root_realm)))
}
cm_rust::ExposeSource::Child(_) => {
let capability =
ComponentCapability::UsedExpose(ExposeDecl::Directory(expose_dir_decl.clone()));
let cap_state = CapabilityState::new(&capability);
let mut wp = WalkPosition {
capability,
cap_state,
last_child_moniker: None,
realm: Some(Arc::clone(root_realm)),
};
let capability_source = walk_expose_chain(&mut wp).await?;
match capability_source {
CapabilitySource::Component {
capability:
ComponentCapability::Expose(ExposeDecl::Directory(ExposeDirectoryDecl {
source_path,
..
})),
realm,
} => return Ok((source_path, realm.upgrade()?)),
_ => {
return Err(ModelError::capability_discovery_error(format!(
"Directory must be provided by a component."
)))
}
}
}
}
}
/// Walks the component tree to return the originating source of a capability, starting on the given
/// abs_moniker, as well as the final capability state.
async fn find_capability_source<'a>(
capability: ComponentCapability,
target_realm: &'a Arc<Realm>,
) -> Result<(CapabilitySource, CapabilityState), ModelError> {
let starting_realm = target_realm.try_get_parent()?;
let cap_state = CapabilityState::new(&capability);
let mut pos = WalkPosition {
capability,
cap_state,
last_child_moniker: target_realm.abs_moniker.path().last().map(|c| c.clone()),
realm: starting_realm,
};
if let Some(source) = walk_offer_chain(&mut pos).await? {
return Ok((source, pos.cap_state));
}
let source = walk_expose_chain(&mut pos).await?;
Ok((source, pos.cap_state))
}
/// Follows `offer` declarations up the component tree, starting at `pos`. The algorithm looks
/// for a matching `offer` in the parent, as long as the `offer` is from `realm`.
///
/// Returns the source of the capability if found, or `None` if `expose` declarations must be
/// walked.
async fn
|
<'a>(
pos: &'a mut WalkPosition,
) -> Result<Option<CapabilitySource>, ModelError> {
'offerloop: loop {
if pos.at_componentmgr_realm() {
// This is a built-in capability because the routing path was traced to the component
// manager's realm.
let capability = match &pos.capability {
ComponentCapability::Use(use_decl) => {
FrameworkCapability::builtin_from_use_decl(use_decl).map_err(|_| {
ModelError::capability_discovery_error(format!(
"A `use from realm` declaration was found at root for `{}`, but no \
built-in capability matches",
pos.capability.source_id(),
))
})
}
ComponentCapability::Offer(offer_decl) => {
FrameworkCapability::builtin_from_offer_decl(offer_decl).map_err(|_| {
ModelError::capability_discovery_error(format!(
"An `offer from realm` declaration was found at root for `{}`, but no \
built-in capability matches",
pos.capability.source_id(),
))
})
}
ComponentCapability::Storage(storage_decl) => {
FrameworkCapability::builtin_from_storage_decl(storage_decl).map_err(|_| {
ModelError::capability_discovery_error(format!(
"A `storage` declaration was found at root for `{}`, but no \
built-in capability matches",
pos.capability.source_id(),
))
})
}
_ => Err(ModelError::capability_discovery_error(format!(
"Unsupported capability: {:?}",
pos.capability,
))),
}?;
return Ok(Some(CapabilitySource::Framework { capability, scope_moniker: None }));
}
let cur_realm = pos.realm().clone();
let cur_realm_state = cur_realm.lock_resolved_state().await?;
// This `decl()` is safe because the component must have been resolved to get here
let decl = cur_realm_state.decl();
let last_child_moniker = pos.last_child_moniker.as_ref().expect("no child moniker");
let offer =
pos.capability.find_offer_source(decl, last_child_moniker).ok_or_else(|| {
ModelError::capability_discovery_error(format!(
"An `offer from realm` declaration was found at `{}` for `{}`, but no matching\
`offer` declaration was found in the parent",
pos.abs_last_child_moniker(),
pos.capability.source_id(),
))
})?;
let source = match offer {
OfferDecl::Service(_) => return Err(ModelError::unsupported("Service capability")),
OfferDecl::Protocol(s) => OfferSource::Protocol(&s.source),
OfferDecl::Directory(d) => OfferSource::Directory(&d.source),
OfferDecl::Storage(s) => OfferSource::Storage(s.source()),
OfferDecl::Runner(r) => OfferSource::Runner(&r.source),
OfferDecl::Resolver(_) => return Err(ModelError::unsupported("Resolver capability")),
OfferDecl::Event(e) => OfferSource::Event(&e.source),
};
let (dir_rights, decl_subdir) = match offer {
OfferDecl::Directory(OfferDirectoryDecl { rights, subdir, .. }) => {
(rights.map(Rights::from), subdir.clone())
}
_ => (None, None),
};
match source {
OfferSource::Service(_) => {
return Err(ModelError::unsupported("Service capability"));
}
OfferSource::Directory(OfferDirectorySource::Framework) => {
// Directories offered or exposed directly from the framework are limited to
// read-only rights.
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.finalize(Some(Rights::from(*READ_RIGHTS)))?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
let capability =
FrameworkCapability::framework_from_offer_decl(offer).map_err(|_| {
ModelError::capability_discovery_error(format!(
"An `offer from framework` declaration was found at `{}` for \
`{}`, but no matching framework capability was found",
pos.moniker(),
pos.capability.source_id(),
))
})?;
return Ok(Some(CapabilitySource::Framework {
capability,
scope_moniker: Some(pos.moniker().clone()),
}));
}
OfferSource::Event(OfferEventSource::Framework) => {
// An event offered from framework is scoped to the current realm.
let capability =
FrameworkCapability::framework_from_offer_decl(offer).map_err(|_| {
ModelError::capability_discovery_error(format!(
"An `offer from framework` declaration was found at `{}` for \
`{}`, but no matching framework event was found",
pos.capability.source_id(),
pos.moniker(),
))
})?;
return Ok(Some(CapabilitySource::Framework {
capability,
scope_moniker: Some(pos.moniker().clone()),
}));
}
OfferSource::Protocol(OfferServiceSource::Realm)
| OfferSource::Storage(OfferStorageSource::Realm)
| OfferSource::Runner(OfferRunnerSource::Realm)
| OfferSource::Event(OfferEventSource::Realm) => {
// The offered capability comes from the realm, so follow the
// parent
pos.capability = ComponentCapability::Offer(offer.clone());
pos.last_child_moniker = pos.moniker().path().last().map(|c| c.clone());
pos.realm = cur_realm.try_get_parent()?;
continue 'offerloop;
}
OfferSource::Directory(OfferDirectorySource::Realm) => {
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.advance(dir_rights)?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
pos.capability = ComponentCapability::Offer(offer.clone());
pos.last_child_moniker = pos.moniker().path().last().map(|c| c.clone());
pos.realm = cur_realm.try_get_parent()?;
continue 'offerloop;
}
OfferSource::Protocol(OfferServiceSource::Self_) => {
// The offered capability comes from the current component,
// return our current location in the tree.
return Ok(Some(CapabilitySource::Component {
capability: ComponentCapability::Offer(offer.clone()),
realm: cur_realm.as_weak(),
}));
}
OfferSource::Directory(OfferDirectorySource::Self_) => {
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.finalize(dir_rights)?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
return Ok(Some(CapabilitySource::Component {
capability: ComponentCapability::Offer(offer.clone()),
realm: cur_realm.as_weak(),
}));
}
OfferSource::Runner(OfferRunnerSource::Self_) => {
// The offered capability comes from the current component.
// Find the current component's Runner declaration.
let cap = ComponentCapability::Offer(offer.clone());
return Ok(Some(CapabilitySource::Component {
capability: ComponentCapability::Runner(
cap.find_runner_source(decl)
.ok_or(ModelError::capability_discovery_error(format!(
"An `offer from self` runner declaration was found at `{}` \
for `{}`, but no matching runner declaration was found",
pos.moniker(),
cap.source_id(),
)))?
.clone(),
),
realm: cur_realm.as_weak(),
}));
}
OfferSource::Protocol(OfferServiceSource::Child(child_name))
| OfferSource::Runner(OfferRunnerSource::Child(child_name)) => {
// The offered capability comes from a child, break the loop
// and begin walking the expose chain.
pos.capability = ComponentCapability::Offer(offer.clone());
let partial = PartialMoniker::new(child_name.to_string(), None);
pos.realm = Some(cur_realm_state.get_live_child_realm(&partial).ok_or(
ModelError::capability_discovery_error(format!(
"An `offer from #{}` declaration was found at `{}` \
for `{}`, but no matching child was found",
child_name,
pos.moniker(),
pos.capability.source_id(),
)),
)?);
return Ok(None);
}
OfferSource::Directory(OfferDirectorySource::Child(child_name)) => {
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.advance(dir_rights)?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
pos.capability = ComponentCapability::Offer(offer.clone());
let partial = PartialMoniker::new(child_name.to_string(), None);
pos.realm = Some(cur_realm_state.get_live_child_realm(&partial).ok_or(
ModelError::capability_discovery_error(format!(
"An `offer from #{}` declaration was found at `{}` \
for `{}`, but no matching child was found",
child_name,
pos.moniker(),
pos.capability.source_id(),
)),
)?);
return Ok(None);
}
OfferSource::Storage(OfferStorageSource::Storage(storage_name)) => {
let storage = decl
.find_storage_source(&storage_name)
.expect("storage offer references nonexistent section");
return Ok(Some(CapabilitySource::StorageDecl(
storage.clone(),
cur_realm.as_weak(),
)));
}
}
}
}
/// Follows `expose` declarations down the component tree, starting at `pos`. The algorithm looks
/// for a matching `expose` in the child, as long as the `expose` is not from `self`.
///
/// Returns the source of the capability.
async fn walk_expose_chain<'a>(pos: &'a mut WalkPosition) -> Result<CapabilitySource, ModelError> {
loop {
// TODO(xbhatnag): See if the locking needs to be over the entire loop
// Consider -> let current_decl = { .. };
let cur_realm = pos.realm().clone();
let cur_realm_state = cur_realm.lock_resolved_state().await?;
let expose = pos.capability.find_expose_source(cur_realm_state.decl()).ok_or(match pos
.capability
{
ComponentCapability::UsedExpose(_) => ModelError::capability_discovery_error(format!(
"An exposed capability was used at `{}` for `{}`, but no matching `expose` \
declaration was found",
pos.moniker(),
pos.capability.source_id(),
)),
ComponentCapability::Expose(_) => ModelError::capability_discovery_error(format!(
"An `expose from child` declaration was found at `{}` for `{}`, but no \
matching `expose` declaration was found in the child",
pos.moniker().parent().expect("impossible source above root"),
pos.capability.source_id(),
)),
ComponentCapability::Offer(_) => ModelError::capability_discovery_error(format!(
"An `offer from child` declaration was found at `{}` for `{}`, but no \
matching `expose` declaration was found in the child",
pos.moniker().parent().expect("impossible source above root"),
pos.capability.source_id(),
)),
ComponentCapability::Storage(_) => ModelError::capability_discovery_error(format!(
"A `storage` declaration was found at `{}` for `{}`, but no matching `expose` \
declaration was found for its backing directory",
pos.moniker(),
pos.capability.source_id(),
)),
_ => {
panic!(
"Searched for an expose declaration at `{}` for `{}`, but the \
source doesn't seem like it should map to an expose declaration",
pos.moniker().parent().expect("impossible source above root"),
pos.capability.source_id()
);
}
})?;
let (source, target) = match expose {
ExposeDecl::Service(_) => return Err(ModelError::unsupported("Service capability")),
ExposeDecl::Protocol(ls) => (ExposeSource::Protocol(&ls.source), &ls.target),
ExposeDecl::Directory(d) => (ExposeSource::Directory(&d.source), &d.target),
ExposeDecl::Runner(r) => (ExposeSource::Runner(&r.source), &r.target),
ExposeDecl::Resolver(_) => return Err(ModelError::unsupported("Resolver capability")),
};
if target != &ExposeTarget::Realm {
return Err(ModelError::capability_discovery_error(format!(
"An `expose from child` declaration was found at `{}` for `{}', but no \
matching `expose` declaration was found in the child",
pos.moniker(),
pos.capability.source_id(),
)));
}
let (dir_rights, decl_subdir) = match expose {
ExposeDecl::Directory(ExposeDirectoryDecl { rights, subdir, .. }) => {
(rights.map(Rights::from), subdir.clone())
}
_ => (None, None),
};
match source {
ExposeSource::Protocol(cm_rust::ExposeSource::Self_) => {
// The offered capability comes from the current component, return our
// current location in the tree.
return Ok(CapabilitySource::Component {
capability: ComponentCapability::Expose(expose.clone()),
realm: cur_realm.as_weak(),
});
}
ExposeSource::Directory(cm_rust::ExposeSource::Self_) => {
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.finalize(dir_rights)?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
return Ok(CapabilitySource::Component {
capability: ComponentCapability::Expose(expose.clone()),
realm: cur_realm.as_weak(),
});
}
ExposeSource::Runner(cm_rust::ExposeSource::Self_) => {
// The exposed capability comes from the current component.
// Find the current component's Runner declaration.
let cap = ComponentCapability::Expose(expose.clone());
return Ok(CapabilitySource::Component {
capability: ComponentCapability::Runner(
cap.find_runner_source(cur_realm_state.decl())
.expect(&format!(
"An `expose from runner` declaration was found at `{}` for `{}`
with no corresponding runner declaration. This ComponentDecl should
not have passed validation.",
pos.moniker(),
cap.source_id()
))
.clone(),
),
realm: cur_realm.as_weak(),
});
}
ExposeSource::Protocol(cm_rust::ExposeSource::Child(child_name))
| ExposeSource::Runner(cm_rust::ExposeSource::Child(child_name)) => {
// The offered capability comes from a child, so follow the child.
pos.capability = ComponentCapability::Expose(expose.clone());
let partial = PartialMoniker::new(child_name.to_string(), None);
pos.realm = Some(cur_realm_state.get_live_child_realm(&partial).ok_or(
ModelError::capability_discovery_error(format!(
"An `expose from #{}` declaration was found at `{}` \
for `{}`, but no matching child was found",
child_name,
pos.moniker(),
pos.capability.source_id(),
)),
)?);
continue;
}
ExposeSource::Directory(cm_rust::ExposeSource::Child(child_name)) => {
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.advance(dir_rights)?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
// The offered capability comes from a child, so follow the child.
pos.capability = ComponentCapability::Expose(expose.clone());
let partial = PartialMoniker::new(child_name.to_string(), None);
pos.realm = Some(cur_realm_state.get_live_child_realm(&partial).ok_or(
ModelError::capability_discovery_error(format!(
"An `expose from #{}` declaration was found at `{}` \
for `{}`, but no matching child was found",
child_name,
pos.moniker(),
pos.capability.source_id(),
)),
)?);
continue;
}
ExposeSource::Protocol(cm_rust::ExposeSource::Framework) => {
let capability =
FrameworkCapability::framework_from_expose_decl(expose).map_err(|_| {
ModelError::capability_discovery_error(format!(
"An `expose from framework` declaration was found at `{}` for \
`{}`, but no matching framework capability was found",
pos.moniker(),
pos.capability.source_id(),
))
})?;
return Ok(CapabilitySource::Framework {
capability,
scope_moniker: Some(pos.moniker().clone()),
});
}
ExposeSource::Directory(cm_rust::ExposeSource::Framework) => {
// Directories offered or exposed directly from the framework are limited to
// read-only rights.
if let CapabilityState::Directory { rights_state, subdir } = &mut pos.cap_state {
*rights_state = rights_state.finalize(Some(Rights::from(*READ_RIGHTS)))?;
CapabilityState::update_subdir(subdir, decl_subdir);
}
let capability =
FrameworkCapability::framework_from_expose_decl(expose).map_err(|_| {
ModelError::capability_discovery_error(format!(
"An `expose from framework` declaration was found at `{}` for \
`{}`, but no matching framework capability was found",
pos.moniker(),
pos.capability.source_id(),
))
})?;
return Ok(CapabilitySource::Framework {
capability,
scope_moniker: Some(pos.moniker().clone()),
});
}
ExposeSource::Runner(cm_rust::ExposeSource::Framework) => {
return Err(ModelError::capability_discovery_error(format!(
"An `expose from framework` declaration was found at `{}` for \
`{}`, but this is not supported for runners",
pos.moniker(),
pos.capability.source_id(),
)));
}
}
}
}
|
walk_offer_chain
|
trace_elbo.py
|
from __future__ import absolute_import, division, print_function
import numbers
import warnings
import torch
from torch.autograd import Variable
import pyro
import pyro.poutine as poutine
from pyro.distributions.util import is_identically_zero
from pyro.infer.elbo import ELBO
from pyro.infer.enum import iter_discrete_traces
from pyro.infer.util import torch_backward, torch_data_sum, torch_sum
from pyro.poutine.util import prune_subsample_sites
from pyro.util import check_model_guide_match, is_nan
def check_enum_discrete_can_run(model_trace, guide_trace):
"""
Checks whether `enum_discrete` is supported for the given (model, guide) pair.
:param Trace model: A model trace.
:param Trace guide: A guide trace.
:raises: NotImplementedError
"""
# Check that all batch_log_pdf shapes are the same,
# since we currently do not correctly handle broadcasting.
model_trace.compute_batch_log_pdf()
guide_trace.compute_batch_log_pdf()
shapes = {}
for source, trace in [("model", model_trace), ("guide", guide_trace)]:
for name, site in trace.nodes.items():
if site["type"] == "sample":
shapes[site["batch_log_pdf"].size()] = (source, name)
if len(shapes) > 1:
raise NotImplementedError(
"enum_discrete does not support mixture of batched and un-batched variables. "
"Try rewriting your model to avoid batching or running with enum_discrete=False. "
"Found the following variables of different batch shapes:\n{}".format(
"\n".join(["{} {}: shape = {}".format(source, name, tuple(shape))
for shape, (source, name) in sorted(shapes.items())])))
class Trace_ELBO(ELBO):
"""
A trace implementation of ELBO-based SVI
"""
def _get_traces(self, model, guide, *args, **kwargs):
"""
runs the guide and runs the model against the guide with
the result packaged as a trace generator
"""
for i in range(self.num_particles):
if self.enum_discrete:
# This iterates over a bag of traces, for each particle.
for scale, guide_trace in iter_discrete_traces("flat", guide, *args, **kwargs):
model_trace = poutine.trace(poutine.replay(model, guide_trace),
graph_type="flat").get_trace(*args, **kwargs)
check_model_guide_match(model_trace, guide_trace)
guide_trace = prune_subsample_sites(guide_trace)
model_trace = prune_subsample_sites(model_trace)
check_enum_discrete_can_run(model_trace, guide_trace)
guide_trace.compute_score_parts()
log_r = model_trace.batch_log_pdf() - guide_trace.batch_log_pdf()
weight = scale / self.num_particles
yield weight, model_trace, guide_trace, log_r
continue
guide_trace = poutine.trace(guide).get_trace(*args, **kwargs)
model_trace = poutine.trace(poutine.replay(model, guide_trace)).get_trace(*args, **kwargs)
check_model_guide_match(model_trace, guide_trace)
guide_trace = prune_subsample_sites(guide_trace)
model_trace = prune_subsample_sites(model_trace)
guide_trace.compute_score_parts()
log_r = model_trace.log_pdf() - guide_trace.log_pdf()
weight = 1.0 / self.num_particles
yield weight, model_trace, guide_trace, log_r
def _is_batched(self, weight):
return self.enum_discrete and \
isinstance(weight, Variable) and \
weight.dim() > 0 and \
weight.size(0) > 1
def loss(self, model, guide, *args, **kwargs):
"""
:returns: returns an estimate of the ELBO
:rtype: float
Evaluates the ELBO with an estimator that uses num_particles many samples/particles.
"""
elbo = 0.0
for weight, model_trace, guide_trace, log_r in self._get_traces(model, guide, *args, **kwargs):
elbo_particle = weight * 0
if self._is_batched(weight):
log_pdf = "batch_log_pdf"
else:
log_pdf = "log_pdf"
for name in model_trace.nodes.keys():
if model_trace.nodes[name]["type"] == "sample":
if model_trace.nodes[name]["is_observed"]:
elbo_particle += model_trace.nodes[name][log_pdf]
else:
elbo_particle += model_trace.nodes[name][log_pdf]
elbo_particle -= guide_trace.nodes[name][log_pdf]
# drop terms of weight zero to avoid nans
if isinstance(weight, numbers.Number):
if weight == 0.0:
elbo_particle = torch.zeros_like(elbo_particle)
else:
elbo_particle[weight == 0] = 0.0
elbo += torch_data_sum(weight * elbo_particle)
loss = -elbo
if is_nan(loss):
|
return loss
def loss_and_grads(self, model, guide, *args, **kwargs):
"""
:returns: returns an estimate of the ELBO
:rtype: float
Computes the ELBO as well as the surrogate ELBO that is used to form the gradient estimator.
Performs backward on the latter. Num_particle many samples are used to form the estimators.
"""
elbo = 0.0
# grab a trace from the generator
for weight, model_trace, guide_trace, log_r in self._get_traces(model, guide, *args, **kwargs):
elbo_particle = weight * 0
surrogate_elbo_particle = weight * 0
batched = self._is_batched(weight)
# compute elbo and surrogate elbo
if batched:
log_pdf = "batch_log_pdf"
else:
log_pdf = "log_pdf"
for name, model_site in model_trace.nodes.items():
if model_site["type"] == "sample":
model_log_pdf = model_site[log_pdf]
if model_site["is_observed"]:
elbo_particle += model_log_pdf
surrogate_elbo_particle += model_log_pdf
else:
guide_site = guide_trace.nodes[name]
guide_log_pdf, score_function_term, entropy_term = guide_site["score_parts"]
if not batched:
guide_log_pdf = guide_log_pdf.sum()
elbo_particle += model_log_pdf - guide_log_pdf
surrogate_elbo_particle += model_log_pdf
if not is_identically_zero(entropy_term):
if not batched:
entropy_term = entropy_term.sum()
surrogate_elbo_particle -= entropy_term
if not is_identically_zero(score_function_term):
if not batched:
score_function_term = score_function_term.sum()
surrogate_elbo_particle += log_r.detach() * score_function_term
# drop terms of weight zero to avoid nans
if isinstance(weight, numbers.Number):
if weight == 0.0:
elbo_particle = torch.zeros_like(elbo_particle)
surrogate_elbo_particle = torch.zeros_like(surrogate_elbo_particle)
else:
weight_eq_zero = (weight == 0)
elbo_particle[weight_eq_zero] = 0.0
surrogate_elbo_particle[weight_eq_zero] = 0.0
elbo += torch_data_sum(weight * elbo_particle)
surrogate_elbo_particle = torch_sum(weight * surrogate_elbo_particle)
# collect parameters to train from model and guide
trainable_params = set(site["value"]
for trace in (model_trace, guide_trace)
for site in trace.nodes.values()
if site["type"] == "param")
if trainable_params:
surrogate_loss_particle = -surrogate_elbo_particle
torch_backward(surrogate_loss_particle)
pyro.get_param_store().mark_params_active(trainable_params)
loss = -elbo
if is_nan(loss):
warnings.warn('Encountered NAN loss')
return loss
|
warnings.warn('Encountered NAN loss')
|
20211217.rs
|
use std::io::{BufRead, BufReader, Error, ErrorKind, Result};
/***********************************************/
const INPUT_FILE:&str = "20211217.txt";
/***********************************************/
fn read_input(filename: &str) -> Result<Vec<String>> {
BufReader::new(std::fs::File::open(filename)?)
.lines()
.map(|line| line?.trim().parse().map_err(|e| Error::new(ErrorKind::InvalidData, e)))
.collect()
}
/***********************************************/
fn parse_input(input: Vec<String>) -> ((i32, i32), (i32, i32)) {
let coords = input.first().unwrap_or(&String::new()).split(&['=', '.', ','][..]).filter_map(|x| x.parse::<i32>().ok()).collect::<Vec<_>>();
if coords.len() >= 4 { ((coords[0].min(coords[1]), coords[2].min(coords[3])), (coords[0].max(coords[1]), coords[2].max(coords[3]))) } else { ((0, 0), (0, 0)) }
}
/***********************************************/
fn part_1(input: &((i32, i32), (i32, i32))) {
println!("Part 1: {}", ((-input.0.1 - 1) * -input.0.1) / 2);
}
fn part_2(input: &((i32, i32), (i32, i32))) {
let mut count = 0;
for vel_y in (input.0.1 ..= -input.0.1).rev() {
for vel_x in (0 ..= input.1.0).rev() {
let mut vel = (vel_x, vel_y);
let mut x = 0;
let mut y = 0;
let mut y_max = 0;
loop {
x += vel.0;
y += vel.1;
if vel.0 > 0 {
vel.0 -= 1;
}
vel.1 -= 1;
y_max = y.max(y_max);
if x > input.1.0 || y < input.0.1 {
break;
}
if x >= input.0.0 && x <= input.1.0 && y >= input.0.1 && y <= input.1.1 {
count += 1;
break;
}
}
}
}
println!("Part 1: {}", count);
}
/***********************************************/
fn main()
|
{
let input = parse_input(read_input(INPUT_FILE).expect(&format!("Could not read {}", INPUT_FILE)));
part_1(&input);
part_2(&input);
}
|
|
s_71.js
|
search_result['71']=["topic_000000000000001A_methods--.html","ErrorController Methods",""];
|
||
mutations_type_wrapper.rs
|
use async_graphql_parser::schema::ObjectType;
use super::{
Context, Dependency, FileRender, MutationTypeWrapper, RenderType, SupportField, SupportTypeName,
};
#[derive(Debug)]
pub struct MutationsTypeWrapper<'a, 'b> {
pub doc: &'a ObjectType,
pub context: &'a Context<'b>,
}
impl<'a, 'b> FileRender for MutationsTypeWrapper<'a, 'b> {
fn super_module_name(&self) -> String {
"mutations_type".to_string()
}
}
|
self.doc.name.node.clone()
}
#[must_use]
fn description(&self) -> Option<&String> {
match &self.doc.description {
Some(_f) => panic!("Not Implemented"),
_ => None,
}
}
}
impl<'a, 'b> MutationsTypeWrapper<'a, 'b> {
#[must_use]
pub fn mutations(&self) -> Vec<MutationTypeWrapper> {
self.doc
.fields
.iter()
.map(|f| MutationTypeWrapper {
doc: &f.node,
context: self.context,
})
.collect()
}
pub fn dependencies(&self) -> Vec<Dependency> {
let mut dep: Vec<Dependency> = self
.mutations()
.iter()
.flat_map(|f| f.dependencies())
.collect();
let mut arg_dep: Vec<Dependency> = self
.mutations()
.iter()
.flat_map(|f| f.arguments_dependencies())
.collect();
dep.append(&mut arg_dep);
dep
}
}
|
impl<'a, 'b> RenderType for MutationsTypeWrapper<'a, 'b> {
#[must_use]
fn name(&self) -> String {
|
ci_lib.py
|
from __future__ import absolute_import
from __future__ import print_function
import atexit
import os
import shlex
import shutil
import subprocess
import sys
import tempfile
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
os.chdir(
os.path.join(
os.path.dirname(__file__),
'..'
)
)
#
# check_output() monkeypatch cutpasted from testlib.py
#
def subprocess__check_output(*popenargs, **kwargs):
# Missing from 2.6.
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
output, _ = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise subprocess.CalledProcessError(retcode, cmd)
return output
if not hasattr(subprocess, 'check_output'):
subprocess.check_output = subprocess__check_output
# ------------------
def have_apt():
proc = subprocess.Popen('apt --help >/dev/null 2>/dev/null', shell=True)
return proc.wait() == 0
def have_brew():
proc = subprocess.Popen('brew help >/dev/null 2>/dev/null', shell=True)
return proc.wait() == 0
def have_docker():
proc = subprocess.Popen('docker info >/dev/null 2>/dev/null', shell=True)
return proc.wait() == 0
|
# Force stdout FD 1 to be a pipe, so tools like pip don't spam progress bars.
if 'TRAVIS_HOME' in os.environ:
proc = subprocess.Popen(
args=['stdbuf', '-oL', 'cat'],
stdin=subprocess.PIPE
)
os.dup2(proc.stdin.fileno(), 1)
os.dup2(proc.stdin.fileno(), 2)
def cleanup_travis_junk(stdout=sys.stdout, stderr=sys.stderr, proc=proc):
stdout.close()
stderr.close()
proc.terminate()
atexit.register(cleanup_travis_junk)
# -----------------
def _argv(s, *args):
if args:
s %= args
return shlex.split(s)
def run(s, *args, **kwargs):
argv = ['/usr/bin/time', '--'] + _argv(s, *args)
print('Running: %s' % (argv,))
try:
ret = subprocess.check_call(argv, **kwargs)
print('Finished running: %s' % (argv,))
except Exception:
print('Exception occurred while running: %s' % (argv,))
raise
return ret
def run_batches(batches):
combine = lambda batch: 'set -x; ' + (' && '.join(
'( %s; )' % (cmd,)
for cmd in batch
))
procs = [
subprocess.Popen(combine(batch), shell=True)
for batch in batches
]
assert [proc.wait() for proc in procs] == [0] * len(procs)
def get_output(s, *args, **kwargs):
argv = _argv(s, *args)
print('Running: %s' % (argv,))
return subprocess.check_output(argv, **kwargs)
def exists_in_path(progname):
return any(os.path.exists(os.path.join(dirname, progname))
for dirname in os.environ['PATH'].split(os.pathsep))
class TempDir(object):
def __init__(self):
self.path = tempfile.mkdtemp(prefix='mitogen_ci_lib')
atexit.register(self.destroy)
def destroy(self, rmtree=shutil.rmtree):
rmtree(self.path)
class Fold(object):
def __init__(self, name):
self.name = name
def __enter__(self):
print('travis_fold:start:%s' % (self.name))
def __exit__(self, _1, _2, _3):
print('')
print('travis_fold:end:%s' % (self.name))
os.environ.setdefault('ANSIBLE_STRATEGY',
os.environ.get('STRATEGY', 'mitogen_linear'))
ANSIBLE_VERSION = os.environ.get('VER', '2.6.2')
GIT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
DISTRO = os.environ.get('DISTRO', 'debian')
DISTROS = os.environ.get('DISTROS', 'debian centos6 centos7').split()
TARGET_COUNT = int(os.environ.get('TARGET_COUNT', '2'))
BASE_PORT = 2200
TMP = TempDir().path
# We copy this out of the way to avoid random stuff modifying perms in the Git
# tree (like git pull).
src_key_file = os.path.join(GIT_ROOT,
'tests/data/docker/mitogen__has_sudo_pubkey.key')
key_file = os.path.join(TMP,
'mitogen__has_sudo_pubkey.key')
shutil.copyfile(src_key_file, key_file)
os.chmod(key_file, int('0600', 8))
os.environ['PYTHONDONTWRITEBYTECODE'] = 'x'
os.environ['PYTHONPATH'] = '%s:%s' % (
os.environ.get('PYTHONPATH', ''),
GIT_ROOT
)
def get_docker_hostname():
url = os.environ.get('DOCKER_HOST')
if url in (None, 'http+docker://localunixsocket'):
return 'localhost'
parsed = urlparse.urlparse(url)
return parsed.netloc.partition(':')[0]
def image_for_distro(distro):
return 'mitogen/%s-test' % (distro.partition('-')[0],)
def make_containers(name_prefix='', port_offset=0):
docker_hostname = get_docker_hostname()
firstbit = lambda s: (s+'-').split('-')[0]
secondbit = lambda s: (s+'-').split('-')[1]
i = 1
lst = []
for distro in DISTROS:
distro, star, count = distro.partition('*')
if star:
count = int(count)
else:
count = 1
for x in range(count):
lst.append({
"distro": firstbit(distro),
"name": name_prefix + ("target-%s-%s" % (distro, i)),
"hostname": docker_hostname,
"port": BASE_PORT + i + port_offset,
"python_path": (
'/usr/bin/python3'
if secondbit(distro) == 'py3'
else '/usr/bin/python'
)
})
i += 1
return lst
# ssh removed from here because 'linear' strategy relies on processes that hang
# around after the Ansible run completes
INTERESTING_COMMS = ('python', 'sudo', 'su', 'doas')
def proc_is_docker(pid):
try:
fp = open('/proc/%s/cgroup' % (pid,), 'r')
except IOError:
return False
try:
return 'docker' in fp.read()
finally:
fp.close()
def get_interesting_procs(container_name=None):
args = ['ps', 'ax', '-oppid=', '-opid=', '-ocomm=', '-ocommand=']
if container_name is not None:
args = ['docker', 'exec', container_name] + args
out = []
for line in subprocess__check_output(args).decode().splitlines():
ppid, pid, comm, rest = line.split(None, 3)
if (
(
any(comm.startswith(s) for s in INTERESTING_COMMS) or
'mitogen:' in rest
) and
(
container_name is not None or
(not proc_is_docker(pid))
)
):
out.append((int(pid), line))
return sorted(out)
def start_containers(containers):
if os.environ.get('KEEP'):
return
run_batches([
[
"docker rm -f %(name)s || true" % container,
"docker run "
"--rm "
# "--cpuset-cpus 0,1 "
"--detach "
"--privileged "
"--cap-add=SYS_PTRACE "
"--publish 0.0.0.0:%(port)s:22/tcp "
"--hostname=%(name)s "
"--name=%(name)s "
"mitogen/%(distro)s-test "
% container
]
for container in containers
])
for container in containers:
container['interesting'] = get_interesting_procs(container['name'])
return containers
def verify_procs(hostname, old, new):
oldpids = set(pid for pid, _ in old)
if any(pid not in oldpids for pid, _ in new):
print('%r had stray processes running:' % (hostname,))
for pid, line in new:
if pid not in oldpids:
print('New process:', line)
print()
return False
return True
def check_stray_processes(old, containers=None):
ok = True
new = get_interesting_procs()
if old is not None:
ok &= verify_procs('test host machine', old, new)
for container in containers or ():
ok &= verify_procs(
container['name'],
container['interesting'],
get_interesting_procs(container['name'])
)
assert ok, 'stray processes were found'
def dump_file(path):
print()
print('--- %s ---' % (path,))
print()
with open(path, 'r') as fp:
print(fp.read().rstrip())
print('---')
print()
# SSH passes these through to the container when run interactively, causing
# stdout to get messed up with libc warnings.
os.environ.pop('LANG', None)
os.environ.pop('LC_ALL', None)
|
# -----------------
# Force line buffering on stdout.
sys.stdout = os.fdopen(1, 'w', 1)
|
questionnaire.js
|
function parseJson(s) {
var XSSI_PREFIX = ")]}'";
return JSON.parse(s.replace(XSSI_PREFIX, ""));
}
function
|
(key, xsrfToken, button) {
var formData = $("#" + key).serializeArray();
var request = JSON.stringify({
"xsrf_token": xsrfToken,
"key": key,
"payload": {
"form_data": formData
}
});
$.ajax({
type: "POST",
url: "rest/modules/questionnaire",
data: {"request": request},
dataType: "text",
success: function(data) {
onAjaxPostFormData(data, button);
}
});
gcbTagEventAudit({key: key, form_data: formData}, "questionnaire");
}
function onAjaxPostFormData(data, button) {
var data = parseJson(data);
if (data.status == 200) {
cbShowMsgAutoHide(data.message);
$(button).parent().find("div.post-message").removeClass("hidden");
} else {
cbShowMsg(data.message);
}
}
function ajaxGetFormData(xsrfToken, key, button, singleSubmission) {
$.ajax({
type: "GET",
url: "rest/modules/questionnaire",
data: {"xsrf_token": xsrfToken, "key": key},
dataType: "text",
success: function(data) {
onAjaxGetFormData(data, key, button, singleSubmission);
}
});
}
function onAjaxGetFormData(data, key, button, singleSubmission) {
var data = parseJson(data);
if (data.status == 200) {
var payload = JSON.parse(data.payload || "{}");
var form_data = payload.form_data || [];
setFormData(form_data, key);
if (form_data.length && singleSubmission) {
disableForm(button, key);
cbShowMsg(button.data('single-submission-message'));
}
}
else {
cbShowMsg(data.message);
return;
}
}
function setFormData(data, key) {
for (var i=0; i < data.length; i++) {
var name = data[i].name;
var value = data[i].value;
var elt = $("#" + key).find("[name='" + name + "']");
var tagName = elt.prop("tagName");
var type = elt.attr("type");
if (tagName == "SELECT" && elt.attr("multiple")) {
elt.find("> option").each(function() {
if ($(this).val() == value) {
this.selected = true;
}
});
}
else if (tagName == "TEXTAREA" || tagName == "SELECT") {
elt.val(value);
}
else {
switch(type) {
case "checkbox":
elt.filter("[value='" + value + "']").prop("checked", true);
break;
case "radio":
elt.filter("[value='" + value + "']").prop("checked", true);
break;
default:
elt.val(value);
break;
}
}
}
}
function disableForm(button, key) {
$("#" + key).find("input,select,textarea").prop("disabled", true);
$(button).prop("disabled", true);
}
function init() {
$("div.gcb-questionnaire > button.questionnaire-button").each(function(i, button) {
button = $(button);
var xsrfToken = button.data("xsrf-token");
var key = button.data("form-id");
var disabled = button.data("disabled");
var singleSubmission = button.data("single-submission");
var registered = button.data("registered");
if (! registered) {
cbShowMsg(button.data("registered-message"));
disableForm(button, key);
} else {
ajaxGetFormData(xsrfToken, key, button, singleSubmission);
if (disabled) {
disableForm(button, key);
} else {
button.click(function() {
onSubmitButtonClick(key, xsrfToken, button);
return false;
});
}
}
});
}
init();
|
onSubmitButtonClick
|
code_generate.py
|
from lex import tsymbol_dict
from expression import *
from code_generate_table import *
from code_generate_utils import *
class CodeGenerator(object):
def __init__(self, tree):
self.tree = tree
self.base, self.offset, self.width = 1, 1, 1
self.TERMINAL, self.NONTERMINAL = 0, 1
self.lvalue, self.rvalue = None, None
self.labelNum = 0
self.opcodeName = opcodeName
self.symbolTable = list()
self.symLevel = 0
self.ucode_str = ""
def generate(self):
ptr = self.tree
self.initSymbolTable()
p = ptr.son
while p:
if p.token["type"] == nodeNumber.DCL:
self.processDeclaration(p.son)
elif p.token["type"] == nodeNumber.FUNC_DEF:
self.processFuncHeader(p.son)
else:
icg_error(3)
p = p.brother
globalSize = self.offset - 1
p = ptr.son
while p:
if p.token["type"] == nodeNumber.FUNC_DEF:
self.processFunction(p)
p = p.brother
self.emit1(opcode.bgn, globalSize)
self.emit0(opcode.ldp)
self.emitJump(opcode.call, "main")
self.emit0(opcode.endop)
def initSymbolTable(self):
self.symbolTable.clear()
### DECLARATION
def insert(self, name, typeSpecifier, typeQualifier, base, offset, width, initialValue):
item = {"name": name,
"typeSpecifier": typeSpecifier,
"typeQualifier": typeQualifier,
"base": base,
"offset": offset,
"width": width,
"initialValue": initialValue,
"level": self.symLevel}
self.symbolTable.append(item)
def processDeclaration(self, ptr):
if not ptr.token["type"] == nodeNumber.DCL_SPEC:
raise AttributeError("icg_error(4)")
typeSpecifier = typeEnum.INT_TYPE
typeQualifier = typeEnum.VAR_TYPE
p = ptr.son
while p:
if p.token["type"] == nodeNumber.INT_NODE:
typeSpecifier = typeEnum.INT_TYPE
elif p.token["type"] == nodeNumber.CONST_NODE:
typeQualifier = typeEnum.CONST_TYPE
else:
print("processDeclaration: not yet implemented")
p = p.brother
p = ptr.brother
if not p.token["type"] == nodeNumber.DCL_ITEM:
raise AttributeError("icg_error")
switch_case = {nodeNumber.SIMPLE_VAR: self.processSimpleVariable,
nodeNumber.ARRAY_VAR: self.processArrayVariable}
while p:
q = p.son
token_number = q.token["type"]
if token_number in switch_case:
switch_case[token_number](q, typeSpecifier, typeQualifier)
else:
print("error in SIMPLE_VAR or ARRAY_VAR")
p = p.brother
def processSimpleVariable(self, ptr, typeSpecifier, typeQualifier):
p = ptr.son
q = ptr.brother
sign = 1
if not ptr.token["type"] == nodeNumber.SIMPLE_VAR:
print("error in SIMPLE_VAR")
if typeQualifier == typeEnum.CONST_TYPE:
if q is None:
print(ptr.son.token["value"], " must have a constant value")
return
if q.token["type"] == nodeNumber.UNARY_MINUS:
sign = -1
q = q.son
initialValue = sign * q.token["value"]
stIndex = self.insert(p.token["value"], typeSpecifier, typeQualifier,
0, 0, 0, initialValue)
else:
size = typeSize(typeSpecifier)
stIndex = self.insert(p.token["value"], typeSpecifier, typeQualifier,
self.base, self.offset, self.width, 0)
self.offset += size
def processArrayVariable(self, ptr, typeSpecifier, typeQualifier):
p = ptr.son
if not ptr.token["type"] == nodeNumber.ARRAY_VAR:
print("error in ARRAY_VAR")
return
if p.brother is None:
print("array size must be specified")
else:
size = int(p.brother.token["value"])
size *= typeSize(typeSpecifier)
stIndex = self.insert(p.token["value"], typeSpecifier, typeQualifier,
self.base, self.offset, size, 0)
self.offset += size
### EXPRESSION
def lookup(self, name):
for i, item in enumerate(self.symbolTable):
print(item["name"], self.symLevel, item["level"])
if item["name"] == name and item["level"] == self.symLevel:
return i
return -1
def emit0(self, opcode):
self.ucode_str += " {}\n".format(self.opcodeName[opcode])
def emit1(self, opcode, operand):
self.ucode_str += " {} {}\n".format(self.opcodeName[opcode], operand)
def emit2(self, opcode, operand1, operand2):
self.ucode_str += " {} {} {}\n".format(self.opcodeName[opcode], operand1, operand2)
def emit3(self, opcode, operand1, operand2, operand3):
self.ucode_str += " {} {} {} {}\n".format(self.opcodeName[opcode], operand1, operand2, operand3)
def emitJump(self, opcode, label):
self.ucode_str += " {} {}\n".format(self.opcodeName[opcode], label)
def rv_emit(self, ptr):
if ptr.token["type"] == tsymbol_dict["tnumber"]:
self.emit1(opcode.ldc, ptr.token["value"])
else:
stIndex = self.lookup(ptr.token["value"])
if stIndex == -1:
return
if self.symbolTable[stIndex]["typeQualifier"] == typeEnum.CONST_TYPE:
self.emit1(opcode.ldc, self.symbolTable[stIndex]["initialValue"])
elif self.symbolTable[stIndex]["width"] > 1:
self.emit2(opcode.lda, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"])
else:
self.emit2(opcode.lod, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"])
def read_emit(self, ptr):
if ptr.token["type"] == tsymbol_dict["tnumber"]:
self.emit1(opcode.ldc, ptr.token["value"])
else:
stIndex = self.lookup(ptr.token["value"])
if stIndex == -1:
return
if self.symbolTable[stIndex]["typeQualifier"] == typeEnum.CONST_TYPE:
self.emit1(opcode.ldc, self.symbolTable[stIndex]["initialValue"])
else:
self.emit2(opcode.lda, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"])
def processOperator(self, ptr):
token_number = ptr.token["type"]
if token_number == nodeNumber.ASSIGN_OP:
lhs, rhs = ptr.son, ptr.son.brother
if lhs.noderep == self.NONTERMINAL:
self.lvalue = 1
self.processOperator(lhs)
self.lvalue = 0
if rhs.noderep == self.NONTERMINAL:
self.processOperator(rhs)
else:
self.rv_emit(rhs)
if lhs.noderep == self.TERMINAL:
stIndex = self.lookup(lhs.token["value"])
if stIndex == -1:
print("undefined variable : ", lhs.token["value"])
return
self.emit2(opcode._str, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"]) ### Need to fill out
else:
self.emit0(opcode.sti) ### Need to fill out
elif token_number == nodeNumber.ADD_ASSIGN or\
token_number == nodeNumber.SUB_ASSIGN or\
token_number == nodeNumber.MUL_ASSIGN or\
token_number == nodeNumber.DIV_ASSIGN or\
token_number == nodeNumber.MOD_ASSIGN:
lhs, rhs = ptr.son, ptr.son.brother
current_nodeNumber = ptr.token["type"]
ptr.token["type"] = nodeNumber.ASSIGN_OP
if lhs.noderep == self.NONTERMINAL:
self.lvalue = 1
self.processOperator(lhs)
self.lvalue = 0
ptr.token["type"] = current_nodeNumber
if lhs.noderep == self.NONTERMINAL:
self.processOperator(lhs)
else:
self.rv_emit(lhs)
if rhs.noderep == self.NONTERMINAL:
self.processOperator(rhs)
else:
self.rv_emit(rhs)
# step 4
if token_number == nodeNumber.ADD_ASSIGN: self.emit0(opcode.add)
elif token_number == nodeNumber.SUB_ASSIGN: self.emit0(opcode.sub)
elif token_number == nodeNumber.MUL_ASSIGN: self.emit0(opcode.mult)
elif token_number == nodeNumber.DIV_ASSIGN: self.emit0(opcode.divop)
elif token_number == nodeNumber.MOD_ASSIGN: self.emit0(opcode.modop)
# step 5
if lhs.noderep == self.TERMINAL:
stIndex = self.lookup(lhs.token["value"])
if stIndex == -1:
print("undefined variable : ", lhs.son.token["value"])
return
self.emit2(opcode._str, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"])
else:
self.emit0(opcode.sti)
elif token_number == nodeNumber.ADD or token_number == nodeNumber.SUB or\
token_number == nodeNumber.MUL or token_number == nodeNumber.DIV or\
token_number == nodeNumber.MOD or token_number == nodeNumber.EQ or\
token_number == nodeNumber.NE or token_number == nodeNumber.GT or\
token_number == nodeNumber.GE or token_number == nodeNumber.LT or\
token_number == nodeNumber.LE or\
token_number == nodeNumber.LOGICAL_AND or\
token_number == nodeNumber.LOGICAL_OR:
lhs, rhs = ptr.son, ptr.son.brother
if lhs.noderep == self.NONTERMINAL:
self.processOperator(lhs)
else:
self.rv_emit(lhs)
if rhs.noderep == self.NONTERMINAL:
self.processOperator(rhs)
else:
self.rv_emit(rhs)
# step 3
if token_number == nodeNumber.ADD: self.emit0(opcode.add)
elif token_number == nodeNumber.SUB: self.emit0(opcode.sub)
elif token_number == nodeNumber.MUL: self.emit0(opcode.mult)
elif token_number == nodeNumber.DIV: self.emit0(opcode.divop)
elif token_number == nodeNumber.MOD: self.emit0(opcode.modop)
elif token_number == nodeNumber.EQ: self.emit0(opcode.eq)
elif token_number == nodeNumber.NE: self.emit0(opcode.ne)
elif token_number == nodeNumber.GT: self.emit0(opcode.gt)
elif token_number == nodeNumber.LT: self.emit0(opcode.lt)
elif token_number == nodeNumber.GE: self.emit0(opcode.ge)
elif token_number == nodeNumber.LE: self.emit0(opcode.le)
elif token_number == nodeNumber.LOGICAL_AND: self.emit0(opcode.andop)
elif token_number == nodeNumber.LOGICAL_OR: self.emit0(opcode.orop)
elif token_number == nodeNumber.UNARY_MINUS or\
token_number == nodeNumber.LOGICAL_NOT:
p = ptr.son
if p.noderep == self.NONTERMINAL:
self.processOperator(p)
else:
self.rv_emit(p)
if token_number == nodeNumber.UNARY_MINUS: self.emit0(opcode.neg)
elif token_number == nodeNumber.LOGICAL_NOT: self.emit0(opcode.notop)
## switch something
elif token_number == nodeNumber.PRE_INC or token_number == nodeNumber.PRE_DEC or\
token_number == nodeNumber.POST_INC or token_number == nodeNumber.POST_DEC:
p = ptr.son
if p.noderep == self.NONTERMINAL:
self.processOperator(p)
else:
self.rv_emit(p)
q = p
while not q.noderep == self.TERMINAL:
q = q.son
if q is None or not q.token["type"] == tsymbol_dict["tident"]:
print("increment/decrement operators can not be applied in expression")
return
stIndex = self.lookup(q.token["value"])
if stIndex == -1:
return
if token_number == nodeNumber.PRE_INC or token_number == nodeNumber.POST_INC:
self.emit0(opcode.incop)
elif token_number == nodeNumber.PRE_DEC or token_number == nodeNumber.POST_DEC:
self.emit0(opcode.decop)
if p.noderep == self.TERMINAL:
stIndex = self.lookup(p.token["value"])
if stIndex == -1:
return
self.emit2(opcode._str, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"]) # Need to do
elif p.token["type"] == nodeNumber.INDEX:
self.lvalue = 1
self.processOperator(p)
self.lvalue = 0
self.emit0(opcode.swp)
self.emit0(opcode.sti)
else:
print("error in increment/decrement operators")
elif token_number == nodeNumber.INDEX:
indexExp = ptr.son.brother
if indexExp.noderep == self.NONTERMINAL:
self.processOperator(indexExp)
else:
self.rv_emit(indexExp)
stIndex = self.lookup(ptr.son.token["value"])
if stIndex == -1:
print("undefined variable: ", ptr.son.token["value"])
return
self.emit2(opcode.lda, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"])
self.emit0(opcode.add)
if self.lvalue == 0:
self.emit0(opcode.ldi)
elif token_number == nodeNumber.CALL:
p = ptr.son
if self.checkPredefined(p):
return
functionName = p.token["value"]
print(functionName)
stIndex = self.lookup(functionName)
print(stIndex)
if stIndex == -1:
return
noArguments = self.symbolTable[stIndex]["width"]
self.emit0(opcode.ldp)
p = p.brother
while p:
if p.noderep == self.NONTERMINAL:
self.processOperator(p)
else:
self.rv_emit(p)
noArguments -= 1
p = p.brother
if noArguments > 0:
print(functionName, " : too few actual arguments")
if noArguments < 0:
print(functionName, " : too many actual arguments")
self.emitJump(opcode.call, ptr.son.token["value"])
else:
print("processOperator: not yet implemented")
def checkPredefined(self, ptr):
p = None
if ptr.token["value"] == "read":
self.emit0(opcode.ldp)
p = ptr.brother
while p:
if p.noderep == self.NONTERMINAL:
self.processOperator(p)
else:
self.read_emit(p)
p = p.brother
self.emitJump(opcode.call, "read")
return True
elif ptr.token["value"] == "write":
self.emit0(opcode.ldp)
p = ptr.brother
while p:
if p.noderep == self.NONTERMINAL:
self.processOperator(p)
else:
self.rv_emit(p)
p = p.brother
self.emitJump(opcode.call, "write")
return True
elif ptr.token["value"] == "lf":
self.emitJump(opcode.call, "lf")
return True
return False
### STATEMENT
def genLabel(self):
ret_str = "$${}".format(self.labelNum)
self.labelNum += 1
return ret_str
def emitLabel(self, label):
self.ucode_str += "{:11}{}\n".format(label, "nop")
def processCondition(self, ptr):
if ptr.noderep == self.NONTERMINAL:
self.processOperator(ptr)
else:
self.rv_emit(ptr)
def processStatement(self, ptr):
token_number = ptr.token["type"]
if token_number == nodeNumber.COMPOUND_ST:
p = ptr.son.brother
|
p = p.son
while p:
self.processStatement(p)
p = p.brother
elif token_number == nodeNumber.EXP_ST:
if ptr.son is not None:
self.processOperator(ptr.son)
elif token_number == nodeNumber.RETURN_ST:
if ptr.son is not None:
returnWithValue = 1
p = ptr.son
if p.noderep == self.NONTERMINAL:
self.processOperator(p)
else:
self.rv_emit(p)
self.emit0(opcode.retv)
else:
self.emit0(opcode.ret)
elif token_number == nodeNumber.IF_ST:
label = self.genLabel()
self.processCondition(ptr.son)
self.emitJump(opcode.fjp, label)
self.processStatement(ptr.son.brother)
self.emitLabel(label)
elif token_number == nodeNumber.IF_ELSE_ST:
label1, label2 = self.genLabel(), self.genLabel()
self.processCondition(ptr.son)
self.emitJump(opcode.fjp, label1)
self.processStatement(ptr.son.brother)
self.emitJump(opcode.ujp, label2)
self.emitLabel(label1)
self.processStatement(ptr.son.brother.brother)
self.emitLabel(label2)
elif token_number == nodeNumber.WHILE_ST:
label1, label2 = self.genLabel(), self.genLabel()
self.emitLabel(label1)
self.processCondition(ptr.son)
self.emitJump(opcode.fjp, label2)
self.processStatement(ptr.son.brother)
self.emitJump(opcode.ujp, label1)
self.emitLabel(label2)
else:
print("processStatement: not yet implemented.")
print_part_tree(ptr)
raise AttributeError("Bang!")
### FUNCTION
def processSimpleParamVariable(self, ptr, typeSpecifier, typeQualifier):
p = ptr.son
if not ptr.token["type"] == nodeNumber.SIMPLE_VAR:
print("error in SIMPLE_VAR")
size = typeSize(typeSpecifier)
stindex = self.insert(p.token["value"], typeSpecifier, typeQualifier,
self.base, self.offset, 0, 0)
self.offset += size
def processArrayParamVariable(self, ptr, typeSpecifier, typeQualifier):
p = ptr.son
if not ptr.token["type"] == nodeNumber.ARRAY_VAR:
print("error in ARRAY_VAR")
return
size = typeSize(typeSpecifier)
stIndex = self.insert(p.token["value"], typeSpecifier, typeQualifier,
base, offset, width, 0)
offset += size
def processParamDeclaration(self, ptr):
if not ptr.token["type"] == nodeNumber.DCL_SPEC:
icg_error(4)
typeSpecifier = typeEnum.INT_TYPE
typeQualifier = typeEnum.VAR_TYPE
p = ptr.son
while p:
if p.token["type"] == nodeNumber.INT_NODE:
typeSpecifier = typeEnum.INT_TYPE
elif p.token["type"] == nodeNumber.CONST_NODE:
typeQualifier = typeEnum.CONST_TYPE
else:
print("processParamDeclaration: not yet implemented")
p = p.brother
p = ptr.brother
token_number = p.token["type"]
if token_number == nodeNumber.SIMPLE_VAR:
self.processSimpleParamVariable(p, typeSpecifier, typeQualifier)
elif token_number == nodeNumber.ARRAY_VAR:
self.processArrayParamVariable(p, typeSpecifier, typeQualifier)
else:
print(token_number, nodeNumber.SIMPLE_VAR, nodeNumber.ARRAY_VAR)
print("error in SIMPLE_VAR or ARRAY_VAR")
def emitFunc(self, FuncName, operand1, operand2, operand3):
self.ucode_str += "{:11}{} {} {} {}\n".format(FuncName, "fun", operand1, operand2, operand3)
def processFuncHeader(self, ptr):
if not ptr.token["type"] == nodeNumber.FUNC_HEAD:
print("error in processFuncHeader")
p = ptr.son.son
while p:
if p.token["type"] == nodeNumber.INT_NODE:
returnType = typeEnum.INT_TYPE
elif p.token["type"] == nodeNumber.VOID_NODE:
returnType = typeEnum.VOID_TYPE
else:
print("invalid function return type")
p = p.brother
p = ptr.son.brother.brother
p = p.son
noArguments = 0
while p:
noArguments += 1
p = p.brother
stIndex = self.insert(ptr.son.brother.token["value"], returnType,
typeEnum.FUNC_TYPE, 1, 0, noArguments, 0)
def processFunction(self, ptr):
sizeOfVar, numOfVar = 0, 0
self.base += 1
self.offset = 1
if not ptr.token["type"] == nodeNumber.FUNC_DEF:
icg_error(4)
p = ptr.son.son.brother.brother
p = p.son
while p:
if p.token["type"] == nodeNumber.PARAM_DCL:
self.processParamDeclaration(p.son)
sizeOfVar += 1
numOfVar += 1
p = p.brother
p = ptr.son.brother.son.son
while p:
if p.token["type"] == nodeNumber.DCL:
self.processDeclaration(p.son)
q = p.son.brother
while q:
if q.token["type"] == nodeNumber.DCL_ITEM:
if q.son.token["type"] == nodeNumber.ARRAY_VAR:
sizeOfVar += int(q.son.son.brother.token["value"])
else:
sizeOfVar += 1
numOfVar += 1
q = q.brother
p = p.brother
p = ptr.son.son.brother
self.emitFunc(p.token["value"], sizeOfVar, self.base, 2)
for stIndex in range(len(self.symbolTable)-numOfVar, len(self.symbolTable)):
self.emit3(opcode.sym, self.symbolTable[stIndex]["base"], self.symbolTable[stIndex]["offset"],
self.symbolTable[stIndex]["width"])
p = ptr.son.brother
self.processStatement(p)
p = ptr.son.son
if p.token["type"] == nodeNumber.DCL_SPEC:
p = p.son
if p.token["type"] == nodeNumber.VOID_NODE:
self.emit0(opcode.ret)
elif p.token["type"] == nodeNumber.CONST_NODE:
if p.brother.token["type"] == nodeNumber.VOID_NODE:
self.emit0(opcode.ret)
self.emit0(opcode.endop)
self.base -= 1
#self.symLevel += 1
def write_code_to_file(self, file_name):
file_name = file_name + ".uco"
with open(file_name, 'w') as f:
f.write(self.ucode_str)
| |
bets.py
|
from fastapi import APIRouter, Depends
from ...api.dependencies.bets import get_bet_by_slug_from_path
from ...models.bets import Bet
router = APIRouter()
@router.get(
'/{slug}',
response_model=Bet,
name="bets:get-bet"
)
async def get_bet(bet=Depends(get_bet_by_slug_from_path)) -> Bet:
|
return Bet(**bet.dict())
|
|
response_modifier_test.go
|
package responsemodifiers
import (
"context"
"net/http"
"net/http/httptest"
"testing"
"github.com/containous/traefik/v2/pkg/config/dynamic"
"github.com/containous/traefik/v2/pkg/config/runtime"
"github.com/containous/traefik/v2/pkg/middlewares/headers"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func stubResponse(_ map[string]*dynamic.Middleware) *http.Response {
return &http.Response{Header: make(http.Header)}
}
func
|
(t *testing.T) {
testCases := []struct {
desc string
middlewares []string
// buildResponse is needed because secure use a private context key
buildResponse func(map[string]*dynamic.Middleware) *http.Response
conf map[string]*dynamic.Middleware
assertResponse func(*testing.T, *http.Response)
}{
{
desc: "no configuration",
middlewares: []string{"foo", "bar"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{},
assertResponse: func(t *testing.T, resp *http.Response) {},
},
{
desc: "one modifier",
middlewares: []string{"foo", "bar"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Foo": "foo"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {
t.Helper()
assert.Equal(t, "foo", resp.Header.Get("X-Foo"))
},
},
{
desc: "secure: one modifier",
middlewares: []string{"foo", "bar"},
buildResponse: func(middlewares map[string]*dynamic.Middleware) *http.Response {
ctx := context.Background()
var request *http.Request
next := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
request = req
})
headerM := *middlewares["foo"].Headers
handler, err := headers.New(ctx, next, headerM, "foo")
require.NoError(t, err)
handler.ServeHTTP(httptest.NewRecorder(),
httptest.NewRequest(http.MethodGet, "http://foo.com", nil))
return &http.Response{Header: make(http.Header), Request: request}
},
conf: map[string]*dynamic.Middleware{
"foo": {
Headers: &dynamic.Headers{
ReferrerPolicy: "no-referrer",
},
},
"bar": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Bar": "bar"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {
t.Helper()
assert.Equal(t, "no-referrer", resp.Header.Get("Referrer-Policy"))
},
},
{
desc: "two modifiers",
middlewares: []string{"foo", "bar"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Foo": "foo"},
},
},
"bar": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Bar": "bar"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {
t.Helper()
assert.Equal(t, "foo", resp.Header.Get("X-Foo"))
assert.Equal(t, "bar", resp.Header.Get("X-Bar"))
},
},
{
desc: "modifier order",
middlewares: []string{"foo", "bar"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Foo": "foo"},
},
},
"bar": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Foo": "bar"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {
t.Helper()
assert.Equal(t, "foo", resp.Header.Get("X-Foo"))
},
},
{
desc: "chain",
middlewares: []string{"chain"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Foo": "foo"},
},
},
"bar": {
Headers: &dynamic.Headers{
CustomResponseHeaders: map[string]string{"X-Foo": "bar"},
},
},
"chain": {
Chain: &dynamic.Chain{
Middlewares: []string{"foo", "bar"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {
t.Helper()
assert.Equal(t, "foo", resp.Header.Get("X-Foo"))
},
},
{
desc: "nil middleware",
middlewares: []string{"foo"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": nil,
},
assertResponse: func(t *testing.T, resp *http.Response) {},
},
{
desc: "chain without headers",
middlewares: []string{"chain"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": {IPWhiteList: &dynamic.IPWhiteList{}},
"chain": {
Chain: &dynamic.Chain{
Middlewares: []string{"foo"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {},
},
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
rtConf := runtime.NewConfig(dynamic.Configuration{
HTTP: &dynamic.HTTPConfiguration{
Middlewares: test.conf,
},
})
builder := NewBuilder(rtConf.Middlewares)
rm := builder.Build(context.Background(), test.middlewares)
if rm == nil {
return
}
resp := test.buildResponse(test.conf)
err := rm(resp)
require.NoError(t, err)
test.assertResponse(t, resp)
})
}
}
|
TestBuilderBuild
|
train.py
|
import sys
import os
from os.path import expanduser
import pickle
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
import torch.onnx
import re
import json
from PIL import Image, ImageDraw
import torch
import numpy as np
# Training script- trains a Pytorch model against the Google Quickdraw dataset:
# https://github.com/googlecreativelab/quickdraw-dataset
#
# Specifically, it uses the "simplified Drawing files":
#
# https://console.cloud.google.com/storage/browser/quickdraw_dataset/full/simplified
#
# Also see https://www.kaggle.com/google/tinyquickdraw for a single downloadable tar file
# with about 50 million samples separated into 343 classes, which is where I got mine.
#
# It expects those files to be in ~/data/quickdraw. Specify any alternate path on the command line.
#
|
#
# The model used here is a convolutional neural network accepting 1x64x64 inputs
# (i.e. black-and-white 64x64 images). Output is 344 neurons (i.e. one per label) with an extra neuron
# corresponding to label "nothing".
#
# NOTES:
#
# If doodles.pth is found (typically saved from a previous run), it will be loaded into the
# current model; otherwise it will start with a set of random weights. File size is approx. 300 MB.
#
# If it finds at any point during training that the output files doodles.pth or doodles.onnx
# are not on the drive, it will write new copies immediately with its current state (even though
# this means the first versions will only contain random weights). Deleting the files
# generates fresh copies, and so does finishing a training epoch (overwriting the prior versions).
# Because the data set is so immense, each epoch takes several hours to complete.
# In practice, with this model, performance levels off after about 3-4 epochs, with the network
# agreeing with Google's classification about 73% of the time.
#
# This way, if you need to edit a hyperparameter or go to work, you can pause execution by
# deleting the current doodles.pth and doodles.onnx files, letting it write new ones,
# and then hitting Ctrl-C. Typically you will want to adjust the learning rate downward
# or experiment with a different optimizer after the script has run for a few hours and
# its performance has reached a plateau. After you make your edits the script will pick up
# where it left off.
#
# If SAVE_BACKUP_FILES is set to True, the script will save backups as training progresses.
# Each time performance reaches a new record, a file will be saved with a filename indicating the
# new record number of correct responses. This is to avoid losing progress if the script crashes.
# (Raising the batch size too high can cause spurious out-of-memory errors at random times.)
# Specify data folder as command line argument; default is ~/data/quickdraw
DATA_DIRECTORY = '~/data/quickdraw'
if len(sys.argv) > 1:
DATA_DIRECTORY = sys.argv[1]
if DATA_DIRECTORY[0] == '~':
DATA_DIRECTORY = expanduser(DATA_DIRECTORY)
# Standard industry practice: Jack this number up as high as you can, then carefully lower it
# until the script stops crashing. Final value is dependent on GPU memory.
# This is a safe batch size to use on an RTX 2060 with 6 GB.
BATCH_SIZE = 1000
# Hyperparameters; both SGD and Adam work well, at least in the beginning; use SGD by default
OPTIMIZER_NAME = 'SGD'
SGD_LEARNING_RATE = 0.01
SGD_MOMENTUM = 0
ADAM_LEARNING_RATE = 0.001
ADAM_BETAS = (0.9, 0.99)
ADAM_EPSILON = 0.0001
INDEX_CACHE_FILE = './index_cache.pkl'
LABELS_FILE = './labels.txt'
STATE_DICT_FILE = './doodles.pth'
ONNX_FILE = './doodles.onnx'
SAVE_BACKUP_FILES = True
NUMBERED_STATE_DICT_FILE_TEMPLATE = './doodles_{}_of_{}.pth'
NUMBERED_ONNX_FILE_TEMPLATE = './doodles_{}_of_{}.onnx'
DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# If it's installed, turn this on to enable NVidia's Apex AMP Pytorch extension.
# This will let us do calculations in FP16 on the GPU which will save memory on the card
# and let us raise the batch size. It will also leverage RTX tensor cores on RTX cards.
# Default is set to False, because compiling and installing AMP is an involved process-
# NVidia's CUDA Toolkit to be installed on your system before you can compile it using pip.
MIXED_PRECISION = False
if MIXED_PRECISION and torch.cuda.is_available():
# See if the AMP Pytorch extension has been installed; otherwise stick to standard FP32.
# If we are using mixed precision we can raise the batch size but keep it a multiple of 8.
# All tensor dimensions must be multiples of 8 to trigger NVidia's tensor core optimizations.
try:
from apex import amp, optimizers
MIXED_PRECISION = True
BATCH_SIZE = int(BATCH_SIZE * 1.6) # Raising it by 60%
print('Using mixed precision.')
except ImportError:
MIXED_PRECISION = False
# This is a torch DataSet implementation that makes the following assumptions:
#
# 1. Data consists of a set of text files with ".ndjson" extensions in the specified directory.
# 2. Each line in the .ndjson file is a JSON string with all data for a single sample.
# 3. Each line of JSON has the following format (omitting extraneous fields):
# {"word":"elephant","drawing":[[[0, 1, 10],[25, 103, 163]],[[4,15,134,234,250],[27,22,6,4,0]]]}
# Array "drawing" has the brush strokes, each stroke a pair of arrays with x and y coordinates on a 256x256 grid.
# 4. We can build our label list by only looking at the first line of each file. (All lines have same value for "word".)
class QuickDrawDataset(torch.utils.data.Dataset):
# Take the batch size, so we know how much to pad with all-zero samples mapping to the "blank" channel.
# This way we ensure we deliver full-sized batches interspersed with a few blank samples mapping to label "nothing".
def __init__(self, dataDir, batch_size):
super(QuickDrawDataset, self).__init__()
print('Data folder: ' + dataDir)
self.dataDir = dataDir
self.filenames = list(filter(lambda x: x.endswith(".ndjson"), sorted(os.listdir(dataDir)))) #[1:20]
self.filenameByIndex = []
self.fileByteOffsetByIndex = []
self.labelListIndices = {}
self.labelList = []
for filename in self.filenames:
print('Indexing ' + filename)
file = open(dataDir + "/" + filename, "r")
byte_offset = 0
word = None
for line in file:
if (word == None):
words = re.findall('\"word\":\"([\w\s-]+)\"', line)
word = words[0]
self.labelListIndices[word] = len(self.labelList)
self.labelList.append(word)
# Only use the ones Google recognizes
if (len(re.findall('\"recognized\":true', line)) > 0):
self.filenameByIndex.append(filename)
self.fileByteOffsetByIndex.append(byte_offset)
byte_offset += len(line)
file.close()
self.labelListIndices['nothing'] = len(self.labelList)
self.labelList.append('nothing')
if MIXED_PRECISION:
# NVidia really wants tensor dimensions to be multiples of 8, make sure here
extra_nothings = 0
while len(self.labelList) % 8 > 0:
extra_nothings += 1
self.labelListIndices['nothing_{}'.format(extra_nothings)] = len(self.labelList)
self.labelList.append('nothing_{}'.format(extra_nothings))
self.paddingLength = batch_size - (len(self.filenameByIndex) % batch_size)
print('padding length {}'.format(self.paddingLength))
def __len__(self):
return len(self.filenameByIndex) + self.paddingLength
def __getitem__(self, idx):
if idx >= len(self.filenameByIndex):
# NULL sample
return torch.zeros(1, 64, 64, dtype=torch.float), self.labelListIndices['nothing']
filename = self.filenameByIndex[idx]
byte_offset = self.fileByteOffsetByIndex[idx]
file = open(self.dataDir + '/' + filename, 'r')
file.seek(byte_offset)
line = file.readline()
file.close()
# Convert line containing brush stroke coordinate list to a 256x256 image tensor using PIL
entry = json.loads(line)
drawing = entry.get('drawing')
im = Image.new("L", (256, 256))
draw = ImageDraw.Draw(im)
for stroke in drawing:
x_coords = stroke[0]
y_coords = stroke[1]
for i in range(len(x_coords) - 1):
draw.line((x_coords[i], y_coords[i], x_coords[i + 1], y_coords[i + 1]), fill=255, width=5)
im = im.resize((64, 64), Image.ANTIALIAS)
word = entry.get('word')
imageTensor = torch.tensor(np.array(im) / 256, dtype=torch.float)
# Alter image slightly to look like the inputs we're eventually going to get from the client.
# This is a limitation imposed by JavaScript which implements "antialiasing" on downsized canvases by
# nearest-neighbor downsampling, smoothed onscreen by a WebGL filter that looks nice but doesn't alter the image data,
# so we only get two-color jagged images.
#
# Tedious workarounds are possible: https://stackoverflow.com/questions/2303690/resizing-an-image-in-an-html5-canvas
THRESHOLD = 0.1
imageTensor[imageTensor >= THRESHOLD] = 1.0
imageTensor[imageTensor < THRESHOLD] = 0.0
imageTensor = imageTensor.unsqueeze(0)
return imageTensor, self.labelListIndices.get(word)
# Takes input of size Nx1x64x64, a batch of N black and white 64x64 images.
# Applies two convolutional layers and three fully connected layers.
class CNNModel(nn.Module):
# input_size is 64 (input samples are 64x64 images); num_classes is 344
def __init__(self, input_size, num_classes):
super(CNNModel, self).__init__()
self.layer1 = nn.Sequential(
nn.Conv2d(1, 32, kernel_size=5, stride=1, padding=2, bias=False),
nn.BatchNorm2d(32),
nn.ReLU(inplace=True),
nn.MaxPool2d(kernel_size=2, stride=2))
self.layer2 = nn.Sequential(
nn.Conv2d(32, 64, kernel_size=5, stride=1, padding=2, bias=False),
nn.BatchNorm2d(64),
nn.ReLU(inplace=True),
nn.MaxPool2d(kernel_size=2, stride=2))
dimension = int(64 * pow(input_size / 4, 2))
self.fc1 = nn.Sequential(nn.Linear(dimension, int(dimension / 4)), nn.Dropout(0.25))
self.fc2 = nn.Sequential(nn.Linear(int(dimension / 4), int(dimension / 8)), nn.Dropout(0.25))
self.fc3 = nn.Sequential(nn.Linear(int(dimension / 8), num_classes))
def forward(self, x):
out = self.layer1(x)
out = self.layer2(out)
out = out.view(out.size(0), -1)
out = self.fc1(out)
out = self.fc2(out)
out = self.fc3(out)
return out
# Main part
if __name__ == '__main__':
if os.path.isfile(INDEX_CACHE_FILE):
print("Loading {}".format(INDEX_CACHE_FILE))
infile = open(INDEX_CACHE_FILE, 'rb')
dataSet = pickle.load(infile)
infile.close()
else:
dataSet = QuickDrawDataset(DATA_DIRECTORY, BATCH_SIZE)
outfile = open(INDEX_CACHE_FILE, 'wb')
pickle.dump(dataSet, outfile)
outfile.close()
print("Saved {}".format(INDEX_CACHE_FILE))
if (os.path.isfile(LABELS_FILE) == False):
with open(LABELS_FILE, 'w') as f:
for label in dataSet.labelList:
f.write("%s\n" % label)
f.close()
print("Saved {}".format(LABELS_FILE))
print('Total number of labels: {}'.format(len(dataSet.labelList)))
print('Total number of samples: {}'.format(len(dataSet)))
randomSampler = torch.utils.data.RandomSampler(dataSet)
dataLoader = torch.utils.data.DataLoader(dataSet, batch_size = BATCH_SIZE, sampler = randomSampler, num_workers=4, pin_memory=True)
model = CNNModel(input_size=64, num_classes=len(dataSet.labelList)).to(DEVICE)
if (os.path.isfile(STATE_DICT_FILE)):
# We found an existing doodles.pth file! Instead of starting from scratch we'll load this one.
# and continue training it.
print("Loading {}".format(STATE_DICT_FILE))
state_dict = torch.load(STATE_DICT_FILE)
model.load_state_dict(state_dict)
optimizer = None
if (OPTIMIZER_NAME == 'SGD'):
optimizer = optim.SGD(model.parameters(), lr = SGD_LEARNING_RATE, momentum=SGD_MOMENTUM)
print('Using SGD with learning rate {} and momentum {}'.format(SGD_LEARNING_RATE, SGD_MOMENTUM))
elif (OPTIMIZER_NAME == 'Adam'):
if MIXED_PRECISION:
optimizer = optim.Adam(model.parameters(), lr = ADAM_LEARNING_RATE, betas = ADAM_BETAS, eps = ADAM_EPSILON)
else:
optimizer = optim.Adam(model.parameters(), lr = ADAM_LEARNING_RATE)
print('Using Adam with learning rate {}'.format(ADAM_LEARNING_RATE))
else:
print('No optimizer specified!')
if MIXED_PRECISION:
# Using NVidia's AMP Pytorch extension
model, optimizer = amp.initialize(model, optimizer, opt_level="O1")
criterion = nn.CrossEntropyLoss()
ROLLING_AVERAGE_RUN_LENGTH = 100
rolling = np.zeros(0)
record_rolling_average = 0
count = 0
# On my computer each epoch takes about 4 hours; the script consumes ~250 watts or about 1 kWh per epoch.
# Performance reaches a plateau after 3-4 epochs.
for epoch in range(4):
print('Epoch: {}'.format(epoch))
batch_number = 0
for i, (images, labels) in enumerate(dataLoader):
count = count + 1
images = images.to(DEVICE)
labels = labels.to(DEVICE)
optimizer.zero_grad()
outputs = model(images)
_, predicted = torch.max(outputs.data, 1)
correct = (predicted == labels).sum().item()
if (count < ROLLING_AVERAGE_RUN_LENGTH):
rolling = np.insert(rolling, 0, correct)
else:
rolling = np.roll(rolling, 1)
rolling[0] = correct
rolling_average = int(np.mean(rolling))
loss = criterion(outputs, labels)
if MIXED_PRECISION:
# Use of FP16 requires loss scaling, due to underflow error.
# See https://devblogs.nvidia.com/mixed-precision-training-deep-neural-networks/
with amp.scale_loss(loss, optimizer) as scaled_loss:
scaled_loss.backward()
else:
loss.backward()
optimizer.step()
print('EPOCH: {} BATCH: {} SIZE: {} CORRECT: {} (ROLLING AVG: {})'.format(epoch, batch_number, BATCH_SIZE, correct, rolling_average))
batch_number += 1
# print(loss.item())
# To be safe, save model whenever performance reaches a new high
if (count < 2 * ROLLING_AVERAGE_RUN_LENGTH): # (once rolling average has had time to stabilize)
record_rolling_average = max(rolling_average, record_rolling_average)
else:
if (rolling_average > record_rolling_average):
# Save model with a munged filename; e.g. doodles_706.pth
if (SAVE_BACKUP_FILES):
backupPth = NUMBERED_STATE_DICT_FILE_TEMPLATE.format(rolling_average, BATCH_SIZE)
torch.save(model.state_dict(), backupPth)
print('Saved model file {}'.format(backupPth))
# Delete the last backup .pth file we wrote to avoid filling up the drive
if (record_rolling_average > 0):
old_file = NUMBERED_STATE_DICT_FILE_TEMPLATE.format(record_rolling_average, BATCH_SIZE)
if os.path.exists(old_file):
os.remove(old_file)
# Same for ONNX
backupOnnx = NUMBERED_ONNX_FILE_TEMPLATE.format(rolling_average, BATCH_SIZE)
if MIXED_PRECISION:
with amp.disable_casts():
dummy_input = torch.randn(1, 1, 64, 64).to(DEVICE)
torch.onnx.export(model, dummy_input, backupOnnx, verbose=False)
else:
dummy_input = torch.randn(1, 1, 64, 64).to(DEVICE)
torch.onnx.export(model, dummy_input, backupOnnx, verbose=False)
print('Saved ONNX file {}'.format(backupOnnx))
# Delete the last backup ONNX file we wrote to avoid filling up the drive
if (record_rolling_average > 0):
old_file = NUMBERED_ONNX_FILE_TEMPLATE.format(record_rolling_average, BATCH_SIZE)
if os.path.exists(old_file):
os.remove(old_file)
record_rolling_average = rolling_average
# Deleting the model file during training triggers a fresh rewrite:
if (os.path.isfile(STATE_DICT_FILE) == False):
torch.save(model.state_dict(), STATE_DICT_FILE)
print('Saved model file {}'.format(STATE_DICT_FILE))
# ONNX: same policy
if (os.path.isfile(ONNX_FILE) == False):
if MIXED_PRECISION:
with amp.disable_casts():
dummy_input = torch.randn(1, 1, 64, 64).to(DEVICE)
torch.onnx.export(model, dummy_input, ONNX_FILE, verbose=False)
else:
dummy_input = torch.randn(1, 1, 64, 64).to(DEVICE)
torch.onnx.export(model, dummy_input, ONNX_FILE, verbose=False)
print('Exported ONNX file {}'.format(ONNX_FILE))
# Epoch finished
# Save the current model at the end of an epoch
torch.save(model.state_dict(), STATE_DICT_FILE)
# Export ONNX with loudmouth flag set
if (MIXED_PRECISION):
with amp.disable_casts():
dummy_input = torch.randn(1, 1, 64, 64).to(DEVICE)
torch.onnx.export(model, dummy_input, ONNX_FILE, verbose=True)
else:
dummy_input = torch.randn(1, 1, 64, 64).to(DEVICE)
torch.onnx.export(model, dummy_input, ONNX_FILE, verbose=True)
print('EPOCH {} FINISHED, SAVED {} AND {}'.format(epoch, STATE_DICT_FILE, ONNX_FILE))
|
# As output it generates two files: doodles.pth (internal format) and doodles.onnx (ONNX export format).
|
config.rs
|
use std::collections::HashMap;
use std::fs::File;
use std::time::Duration;
use serde_json;
use ::Args;
#[derive(Clone, Debug)]
pub struct SensorInfo {
address: String,
tag: String,
sensor_if: String,
}
|
pub fn new(address: String, tag: String, sensor_if: String) -> SensorInfo {
SensorInfo{
address, tag, sensor_if,
}
}
pub fn get_tag(&self) -> &str {
&self.tag
}
pub fn get_address(&self) -> &str {
&self.address
}
pub fn get_sensor_if(&self) -> &str {
&self.sensor_if
}
}
#[derive(Default, Clone, Debug)]
pub struct SensorConf {
auto: bool,
address_map: HashMap<String, SensorInfo>,
last_seen_forget: Duration,
}
impl SensorConf {
pub fn new(args: &Args) -> SensorConf {
let mut devicemap = match args.flag_devicemap {
Some(ref f) => SensorConf::parse_devicemap_file(f),
None => HashMap::new(),
};
let arg_devicemap = SensorConf::parse_arg_devicemaps(&args.arg_device);
devicemap.extend(arg_devicemap);
SensorConf{
auto: !args.flag_manual,
address_map: devicemap,
last_seen_forget: Duration::from_secs(args.flag_interval),
}
}
fn parse_devicemap_file(filename: &str) -> HashMap<String, SensorInfo> {
let f = File::open(filename)
.expect(&format!("Cannot open file {}", filename));
let v: serde_json::Value = serde_json::from_reader(f)
.map_err(|e| panic!("JSON error in {}: {}", filename, e))
.unwrap();
v.as_object()
.expect(&format!("Invalid JSON in {}, not an object", filename))
.iter()
.map(|(k, v)| {
let val = v.as_object().expect(&format!("Value not an object in {}", filename));
let address = k;
let tag = val
.get("tag")
.map(|tag|
tag.as_str().expect(&format!("tag not string in {}, device {}", filename, address))
)
.unwrap_or(address);
let sensor_if = val
.get("sensor_if")
.map(|parser|
parser.as_str().expect(&format!("sensor_if not string in {}, device {}", filename, address))
)
.unwrap_or("auto");
(
k.to_string(),
SensorInfo::new(
address.to_string(),
tag.to_string(),
sensor_if.to_string(),
)
)
})
.collect()
}
fn parse_arg_devicemaps(dev_args: &Vec<String>) -> HashMap<String, SensorInfo> {
let mut map = HashMap::new();
for arg in dev_args {
let cuts = arg.split(",").collect::<Vec<&str>>();
let addr = match cuts.get(0) {
Some(a) => a.to_string(),
None => continue,
};
let tag = cuts.get(1).map(|t| t.to_string()).unwrap_or(addr.clone());
let sensor_if = cuts.get(2).map(|s| s.to_string()).unwrap_or("auto".to_string());
let info = SensorInfo::new(addr.clone(), tag, sensor_if);
map.insert(addr, info);
}
map
}
pub fn is_auto(&self) -> bool {
self.auto
}
pub fn get_sensor_if(&self, address: &str) -> Option<&str> {
self.address_map
.get(address)
.map(|c| c.get_sensor_if())
}
pub fn get_sensor_tag(&self, address: &str) -> Option<&str> {
self.address_map
.get(address)
.map(|c| c.get_tag())
}
pub fn get_last_seen_forget(&self) -> Duration {
self.last_seen_forget
}
}
|
impl SensorInfo {
|
lib.rs
|
// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use anyhow::{anyhow, format_err, Context, Result};
use diem_logger::*;
use diem_sdk::{
client::{views::AmountView, Client as JsonRpcClient, MethodRequest},
crypto::hash::CryptoHash,
move_types::account_address::AccountAddress,
transaction_builder::{Currency, TransactionFactory},
types::{
account_config::XUS_NAME,
chain_id::ChainId,
transaction::{authenticator::AuthenticationKey, SignedTransaction, Transaction},
LocalAccount,
},
};
use futures::future::{try_join_all, FutureExt};
use itertools::zip;
use rand::{
distributions::{Distribution, Standard},
seq::{IteratorRandom, SliceRandom},
Rng, RngCore,
};
use rand_core::SeedableRng;
use std::{
cmp::{max, min},
collections::HashSet,
fmt,
num::NonZeroU64,
sync::{
atomic::{AtomicBool, AtomicU64, Ordering},
Arc,
},
time::{Duration, Instant, SystemTime},
};
use tokio::{runtime::Handle, task::JoinHandle, time};
pub mod atomic_histogram;
use atomic_histogram::*;
/// Max transactions per account in mempool
const MAX_TXN_BATCH_SIZE: usize = 100;
const MAX_TXNS: u64 = 1_000_000;
const SEND_AMOUNT: u64 = 1;
const TXN_EXPIRATION_SECONDS: u64 = 180;
const TXN_MAX_WAIT: Duration = Duration::from_secs(TXN_EXPIRATION_SECONDS as u64 + 30);
#[derive(Clone)]
pub struct EmitThreadParams {
pub wait_millis: u64,
pub wait_committed: bool,
}
impl Default for EmitThreadParams {
fn default() -> Self {
Self {
wait_millis: 0,
wait_committed: true,
}
}
}
#[derive(Clone)]
pub struct EmitJobRequest {
json_rpc_clients: Vec<JsonRpcClient>,
accounts_per_client: usize,
workers_per_endpoint: Option<usize>,
thread_params: EmitThreadParams,
gas_price: u64,
invalid_transaction_ratio: usize,
}
impl Default for EmitJobRequest {
fn default() -> Self {
Self {
json_rpc_clients: Vec::new(),
accounts_per_client: 15,
workers_per_endpoint: None,
thread_params: EmitThreadParams::default(),
gas_price: 0,
invalid_transaction_ratio: 0,
}
}
}
impl EmitJobRequest {
pub fn new(json_rpc_clients: Vec<JsonRpcClient>) -> Self {
Self::default().json_rpc_clients(json_rpc_clients)
}
pub fn json_rpc_clients(mut self, json_rpc_clients: Vec<JsonRpcClient>) -> Self {
self.json_rpc_clients = json_rpc_clients;
self
}
pub fn accounts_per_client(mut self, accounts_per_client: usize) -> Self {
self.accounts_per_client = accounts_per_client;
self
}
pub fn workers_per_endpoint(mut self, workers_per_endpoint: usize) -> Self {
self.workers_per_endpoint = Some(workers_per_endpoint);
self
}
pub fn thread_params(mut self, thread_params: EmitThreadParams) -> Self {
self.thread_params = thread_params;
self
}
pub fn gas_price(mut self, gas_price: u64) -> Self {
self.gas_price = gas_price;
self
}
pub fn invalid_transaction_ratio(mut self, invalid_transaction_ratio: usize) -> Self {
self.invalid_transaction_ratio = invalid_transaction_ratio;
self
}
pub fn fixed_tps(self, target_tps: NonZeroU64) -> Self {
let clients_count = self.json_rpc_clients.len() as u64;
let num_workers = target_tps.get() / clients_count + 1;
let wait_time = clients_count * num_workers * 1000 / target_tps.get();
self.workers_per_endpoint(num_workers as usize)
.thread_params(EmitThreadParams {
wait_millis: wait_time,
wait_committed: true,
})
.accounts_per_client(1)
}
}
#[derive(Debug, Default)]
pub struct TxnStats {
pub submitted: u64,
pub committed: u64,
pub expired: u64,
pub latency: u64,
pub latency_buckets: AtomicHistogramSnapshot,
}
#[derive(Debug, Default)]
pub struct TxnStatsRate {
pub submitted: u64,
pub committed: u64,
pub expired: u64,
pub latency: u64,
pub p99_latency: u64,
}
#[derive(Default)]
struct StatsAccumulator {
submitted: AtomicU64,
committed: AtomicU64,
expired: AtomicU64,
latency: AtomicU64,
latencies: Arc<AtomicHistogramAccumulator>,
}
struct Worker {
join_handle: JoinHandle<Vec<LocalAccount>>,
}
pub struct EmitJob {
workers: Vec<Worker>,
stop: Arc<AtomicBool>,
stats: Arc<StatsAccumulator>,
}
struct SubmissionWorker {
accounts: Vec<LocalAccount>,
client: JsonRpcClient,
all_addresses: Arc<Vec<AccountAddress>>,
stop: Arc<AtomicBool>,
params: EmitThreadParams,
stats: Arc<StatsAccumulator>,
txn_factory: TransactionFactory,
invalid_transaction_ratio: usize,
rng: ::rand::rngs::StdRng,
}
impl SubmissionWorker {
#[allow(clippy::collapsible_if)]
async fn run(mut self, gas_price: u64) -> Vec<LocalAccount> {
let wait_duration = Duration::from_millis(self.params.wait_millis);
while !self.stop.load(Ordering::Relaxed) {
let requests = self.gen_requests(gas_price);
let num_requests = requests.len();
let start_time = Instant::now();
let wait_until = start_time + wait_duration;
let mut txn_offset_time = 0u64;
for request in requests {
let cur_time = Instant::now();
txn_offset_time += (cur_time - start_time).as_millis() as u64;
self.stats.submitted.fetch_add(1, Ordering::Relaxed);
let resp = self.client.submit(&request).await;
if let Err(e) = resp {
warn!("[{:?}] Failed to submit request: {:?}", self.client, e);
}
}
if self.params.wait_committed {
if let Err(uncommitted) =
wait_for_accounts_sequence(&self.client, &mut self.accounts).await
{
let num_committed = (num_requests - uncommitted.len()) as u64;
// To avoid negative result caused by uncommitted tx occur
// Simplified from:
// end_time * num_committed - (txn_offset_time/num_requests) * num_committed
// to
// (end_time - txn_offset_time / num_requests) * num_committed
let latency = (Instant::now() - start_time).as_millis() as u64
- txn_offset_time / num_requests as u64;
let committed_latency = latency * num_committed as u64;
self.stats
.committed
.fetch_add(num_committed, Ordering::Relaxed);
self.stats
.expired
.fetch_add(uncommitted.len() as u64, Ordering::Relaxed);
self.stats
.latency
.fetch_add(committed_latency, Ordering::Relaxed);
self.stats
.latencies
.record_data_point(latency, num_committed);
info!(
"[{:?}] Transactions were not committed before expiration: {:?}",
self.client, uncommitted
);
} else {
let latency = (Instant::now() - start_time).as_millis() as u64
- txn_offset_time / num_requests as u64;
self.stats
.committed
.fetch_add(num_requests as u64, Ordering::Relaxed);
self.stats
.latency
.fetch_add(latency * num_requests as u64, Ordering::Relaxed);
self.stats
.latencies
.record_data_point(latency, num_requests as u64);
}
}
let now = Instant::now();
if wait_until > now {
time::sleep(wait_until - now).await;
}
}
self.accounts
}
fn gen_requests(&mut self, gas_price: u64) -> Vec<SignedTransaction> {
let batch_size = max(MAX_TXN_BATCH_SIZE, self.accounts.len());
let accounts = self
.accounts
.iter_mut()
.choose_multiple(&mut self.rng, batch_size);
let mut requests = Vec::with_capacity(accounts.len());
let invalid_size = if self.invalid_transaction_ratio != 0 {
// if enable mix invalid tx, at least 1 invalid tx per batch
max(1, accounts.len() * self.invalid_transaction_ratio / 100)
} else {
0
};
let mut num_valid_tx = accounts.len() - invalid_size;
for sender in accounts {
let receiver = self
.all_addresses
.choose(&mut self.rng)
.expect("all_addresses can't be empty");
let request = if num_valid_tx > 0 {
num_valid_tx -= 1;
gen_transfer_txn_request(
sender,
receiver,
SEND_AMOUNT,
&self.txn_factory,
gas_price,
)
} else {
generate_invalid_transaction(
sender,
receiver,
SEND_AMOUNT,
&self.txn_factory,
gas_price,
&requests,
&mut self.rng,
)
};
requests.push(request);
}
requests
}
}
#[derive(Debug)]
pub struct TxnEmitter<'t, 'd> {
accounts: Vec<LocalAccount>,
txn_factory: TransactionFactory,
treasury_compliance_account: &'t mut LocalAccount,
designated_dealer_account: &'d mut LocalAccount,
client: JsonRpcClient,
rng: ::rand::rngs::StdRng,
}
impl<'t, 'd> TxnEmitter<'t, 'd> {
pub fn new(
treasury_compliance_account: &'t mut LocalAccount,
designated_dealer_account: &'d mut LocalAccount,
client: JsonRpcClient,
transaction_factory: TransactionFactory,
rng: ::rand::rngs::StdRng,
) -> Self {
Self {
accounts: vec![],
txn_factory: transaction_factory,
treasury_compliance_account,
designated_dealer_account,
client,
rng,
}
}
pub fn take_account(&mut self) -> LocalAccount {
self.accounts.remove(0)
}
pub fn clear(&mut self) {
self.accounts.clear();
}
pub fn rng(&mut self) -> &mut ::rand::rngs::StdRng {
&mut self.rng
}
pub fn from_rng(&mut self) -> ::rand::rngs::StdRng {
::rand::rngs::StdRng::from_rng(self.rng()).unwrap()
}
pub async fn get_money_source(&mut self, coins_total: u64) -> Result<&mut LocalAccount> {
let client = self.client.clone();
println!("Creating and minting faucet account");
let mut faucet_account = &mut self.designated_dealer_account;
let mint_txn = gen_transfer_txn_request(
faucet_account,
&faucet_account.address(),
coins_total,
&self.txn_factory,
0,
);
execute_and_wait_transactions(&client, &mut faucet_account, vec![mint_txn])
.await
.map_err(|e| format_err!("Failed to mint into faucet account: {}", e))?;
let balance = retrieve_account_balance(&client, faucet_account.address()).await?;
for b in balance {
if b.currency.eq(XUS_NAME) {
println!(
"DD account current balances are {}, requested {} coins",
b.amount, coins_total
);
break;
}
}
Ok(faucet_account)
}
pub async fn get_seed_accounts(
&mut self,
json_rpc_clients: &[JsonRpcClient],
seed_account_num: usize,
) -> Result<Vec<LocalAccount>> {
info!("Creating and minting seeds accounts");
let mut i = 0;
let mut seed_accounts = vec![];
while i < seed_account_num {
let client = self.pick_mint_client(json_rpc_clients).clone();
let batch_size = min(MAX_TXN_BATCH_SIZE, seed_account_num - i);
let mut batch = gen_random_accounts(batch_size, self.rng());
let creation_account = &mut self.treasury_compliance_account;
let txn_factory = &self.txn_factory;
let create_requests = batch
.iter()
.map(|account| {
create_parent_vasp_request(
creation_account,
account.authentication_key(),
txn_factory,
)
})
.collect();
execute_and_wait_transactions(&client, creation_account, create_requests).await?;
i += batch_size;
seed_accounts.append(&mut batch);
}
info!("Completed creating seed accounts");
Ok(seed_accounts)
}
/// workflow of mint accounts:
/// 1. mint faucet account as the money source
/// 2. load tc account to create seed accounts(parent VASP), one seed account for each endpoint
/// 3. mint coins from faucet to new created seed accounts
/// 4. split number of requested accounts(child VASP) into equally size of groups
/// 5. each seed account take responsibility to create one size of group requested accounts and mint coins to them
/// example:
/// requested totally 100 new accounts with 10 endpoints
/// will create 10 seed accounts(parent VASP), each seed account create 10 new accounts
pub async fn mint_accounts(
&mut self,
req: &EmitJobRequest,
total_requested_accounts: usize,
) -> Result<()> {
if self.accounts.len() >= total_requested_accounts {
info!("Already have enough accounts exist, do not need to mint more");
return Ok(());
}
let num_accounts = total_requested_accounts - self.accounts.len(); // Only minting extra accounts
let coins_per_account = SEND_AMOUNT * MAX_TXNS * 10; // extra coins for secure to pay none zero gas price
let coins_total = coins_per_account * num_accounts as u64;
let txn_factory = self.txn_factory.clone();
let client = self.pick_mint_client(&req.json_rpc_clients);
// Create seed accounts with which we can create actual accounts concurrently
let seed_accounts = self
.get_seed_accounts(&req.json_rpc_clients, req.json_rpc_clients.len())
.await?;
let rng = self.from_rng();
let faucet_account = self.get_money_source(coins_total).await?;
let actual_num_seed_accounts = seed_accounts.len();
let num_new_child_accounts =
(num_accounts + actual_num_seed_accounts - 1) / actual_num_seed_accounts;
let coins_per_seed_account = coins_per_account * num_new_child_accounts as u64;
mint_to_new_accounts(
faucet_account,
&seed_accounts,
coins_per_seed_account as u64,
100,
client.clone(),
&txn_factory,
rng,
)
.await
.map_err(|e| format_err!("Failed to mint seed_accounts: {}", e))?;
println!("Completed minting seed accounts");
println!("Minting additional {} accounts", num_accounts);
// For each seed account, create a future and transfer diem from that seed account to new accounts
let account_futures = seed_accounts
.into_iter()
.enumerate()
.map(|(i, seed_account)| {
// Spawn new threads
let index = i % req.json_rpc_clients.len();
let cur_client = req.json_rpc_clients[index].clone();
create_new_accounts(
seed_account,
num_new_child_accounts,
coins_per_account,
20,
cur_client,
&txn_factory,
self.from_rng(),
)
});
let mut minted_accounts = try_join_all(account_futures)
.await
.context("Failed to mint accounts")?
.into_iter()
.flatten()
.collect();
self.accounts.append(&mut minted_accounts);
assert!(
self.accounts.len() >= num_accounts,
"Something wrong in mint_account, wanted to mint {}, only have {}",
total_requested_accounts,
self.accounts.len()
);
println!("Mint is done");
Ok(())
}
pub async fn start_job(&mut self, req: EmitJobRequest) -> Result<EmitJob> {
let workers_per_endpoint = match req.workers_per_endpoint {
Some(x) => x,
None => {
let target_threads = 300;
// Trying to create somewhere between target_threads/2..target_threads threads
// We want to have equal numbers of threads for each endpoint, so that they are equally loaded
// Otherwise things like flamegrap/perf going to show different numbers depending on which endpoint is chosen
// Also limiting number of threads as max 10 per endpoint for use cases with very small number of nodes or use --peers
min(10, max(1, target_threads / req.json_rpc_clients.len()))
}
};
let num_clients = req.json_rpc_clients.len() * workers_per_endpoint;
println!(
"Will use {} workers per endpoint with total {} endpoint clients",
workers_per_endpoint, num_clients
);
let num_accounts = req.accounts_per_client * num_clients;
println!(
"Will create {} accounts_per_client with total {} accounts",
req.accounts_per_client, num_accounts
);
self.mint_accounts(&req, num_accounts).await?;
let all_accounts = self.accounts.split_off(self.accounts.len() - num_accounts);
let mut workers = vec![];
let all_addresses: Vec<_> = all_accounts.iter().map(|d| d.address()).collect();
let all_addresses = Arc::new(all_addresses);
let mut all_accounts = all_accounts.into_iter();
let stop = Arc::new(AtomicBool::new(false));
let stats = Arc::new(StatsAccumulator::default());
let tokio_handle = Handle::current();
for client in req.json_rpc_clients {
for _ in 0..workers_per_endpoint {
let accounts = (&mut all_accounts).take(req.accounts_per_client).collect();
let all_addresses = all_addresses.clone();
let stop = stop.clone();
let params = req.thread_params.clone();
let stats = Arc::clone(&stats);
let worker = SubmissionWorker {
accounts,
client: client.clone(),
all_addresses,
stop,
params,
stats,
txn_factory: self.txn_factory.clone(),
invalid_transaction_ratio: req.invalid_transaction_ratio,
rng: self.from_rng(),
};
let join_handle = tokio_handle.spawn(worker.run(req.gas_price).boxed());
workers.push(Worker { join_handle });
}
}
info!("Tx emitter workers started");
Ok(EmitJob {
workers,
stop,
stats,
})
}
pub async fn stop_job(&mut self, job: EmitJob) -> TxnStats {
job.stop.store(true, Ordering::Relaxed);
for worker in job.workers {
let mut accounts = worker
.join_handle
.await
.expect("TxnEmitter worker thread failed");
self.accounts.append(&mut accounts);
}
job.stats.accumulate()
}
pub fn peek_job_stats(&self, job: &EmitJob) -> TxnStats {
job.stats.accumulate()
}
pub async fn
|
(&mut self, job: &EmitJob, duration: Duration, interval_secs: u64) {
let deadline = Instant::now() + duration;
let mut prev_stats: Option<TxnStats> = None;
while Instant::now() < deadline {
let window = Duration::from_secs(interval_secs);
tokio::time::sleep(window).await;
let stats = self.peek_job_stats(job);
let delta = &stats - &prev_stats.unwrap_or_default();
prev_stats = Some(stats);
info!("{}", delta.rate(window));
}
}
pub async fn emit_txn_for(
&mut self,
duration: Duration,
emit_job_request: EmitJobRequest,
) -> Result<TxnStats> {
let job = self.start_job(emit_job_request).await?;
println!("starting emitting txns for {} secs", duration.as_secs());
tokio::time::sleep(duration).await;
let stats = self.stop_job(job).await;
Ok(stats)
}
pub async fn emit_txn_for_with_stats(
&mut self,
duration: Duration,
emit_job_request: EmitJobRequest,
interval_secs: u64,
) -> Result<TxnStats> {
let job = self.start_job(emit_job_request).await?;
self.periodic_stat(&job, duration, interval_secs).await;
let stats = self.stop_job(job).await;
Ok(stats)
}
fn pick_mint_client<'a>(&mut self, clients: &'a [JsonRpcClient]) -> &'a JsonRpcClient {
clients
.choose(self.rng())
.expect("json-rpc clients can not be empty")
}
pub async fn submit_single_transaction(
&self,
client: &JsonRpcClient,
sender: &mut LocalAccount,
receiver: &AccountAddress,
num_coins: u64,
) -> Result<Instant> {
client
.submit(&gen_transfer_txn_request(
sender,
receiver,
num_coins,
&self.txn_factory,
0,
))
.await?;
let deadline = Instant::now() + TXN_MAX_WAIT;
Ok(deadline)
}
}
async fn retrieve_account_balance(
client: &JsonRpcClient,
address: AccountAddress,
) -> Result<Vec<AmountView>> {
let resp = client
.get_account(address)
.await
.map_err(|e| format_err!("[{:?}] get_accounts failed: {:?} ", client, e))?
.into_inner();
Ok(resp
.ok_or_else(|| format_err!("account does not exist"))?
.balances)
}
pub async fn execute_and_wait_transactions(
client: &JsonRpcClient,
account: &mut LocalAccount,
txn: Vec<SignedTransaction>,
) -> Result<()> {
debug!(
"[{:?}] Submitting transactions {} - {} for {}",
client,
account.sequence_number() - txn.len() as u64,
account.sequence_number(),
account.address()
);
// Batch submit all the txns
for txn_batch in txn.chunks(20) {
client
.batch(
txn_batch
.iter()
.map(MethodRequest::submit)
.collect::<Result<_, _>>()?,
)
.await?
.into_iter()
.map(|r| r.and_then(|response| response.into_inner().try_into_submit()))
.collect::<Result<Vec<()>, _>>()
.context("failed to submit transactions")?;
}
wait_for_signed_transactions(client, &txn).await?;
debug!(
"[{:?}] Account {} is at sequence number {} now",
client,
account.address(),
account.sequence_number()
);
Ok(())
}
async fn wait_for_signed_transactions(
client: &JsonRpcClient,
txns: &[SignedTransaction],
) -> Result<()> {
let deadline = Instant::now()
+ txns
.iter()
.map(SignedTransaction::expiration_timestamp_secs)
.max()
.map(Duration::from_secs)
.ok_or_else(|| anyhow!("Expected at least 1 txn"))?
.saturating_sub(SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)?);
#[allow(clippy::mutable_key_type)]
let mut uncommitted_txns = txns.iter().collect::<HashSet<_>>();
while Instant::now() < deadline {
if uncommitted_txns.is_empty() {
return Ok(());
}
let (batch, queried_txns): (Vec<MethodRequest>, Vec<&SignedTransaction>) = uncommitted_txns
.iter()
.take(20)
.map(|txn| {
(
MethodRequest::get_account_transaction(
txn.sender(),
txn.sequence_number(),
false,
),
txn,
)
})
.unzip();
let responses = client
.batch(batch)
.await
.context("failed to query account transactions")?
.into_iter()
.map(|r| {
r.and_then(|response| response.into_inner().try_into_get_account_transaction())
})
.collect::<Result<Vec<_>, _>>()
.context("failed to query account transactions")?;
for (response, txn) in responses.into_iter().zip(queried_txns) {
if let Some(txn_view) = response {
if !txn_view.vm_status.is_executed() {
return Err(anyhow!("txn failed to execute"));
}
if txn_view.hash != Transaction::UserTransaction(txn.clone()).hash() {
return Err(anyhow!("txn hash mismatch"));
}
uncommitted_txns.remove(txn);
}
}
time::sleep(Duration::from_millis(100)).await;
}
Err(anyhow!("timed out waiting for transactions"))
}
async fn wait_for_accounts_sequence(
client: &JsonRpcClient,
accounts: &mut [LocalAccount],
) -> Result<(), Vec<AccountAddress>> {
let deadline = Instant::now() + Duration::from_secs(TXN_EXPIRATION_SECONDS); //TXN_MAX_WAIT;
let addresses: Vec<_> = accounts.iter().map(|d| d.address()).collect();
let mut uncommitted = addresses.clone().into_iter().collect::<HashSet<_>>();
while Instant::now() < deadline {
match query_sequence_numbers(client, &addresses).await {
Ok(sequence_numbers) => {
for (account, sequence_number) in zip(accounts.iter(), &sequence_numbers) {
if account.sequence_number() == *sequence_number {
uncommitted.remove(&account.address());
}
}
if uncommitted.is_empty() {
return Ok(());
}
}
Err(e) => {
println!(
"Failed to query ledger info on accounts {:?} for instance {:?} : {:?}",
addresses, client, e
);
}
}
time::sleep(Duration::from_millis(500)).await;
}
Err(uncommitted.into_iter().collect())
}
pub async fn query_sequence_numbers(
client: &JsonRpcClient,
addresses: &[AccountAddress],
) -> Result<Vec<u64>> {
let mut result = vec![];
for addresses_batch in addresses.chunks(20) {
let resp = client
.batch(
addresses_batch
.iter()
.map(|a| MethodRequest::get_account(*a))
.collect(),
)
.await?
.into_iter()
.map(|r| r.map_err(anyhow::Error::new))
.map(|r| r.map(|response| response.into_inner().unwrap_get_account()))
.collect::<Result<Vec<_>>>()
.map_err(|e| format_err!("[{:?}] get_accounts failed: {:?} ", client, e))?;
for item in resp.into_iter() {
result.push(
item.ok_or_else(|| format_err!("account does not exist"))?
.sequence_number,
);
}
}
Ok(result)
}
/// Create `num_new_accounts` by transferring diem from `source_account`. Return Vec of created
/// accounts
async fn create_new_accounts<R>(
mut source_account: LocalAccount,
num_new_accounts: usize,
diem_per_new_account: u64,
max_num_accounts_per_batch: u64,
client: JsonRpcClient,
txn_factory: &TransactionFactory,
mut rng: R,
) -> Result<Vec<LocalAccount>>
where
R: ::rand_core::RngCore + ::rand_core::CryptoRng,
{
let mut i = 0;
let mut accounts = vec![];
while i < num_new_accounts {
let batch_size = min(
max_num_accounts_per_batch as usize,
min(MAX_TXN_BATCH_SIZE, num_new_accounts - i),
);
let mut batch = gen_random_accounts(batch_size, &mut rng);
let requests = batch
.as_slice()
.iter()
.map(|account| {
source_account.sign_with_transaction_builder(txn_factory.create_child_vasp_account(
Currency::XUS,
account.authentication_key(),
false,
diem_per_new_account,
))
})
.collect();
execute_and_wait_transactions(&client, &mut source_account, requests).await?;
i += batch.len();
accounts.append(&mut batch);
}
Ok(accounts)
}
/// Mint `diem_per_new_account` from `minting_account` to each account in `accounts`.
async fn mint_to_new_accounts<R>(
minting_account: &mut LocalAccount,
accounts: &[LocalAccount],
diem_per_new_account: u64,
max_num_accounts_per_batch: u64,
client: JsonRpcClient,
txn_factory: &TransactionFactory,
mut rng: R,
) -> Result<()>
where
R: ::rand_core::RngCore + ::rand_core::CryptoRng,
{
let mut left = accounts;
let mut i = 0;
let num_accounts = accounts.len();
while !left.is_empty() {
let batch_size = rng.gen::<usize>()
% min(
max_num_accounts_per_batch as usize,
min(MAX_TXN_BATCH_SIZE, num_accounts - i),
);
let (to_batch, rest) = left.split_at(batch_size + 1);
let mint_requests = to_batch
.iter()
.map(|account| {
gen_transfer_txn_request(
minting_account,
&account.address(),
diem_per_new_account,
txn_factory,
0,
)
})
.collect();
execute_and_wait_transactions(&client, minting_account, mint_requests).await?;
i += to_batch.len();
left = rest;
}
Ok(())
}
pub fn create_parent_vasp_request(
creation_account: &mut LocalAccount,
account_auth_key: AuthenticationKey,
txn_factory: &TransactionFactory,
) -> SignedTransaction {
creation_account.sign_with_transaction_builder(txn_factory.create_parent_vasp_account(
Currency::XUS,
0,
account_auth_key,
"",
false,
))
}
fn gen_random_accounts<R>(num_accounts: usize, rng: &mut R) -> Vec<LocalAccount>
where
R: ::rand_core::RngCore + ::rand_core::CryptoRng,
{
(0..num_accounts)
.map(|_| LocalAccount::generate(rng))
.collect()
}
pub fn gen_transfer_txn_request(
sender: &mut LocalAccount,
receiver: &AccountAddress,
num_coins: u64,
txn_factory: &TransactionFactory,
gas_price: u64,
) -> SignedTransaction {
sender.sign_with_transaction_builder(
txn_factory
.peer_to_peer(Currency::XUS, *receiver, num_coins)
.gas_unit_price(gas_price),
)
}
fn generate_invalid_transaction<R>(
sender: &mut LocalAccount,
receiver: &AccountAddress,
num_coins: u64,
transaction_factory: &TransactionFactory,
gas_price: u64,
reqs: &[SignedTransaction],
rng: &mut R,
) -> SignedTransaction
where
R: ::rand_core::RngCore + ::rand_core::CryptoRng,
{
let mut invalid_account = LocalAccount::generate(rng);
let invalid_address = invalid_account.address();
match Standard.sample(rng) {
InvalidTransactionType::ChainId => {
let txn_factory = transaction_factory.clone().with_chain_id(ChainId::new(255));
gen_transfer_txn_request(sender, receiver, num_coins, &txn_factory, gas_price)
}
InvalidTransactionType::Sender => gen_transfer_txn_request(
&mut invalid_account,
receiver,
num_coins,
transaction_factory,
gas_price,
),
InvalidTransactionType::Receiver => gen_transfer_txn_request(
sender,
&invalid_address,
num_coins,
transaction_factory,
gas_price,
),
InvalidTransactionType::Duplication => {
// if this is the first tx, default to generate invalid tx with wrong chain id
// otherwise, make a duplication of an exist valid tx
if reqs.is_empty() {
let txn_factory = transaction_factory.clone().with_chain_id(ChainId::new(255));
gen_transfer_txn_request(sender, receiver, num_coins, &txn_factory, gas_price)
} else {
let random_index = rng.gen_range(0..reqs.len());
reqs[random_index].clone()
}
}
}
}
impl StatsAccumulator {
pub fn accumulate(&self) -> TxnStats {
TxnStats {
submitted: self.submitted.load(Ordering::Relaxed),
committed: self.committed.load(Ordering::Relaxed),
expired: self.expired.load(Ordering::Relaxed),
latency: self.latency.load(Ordering::Relaxed),
latency_buckets: self.latencies.snapshot(),
}
}
}
impl TxnStats {
pub fn rate(&self, window: Duration) -> TxnStatsRate {
TxnStatsRate {
submitted: self.submitted / window.as_secs(),
committed: self.committed / window.as_secs(),
expired: self.expired / window.as_secs(),
latency: if self.committed == 0 {
0u64
} else {
self.latency / self.committed
},
p99_latency: self.latency_buckets.percentile(99, 100),
}
}
}
impl std::ops::Sub for &TxnStats {
type Output = TxnStats;
fn sub(self, other: &TxnStats) -> TxnStats {
TxnStats {
submitted: self.submitted - other.submitted,
committed: self.committed - other.committed,
expired: self.expired - other.expired,
latency: self.latency - other.latency,
latency_buckets: &self.latency_buckets - &other.latency_buckets,
}
}
}
impl fmt::Display for TxnStats {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"submitted: {}, committed: {}, expired: {}",
self.submitted, self.committed, self.expired,
)
}
}
impl fmt::Display for TxnStatsRate {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"submitted: {} txn/s, committed: {} txn/s, expired: {} txn/s, latency: {} ms, p99 latency: {} ms",
self.submitted, self.committed, self.expired, self.latency, self.p99_latency,
)
}
}
#[derive(Debug)]
enum InvalidTransactionType {
/// invalid tx with wrong chain id
ChainId,
/// invalid tx with sender not on chain
Sender,
/// invalid tx with receiver not on chain
Receiver,
/// duplicate an exist tx
Duplication,
}
impl Distribution<InvalidTransactionType> for Standard {
fn sample<R: RngCore + ?Sized>(&self, rng: &mut R) -> InvalidTransactionType {
match rng.gen_range(0..=3) {
0 => InvalidTransactionType::ChainId,
1 => InvalidTransactionType::Sender,
2 => InvalidTransactionType::Receiver,
_ => InvalidTransactionType::Duplication,
}
}
}
|
periodic_stat
|
pano_test.go
|
package aggregate
import (
"reflect"
"testing"
"github.com/willhu-commit/pango/testdata"
)
func TestPanoNormalization(t *testing.T)
|
{
testCases := getTests()
mc := &testdata.MockClient{}
ns := PanoramaNamespace(mc)
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
mc.Reset()
mc.AddResp("")
err := ns.Set("tmpl", "", "vr", tc.conf)
if err != nil {
t.Errorf("Error in set: %s", err)
} else {
mc.AddResp(mc.Elm)
r, err := ns.Get("tmpl", "", "vr", tc.conf.Name)
if err != nil {
t.Errorf("Error in get: %s", err)
}
if !reflect.DeepEqual(tc.conf, r) {
t.Errorf("%#v != %#v", tc.conf, r)
}
}
})
}
}
|
|
resourcefetcher.py
|
from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING
# from typing import cast as typecast
import json
import logging
import os
import yaml
from .config import Config
from .acresource import ACResource
from ..utils import parse_yaml, dump_yaml
AnyDict = Dict[str, Any]
HandlerResult = Optional[Tuple[str, List[AnyDict]]]
# Some thoughts:
# - loading a bunch of Ambassador resources is different from loading a bunch of K8s
# services, because we should assume that if we're being a fed a bunch of Ambassador
# resources, we'll get a full set. The whole 'secret loader' thing needs to have the
# concept of a TLSSecret resource that can be force-fed to us, or that can be fetched
# through the loader if needed.
# - If you're running a debug-loop Ambassador, you should just have a flat (or
# recursive, I don't care) directory full of Ambassador YAML, including TLSSecrets
# and Endpoints and whatnot, as needed. All of it will get read by
# load_from_filesystem and end up in the elements array.
# - If you're running expecting to be fed by kubewatch, at present kubewatch will
# send over K8s Service records, and anything annotated in there will end up in
# elements. This may include TLSSecrets or Endpoints. Any TLSSecret mentioned that
# isn't already in elements will need to be fetched.
# - Ambassador resources do not have namespaces. They have the ambassador_id. That's
# it. The ambassador_id is completely orthogonal to the namespace. No element with
# the wrong ambassador_id will end up in elements. It would be nice if they were
# never sent by kubewatch, but, well, y'know.
# - TLSSecret resources are not TLSContexts. TLSSecrets only have a name, a private
# half, and a public half. They do _not_ have other TLSContext information.
# - Endpoint resources probably have just a name, a service name, and an endpoint
# address.
class ResourceFetcher:
def __init__(self, logger: logging.Logger, aconf: 'Config') -> None:
self.aconf = aconf
self.logger = logger
self.elements: List[ACResource] = []
self.filename: Optional[str] = None
self.ocount: int = 1
self.saved: List[Tuple[Optional[str], int]] = []
self.k8s_endpoints: Dict[str, AnyDict] = {}
self.k8s_services: Dict[str, AnyDict] = {}
self.services: Dict[str, AnyDict] = {}
@property
def location(self):
return "%s.%d" % (self.filename or "anonymous YAML", self.ocount)
def push_location(self, filename: Optional[str], ocount: int) -> None:
self.saved.append((self.filename, self.ocount))
self.filename = filename
self.ocount = ocount
def pop_location(self) -> None:
self.filename, self.ocount = self.saved.pop()
def load_from_filesystem(self, config_dir_path, recurse: bool=False, k8s: bool=False):
|
def parse_yaml(self, serialization: str, k8s=False, rkey: Optional[str]=None,
filename: Optional[str]=None) -> None:
# self.logger.debug("%s: parsing %d byte%s of YAML:\n%s" %
# (self.location, len(serialization), "" if (len(serialization) == 1) else "s",
# serialization))
try:
objects = parse_yaml(serialization)
self.parse_object(objects=objects, k8s=k8s, rkey=rkey, filename=filename)
except yaml.error.YAMLError as e:
self.aconf.post_error("%s: could not parse YAML: %s" % (self.location, e))
self.finalize()
def parse_json(self, serialization: str, k8s=False, rkey: Optional[str]=None,
filename: Optional[str]=None) -> None:
# self.logger.debug("%s: parsing %d byte%s of YAML:\n%s" %
# (self.location, len(serialization), "" if (len(serialization) == 1) else "s",
# serialization))
try:
objects = json.loads(serialization)
self.parse_object(objects=objects, k8s=k8s, rkey=rkey, filename=filename)
except json.decoder.JSONDecodeError as e:
self.aconf.post_error("%s: could not parse YAML: %s" % (self.location, e))
self.finalize()
def parse_watt(self, serialization: str) -> None:
basedir = os.environ.get('AMBASSADOR_CONFIG_BASE_DIR', '/ambassador')
if os.path.isfile(os.path.join(basedir, '.ambassador_ignore_crds')):
self.aconf.post_error("Ambassador could not find core CRD definitions. Please visit https://www.getambassador.io/reference/core/crds/ for more information. You can continue using Ambassador via Kubernetes annotations, any configuration via CRDs will be ignored...")
if os.path.isfile(os.path.join(basedir, '.ambassador_ignore_crds_2')):
self.aconf.post_error("Ambassador could not find Resolver type CRD definitions. Please visit https://www.getambassador.io/reference/core/crds/ for more information. You can continue using Ambassador via Kubernetes annotations, any configuration via CRDs will be ignored...")
try:
watt_dict = json.loads(serialization)
watt_k8s = watt_dict.get('Kubernetes', {})
# Handle normal Kube objects...
for key in [ 'service', 'endpoints', 'secret' ]:
for obj in watt_k8s.get(key) or []:
self.handle_k8s(obj)
# ...then handle Ambassador CRDs.
for key in [ 'AuthService', 'ConsulResolver',
'KubernetesEndpointResolver', 'KubernetesServiceResolver',
'Mapping', 'Module', 'RateLimitService',
'TCPMapping', 'TLSContext', 'TracingService']:
for obj in watt_k8s.get(key) or []:
self.handle_k8s_crd(obj)
watt_consul = watt_dict.get('Consul', {})
consul_endpoints = watt_consul.get('Endpoints', {})
for consul_rkey, consul_object in consul_endpoints.items():
result = self.handle_consul_service(consul_rkey, consul_object)
if result:
rkey, parsed_objects = result
self.parse_object(parsed_objects, k8s=False,
filename=self.filename, rkey=rkey)
except json.decoder.JSONDecodeError as e:
self.aconf.post_error("%s: could not parse WATT: %s" % (self.location, e))
self.finalize()
def handle_k8s(self, obj: dict) -> None:
# self.logger.debug("handle_k8s obj %s" % json.dumps(obj, indent=4, sort_keys=True))
kind = obj.get('kind')
if not kind:
# self.logger.debug("%s: ignoring K8s object, no kind" % self.location)
return
handler_name = f'handle_k8s_{kind.lower()}'
handler = getattr(self, handler_name, None)
if not handler:
# self.logger.debug("%s: ignoring K8s object, no kind" % self.location)
return
result = handler(obj)
if result:
rkey, parsed_objects = result
self.parse_object(parsed_objects, k8s=False,
filename=self.filename, rkey=rkey)
def handle_k8s_crd(self, obj: dict) -> None:
# CRDs are _not_ allowed to have embedded objects in annotations, because ew.
kind = obj.get('kind')
if not kind:
self.logger.debug("%s: ignoring K8s CRD, no kind" % self.location)
return
apiVersion = obj.get('apiVersion')
metadata = obj.get('metadata') or {}
name = metadata.get('name')
namespace = metadata.get('namespace') or 'default'
spec = obj.get('spec') or {}
if not name:
self.logger.debug(f'{self.location}: ignoring K8s {kind} CRD, no name')
return
if not apiVersion:
self.logger.debug(f'{self.location}: ignoring K8s {kind} CRD {name}: no apiVersion')
return
# if not spec:
# self.logger.debug(f'{self.location}: ignoring K8s {kind} CRD {name}: no spec')
# return
# We use this resource identifier as a key into self.k8s_services, and of course for logging .
resource_identifier = f'{name}.{namespace}'
# OK. Shallow copy 'spec'...
amb_object = dict(spec)
# ...and then stuff in a couple of other things.
amb_object['apiVersion'] = apiVersion
amb_object['name'] = name
amb_object['kind'] = kind
# Done. Parse it.
self.parse_object([ amb_object ], k8s=False, filename=self.filename, rkey=resource_identifier)
def parse_object(self, objects, k8s=False, rkey: Optional[str]=None, filename: Optional[str]=None):
self.push_location(filename, 1)
# self.logger.debug("PARSE_OBJECT: incoming %d" % len(objects))
for obj in objects:
self.logger.debug("PARSE_OBJECT: checking %s" % obj)
if k8s:
self.handle_k8s(obj)
else:
# if not obj:
# self.logger.debug("%s: empty object from %s" % (self.location, serialization))
self.process_object(obj, rkey=rkey)
self.ocount += 1
self.pop_location()
def process_object(self, obj: dict, rkey: Optional[str]=None) -> None:
if not isinstance(obj, dict):
# Bug!!
if not obj:
self.aconf.post_error("%s is empty" % self.location)
else:
self.aconf.post_error("%s is not a dictionary? %s" %
(self.location, json.dumps(obj, indent=4, sort_keys=4)))
return
if not self.aconf.good_ambassador_id(obj):
# self.logger.debug("%s ignoring K8s Service with mismatched ambassador_id" % self.location)
return
if 'kind' not in obj:
# Bug!!
self.aconf.post_error("%s is missing 'kind'?? %s" %
(self.location, json.dumps(obj, indent=4, sort_keys=True)))
return
# self.logger.debug("%s PROCESS %s initial rkey %s" % (self.location, obj['kind'], rkey))
# Is this a pragma object?
if obj['kind'] == 'Pragma':
# Why did I think this was a good idea? [ :) ]
new_source = obj.get('source', None)
if new_source:
# We don't save the old self.filename here, so this change will last until
# the next input source (or the next Pragma).
self.filename = new_source
# Don't count Pragma objects, since the user generally doesn't write them.
self.ocount -= 1
return
if not rkey:
rkey = self.filename
rkey = "%s.%d" % (rkey, self.ocount)
# self.logger.debug("%s PROCESS %s updated rkey to %s" % (self.location, obj['kind'], rkey))
# Fine. Fine fine fine.
serialization = dump_yaml(obj, default_flow_style=False)
r = ACResource.from_dict(rkey, rkey, serialization, obj)
self.elements.append(r)
# self.logger.debug("%s PROCESS %s save %s: %s" % (self.location, obj['kind'], rkey, serialization))
def sorted(self, key=lambda x: x.rkey): # returns an iterator, probably
return sorted(self.elements, key=key)
def handle_k8s_endpoints(self, k8s_object: AnyDict) -> HandlerResult:
# Don't include Endpoints unless endpoint routing is enabled.
if not Config.enable_endpoints:
return None
metadata = k8s_object.get('metadata', None)
resource_name = metadata.get('name') if metadata else None
resource_namespace = metadata.get('namespace', 'default') if metadata else None
resource_subsets = k8s_object.get('subsets', None)
skip = False
if not metadata:
self.logger.debug("ignoring K8s Endpoints with no metadata")
skip = True
if not resource_name:
self.logger.debug("ignoring K8s Endpoints with no name")
skip = True
if not resource_subsets:
self.logger.debug(f"ignoring K8s Endpoints {resource_name}.{resource_namespace} with no subsets")
skip = True
if skip:
return None
# We use this resource identifier as a key into self.k8s_services, and of course for logging .
resource_identifier = '{name}.{namespace}'.format(namespace=resource_namespace, name=resource_name)
# K8s Endpoints resources are _stupid_ in that they give you a vector of
# IP addresses and a vector of ports, and you have to assume that every
# IP address listens on every port, and that the semantics of each port
# are identical. The first is usually a good assumption. The second is not:
# people routinely list 80 and 443 for the same service, for example,
# despite the fact that one is HTTP and the other is HTTPS.
#
# By the time the ResourceFetcher is done, we want to be working with
# Ambassador Service resources, which have an array of address:port entries
# for endpoints. So we're going to extract the address and port numbers
# as arrays of tuples and stash them for later.
#
# In Kubernetes-speak, the Endpoints resource has some metadata and a set
# of "subsets" (though I've personally never seen more than one subset in
# one of these things).
for subset in resource_subsets:
# K8s subset addresses have some node info in with the IP address.
# May as well save that too.
addresses = []
for address in subset.get('addresses', []):
addr = {}
ip = address.get('ip', None)
if ip is not None:
addr['ip'] = ip
node = address.get('nodeName', None)
if node is not None:
addr['node'] = node
target_ref = address.get('targetRef', None)
if target_ref is not None:
target_kind = target_ref.get('kind', None)
if target_kind is not None:
addr['target_kind'] = target_kind
target_name = target_ref.get('name', None)
if target_name is not None:
addr['target_name'] = target_name
target_namespace = target_ref.get('namespace', None)
if target_namespace is not None:
addr['target_namespace'] = target_namespace
if len(addr) > 0:
addresses.append(addr)
# If we got no addresses, there's no point in messing with ports.
if len(addresses) == 0:
continue
ports = subset.get('ports', [])
# A service can reference a port either by name or by port number.
port_dict = {}
for port in ports:
port_name = port.get('name', None)
port_number = port.get('port', None)
port_proto = port.get('protocol', 'TCP').upper()
if port_proto != 'TCP':
continue
if port_number is None:
# WTFO.
continue
port_dict[str(port_number)] = port_number
if port_name:
port_dict[port_name] = port_number
if port_dict:
# We're not going to actually return this: we'll just stash it for our
# later resolution pass.
self.k8s_endpoints[resource_identifier] = {
'name': resource_name,
'namespace': resource_namespace,
'addresses': addresses,
'ports': port_dict
}
else:
self.logger.debug(f"ignoring K8s Endpoints {resource_identifier} with no routable ports")
return None
def handle_k8s_service(self, k8s_object: AnyDict) -> HandlerResult:
# The annoying bit about K8s Service resources is that not only do we have to look
# inside them for Ambassador resources, but we also have to save their info for
# later endpoint resolution too.
#
# Again, we're trusting that the input isn't overly bloated on that latter bit.
metadata = k8s_object.get('metadata', None)
resource_name = metadata.get('name') if metadata else None
resource_namespace = metadata.get('namespace', 'default') if metadata else None
annotations = metadata.get('annotations', None) if metadata else None
if annotations:
annotations = annotations.get('getambassador.io/config', None)
skip = False
if not metadata:
self.logger.debug("ignoring K8s Service with no metadata")
skip = True
if not skip and not resource_name:
self.logger.debug("ignoring K8s Service with no name")
skip = True
if not skip and (Config.single_namespace and (resource_namespace != Config.ambassador_namespace)):
# This should never happen in actual usage, since we shouldn't be given things
# in the wrong namespace. However, in development, this can happen a lot.
self.logger.debug(f"ignoring K8s Service {resource_name}.{resource_namespace} in wrong namespace")
skip = True
if skip:
return None
# We use this resource identifier as a key into self.k8s_services, and of course for logging .
resource_identifier = f'{resource_name}.{resource_namespace}'
# Not skipping. First, if we have some actual ports, stash this in self.k8s_services
# for later resolution.
spec = k8s_object.get('spec', None)
ports = spec.get('ports', None) if spec else None
if spec and ports:
self.k8s_services[resource_identifier] = {
'name': resource_name,
'namespace': resource_namespace,
'ports': ports
}
else:
self.logger.debug(f"not saving K8s Service {resource_name}.{resource_namespace} with no ports")
objects: List[Any] = []
if annotations:
if (self.filename is not None) and (not self.filename.endswith(":annotation")):
self.filename += ":annotation"
try:
objects = parse_yaml(annotations)
except yaml.error.YAMLError as e:
self.logger.debug("could not parse YAML: %s" % e)
return resource_identifier, objects
# Handler for K8s Secret resources.
def handle_k8s_secret(self, k8s_object: AnyDict) -> HandlerResult:
# XXX Another one where we shouldn't be saving everything.
secret_type = k8s_object.get('type', None)
metadata = k8s_object.get('metadata', None)
resource_name = metadata.get('name') if metadata else None
resource_namespace = metadata.get('namespace', 'default') if metadata else None
data = k8s_object.get('data', None)
skip = False
if (secret_type != 'kubernetes.io/tls') and (secret_type != 'Opaque'):
self.logger.debug("ignoring K8s Secret with unknown type %s" % secret_type)
skip = True
if not data:
self.logger.debug("ignoring K8s Secret with no data")
skip = True
if not metadata:
self.logger.debug("ignoring K8s Secret with no metadata")
skip = True
if not resource_name:
self.logger.debug("ignoring K8s Secret with no name")
skip = True
if not skip and (Config.single_namespace and (resource_namespace != Config.ambassador_namespace)):
# This should never happen in actual usage, since we shouldn't be given things
# in the wrong namespace. However, in development, this can happen a lot.
self.logger.debug("ignoring K8s Secret in wrong namespace")
skip = True
if skip:
return None
# This resource identifier is useful for log output since filenames can be duplicated (multiple subdirectories)
resource_identifier = f'{resource_name}.{resource_namespace}'
tls_crt = data.get('tls.crt', None)
tls_key = data.get('tls.key', None)
if not tls_crt and not tls_key:
# Uh. WTFO?
self.logger.debug(f'ignoring K8s Secret {resource_identifier} with no keys')
return None
# No need to muck about with resolution later, just immediately turn this
# into an Ambassador Secret resource.
secret_info = {
'apiVersion': 'ambassador/v1',
'ambassador_id': Config.ambassador_id,
'kind': 'Secret',
'name': resource_name,
'namespace': resource_namespace
}
if tls_crt:
secret_info['tls_crt'] = tls_crt
if tls_key:
secret_info['tls_key'] = tls_key
return resource_identifier, [ secret_info ]
# Handler for Consul services
def handle_consul_service(self,
consul_rkey: str, consul_object: AnyDict) -> HandlerResult:
# resource_identifier = f'consul-{consul_rkey}'
endpoints = consul_object.get('Endpoints', [])
name = consul_object.get('Service', consul_rkey)
if len(endpoints) < 1:
# Bzzt.
self.logger.debug(f"ignoring Consul service {name} with no Endpoints")
return None
# We can turn this directly into an Ambassador Service resource, since Consul keeps
# services and endpoints together (as it should!!).
#
# Note that we currently trust the association ID to contain the datacenter name.
# That's a function of the watch_hook putting it there.
svc = {
'apiVersion': 'ambassador/v1',
'ambassador_id': Config.ambassador_id,
'kind': 'Service',
'name': name,
'datacenter': consul_object.get('Id') or 'dc1',
'endpoints': {}
}
for ep in endpoints:
ep_addr = ep.get('Address')
ep_port = ep.get('Port')
if not ep_addr or not ep_port:
self.logger.debug(f"ignoring Consul service {name} endpoint {ep['ID']} missing address info")
continue
# Consul services don't have the weird indirections that Kube services do, so just
# lump all the endpoints together under the same source port of '*'.
svc_eps = svc['endpoints'].setdefault('*', [])
svc_eps.append({
'ip': ep_addr,
'port': ep_port,
'target_kind': 'Consul'
})
# Once again: don't return this. Instead, save it in self.services.
self.services[f"consul-{name}-{svc['datacenter']}"] = svc
return None
def finalize(self) -> None:
# The point here is to sort out self.k8s_services and self.k8s_endpoints and
# turn them into proper Ambassador Service resources. This is a bit annoying,
# because of the annoyances of Kubernetes, but we'll give it a go.
#
# Here are the rules:
#
# 1. By the time we get here, we have a _complete_ set of Ambassador resources that
# have passed muster by virtue of having the correct namespace, the correct
# ambassador_id, etc. (They may have duplicate names at this point, admittedly.)
# Any service not mentioned by name is out. Since the Ambassador resources in
# self.elements are in fact AResources, we can farm this out to code for each
# resource.
#
# 2. The check is, by design, permissive. If in doubt, write the check to leave
# the resource in.
#
# 3. For any service that stays in, we vet its listed ports against self.k8s_endpoints.
# Anything with no matching ports is _not_ dropped; it is assumed to use service
# routing rather than endpoint routing.
od = {
'elements': [ x.as_dict() for x in self.elements ],
'k8s_endpoints': self.k8s_endpoints,
'k8s_services': self.k8s_services,
'services': self.services
}
# self.logger.debug("==== FINALIZE START\n%s" % json.dumps(od, sort_keys=True, indent=4))
for key, k8s_svc in self.k8s_services.items():
# See if we can find endpoints for this service.
k8s_ep = self.k8s_endpoints.get(key, None)
k8s_ep_ports = k8s_ep.get('ports', None) if k8s_ep else None
k8s_name = k8s_svc['name']
k8s_namespace = k8s_svc['namespace']
# OK, Kube is weird. The way all this works goes like this:
#
# 1. When you create a Kube Service, Kube will allocate a clusterIP
# for it and update DNS to resolve the name of the service to
# that clusterIP.
# 2. Kube will look over the pods matched by the Service's selectors
# and stick those pods' IP addresses into Endpoints for the Service.
# 3. The Service will have ports listed. These service.port entries can
# contain:
# port -- a port number you can talk to at the clusterIP
# name -- a name for this port
# targetPort -- a port number you can talk to at the _endpoint_ IP
# We'll call the 'port' entry here the "service-port".
# 4. If you talk to clusterIP:service-port, you will get magically
# proxied by the Kube CNI to a target port at one of the endpoint IPs.
#
# The $64K question is: how does Kube decide which target port to use?
#
# First, if there's only one endpoint port, that's the one that gets used.
#
# If there's more than one, if the Service's port entry has a targetPort
# number, it uses that. Otherwise it tries to find an endpoint port with
# the same name as the service port. Otherwise, I dunno, it punts and uses
# the service-port.
#
# So that's how Ambassador is going to do it, for each Service port entry.
#
# If we have no endpoints at all, Ambassador will end up routing using
# just the service name and port per the Mapping's service spec.
target_ports = {}
target_addrs = []
svc_endpoints = {}
if not k8s_ep or not k8s_ep_ports:
# No endpoints at all, so we're done with this service.
self.logger.debug(f'{key}: no endpoints at all')
else:
idx = -1
for port in k8s_svc['ports']:
idx += 1
k8s_target: Optional[int] = None
src_port = port.get('port', None)
if not src_port:
# WTFO. This is impossible.
self.logger.error(f"Kubernetes service {key} has no port number at index {idx}?")
continue
if len(k8s_ep_ports) == 1:
# Just one endpoint port. Done.
k8s_target = list(k8s_ep_ports.values())[0]
target_ports[src_port] = k8s_target
self.logger.debug(f'{key} port {src_port}: single endpoint port {k8s_target}')
continue
# Hmmm, we need to try to actually map whatever ports are listed for
# this service. Oh well.
found_key = False
fallback: Optional[int] = None
for attr in [ 'targetPort', 'name', 'port' ]:
port_key = port.get(attr) # This could be a name or a number, in general.
if port_key:
found_key = True
if not fallback and (port_key != 'name') and str(port_key).isdigit():
# fallback can only be digits.
fallback = port_key
# Do we have a destination port for this?
k8s_target = k8s_ep_ports.get(str(port_key), None)
if k8s_target:
self.logger.debug(f'{key} port {src_port} #{idx}: {attr} {port_key} -> {k8s_target}')
break
else:
self.logger.debug(f'{key} port {src_port} #{idx}: {attr} {port_key} -> miss')
if not found_key:
# WTFO. This is impossible.
self.logger.error(f"Kubernetes service {key} port {src_port} has an empty port spec at index {idx}?")
continue
if not k8s_target:
# This is most likely because we don't have endpoint info at all, so we'll do service
# routing.
#
# It's actually impossible for fallback to be unset, but WTF.
k8s_target = fallback or src_port
self.logger.debug(f'{key} port {src_port} #{idx}: falling back to {k8s_target}')
target_ports[src_port] = k8s_target
if not target_ports:
# WTFO. This is impossible. I guess we'll fall back to service routing.
self.logger.error(f"Kubernetes service {key} has no routable ports at all?")
# OK. Once _that's_ done we have to take the endpoint addresses into
# account, or just use the service name if we don't have that.
k8s_ep_addrs = k8s_ep.get('addresses', None)
if k8s_ep_addrs:
for addr in k8s_ep_addrs:
ip = addr.get('ip', None)
if ip:
target_addrs.append(ip)
# OK! If we have no target addresses, just use service routing.
if not target_addrs:
self.logger.debug(f'{key} falling back to service routing')
target_addrs = [ key ]
for src_port, target_port in target_ports.items():
svc_endpoints[src_port] = [ {
'ip': target_addr,
'port': target_port
} for target_addr in target_addrs ]
# Nope. Set this up for service routing.
self.services[f'k8s-{k8s_name}-{k8s_namespace}'] = {
'apiVersion': 'ambassador/v1',
'ambassador_id': Config.ambassador_id,
'kind': 'Service',
'name': k8s_name,
'namespace': k8s_namespace,
'endpoints': svc_endpoints
}
# OK. After all that, go turn all of the things in self.services into Ambassador
# Service resources.
for key, svc in self.services.items():
serialization = dump_yaml(svc, default_flow_style=False)
r = ACResource.from_dict(key, key, serialization, svc)
self.elements.append(r)
od = {
'elements': [ x.as_dict() for x in self.elements ],
'k8s_endpoints': self.k8s_endpoints,
'k8s_services': self.k8s_services,
'services': self.services
}
# self.logger.debug("==== FINALIZE END\n%s" % json.dumps(od, sort_keys=True, indent=4))
|
inputs: List[Tuple[str, str]] = []
if os.path.isdir(config_dir_path):
dirs = [ config_dir_path ]
while dirs:
dirpath = dirs.pop(0)
for filename in os.listdir(dirpath):
filepath = os.path.join(dirpath, filename)
if recurse and os.path.isdir(filepath):
# self.logger.debug("%s: RECURSE" % filepath)
dirs.append(filepath)
continue
if not os.path.isfile(filepath):
# self.logger.debug("%s: SKIP non-file" % filepath)
continue
if not filename.lower().endswith('.yaml'):
# self.logger.debug("%s: SKIP non-YAML" % filepath)
continue
# self.logger.debug("%s: SAVE configuration file" % filepath)
inputs.append((filepath, filename))
else:
# this allows a file to be passed into the ambassador cli
# rather than just a directory
inputs.append((config_dir_path, os.path.basename(config_dir_path)))
for filepath, filename in inputs:
self.logger.info("reading %s (%s)" % (filename, filepath))
try:
serialization = open(filepath, "r").read()
self.parse_yaml(serialization, k8s=k8s, filename=filename)
except IOError as e:
self.aconf.post_error("could not read YAML from %s: %s" % (filepath, e))
self.finalize()
|
musegen.py
|
# Currently this script is configured to use the note-generator model.
from config import sequence_length, output_dir, note_generator_dir
from helper import loadChorales, loadModelAndWeights, createPitchSpecificVocabularies, createDurationVocabularySpecific
from music21 import note, instrument, stream, duration
import numpy as np
import os
# disable GPU processing
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = ""
# ----------------------------------------------
from keras.utils import to_categorical
# select the epoch to use when loading the weights of the model generator
generator_epoch = 43
# how many notes to generate ('end' marks are created along the way and the result is split into pieces)
number_of_notes = 200
# load chorales to create the vocabularies
print('loading chorales...')
notes = loadChorales()
# create the vocabulary
note_vocab, note_names_vocab, note_vocab_categorical = createPitchSpecificVocabularies([x[0] for (x, _) in notes])
duration_vocab = createDurationVocabularySpecific([d for (_, d) in notes])
duration_vocab_categorical = to_categorical(range(len(duration_vocab)))
note_to_int = dict((note, number) for number, note in enumerate(note_vocab))
int_to_note = dict((number, note) for number, note in enumerate(note_vocab))
duration_to_int = dict((dur, number) for number, dur in enumerate(duration_vocab))
duration_dim = duration_vocab.shape[0]
pitch_dim = np.array(note_vocab).shape[0]
print('loading networks...')
dir_path = os.path.dirname(os.path.realpath(__file__))
generator = loadModelAndWeights(os.path.join(dir_path, note_generator_dir, 'model.json'),
os.path.join(dir_path, note_generator_dir, 'weights-{:02d}.hdf5'.format(generator_epoch)))
# make a melody!!!
pitch_input = np.eye(pitch_dim)[np.random.choice(pitch_dim, size=sequence_length)]
duration_input = np.eye(duration_dim)[np.random.choice(duration_dim, size=sequence_length)]
print('generating output...')
# generate notes
generator_output = []
for _ in range(number_of_notes):
# reshape inputs
pi = np.reshape(pitch_input, (1, sequence_length, pitch_dim))
di = np.reshape(duration_input, (1, sequence_length, duration_dim))
# make prediction
pitch_pred, dur_pred = generator.predict({'pitches_input': pi, 'durations_input': di}, verbose=0)
generator_output.append((pitch_pred, dur_pred))
pitch_input = np.vstack([pitch_input, pitch_pred])
pitch_input = pitch_input[1:len(pitch_input)]
duration_input = np.vstack([duration_input, dur_pred])
duration_input = duration_input[1:len(duration_input)]
output_notes = [(int_to_note[np.argmax(n)], duration_vocab[np.argmax(d)]) for (n, d) in generator_output]
output_notes = np.array(output_notes)
output_notes = np.reshape(output_notes, (-1, 2))
# output_notes contains: pitch values in midi format (integers), 'rest' marks, 'end' marks
# split the generated notes into pieces based on 'end' marks
indices = []
for (ind, (n, _)) in enumerate(output_notes):
if n == 'end':
indices.append(ind)
indices = np.insert(np.reshape(indices, (-1)), 0, 0)
pieces = [output_notes]
if len(indices) > 1:
pieces = ([ output_notes[(indices[j] + 1):indices[j + 1] ] for j in range(len(indices) - 1)])
print('writing output to disk...')
os.makedirs(os.path.join(dir_path, output_dir, 'note-generator'), exist_ok=True)
# output pieces to midi files
for index, notes in enumerate(pieces):
midi_notes = []
offset = 0
for n, d in notes:
# since a duration of 0 is included in the vocabulary (for the 'end' marks), the network may generate a 0 duration for other notes
# naively correct and report this erroneous behaviour
if abs(float(d)) < 0.001:
print('found zero duration')
d = '1.0'
if n == 'rest':
new_note = note.Rest()
new_note.duration = duration.Duration(float(d))
new_note.offset = offset
new_note.storedInstrument = instrument.Piano()
midi_notes.append(new_note)
else:
new_note = note.Note(int(n))
new_note.duration = duration.Duration(float(d))
new_note.offset = offset
new_note.storedInstrument = instrument.Piano()
|
midi_stream.write('midi', fp=os.path.join(dir_path, output_dir, 'note-generator', 'sample-{}.mid'.format(index)))
|
midi_notes.append(new_note)
offset += float(d)
midi_stream = stream.Stream(midi_notes)
|
form.go
|
//----------------------------------------
// The code is automatically generated by the GenlibLcl tool.
// Copyright © ying32. All Rights Reserved.
//
// Licensed under Apache License 2.0
//
//----------------------------------------
package lcl
import (
. "github.com/rarnu/golcl/lcl/api"
. "github.com/rarnu/golcl/lcl/types"
"unsafe"
)
type TForm struct {
IWinControl
instance uintptr
// 特殊情况下使用,主要应对Go的GC问题,与LCL没有太多关系。
ptr unsafe.Pointer
}
// 创建一个新的对象。
//
// Create a new object.
func NewForm(owner IComponent) *TForm {
f := new(TForm)
f.instance = Form_Create(CheckPtr(owner))
f.ptr = unsafe.Pointer(f.instance)
return f
}
// 动态转换一个已存在的对象实例。
//
// Dynamically convert an existing object instance.
func AsForm(obj interface{}) *TForm {
instance, ptr := getInstance(obj)
if instance == 0 {
return nil
}
return &TForm{instance: instance, ptr: ptr}
}
// -------------------------- Deprecated begin --------------------------
// 新建一个对象来自已经存在的对象实例指针。
//
// Create a new object from an existing object instance pointer.
// Deprecated: use AsForm.
func FormFromInst(inst uintptr) *TForm {
return AsForm(inst)
}
// 新建一个对象来自已经存在的对象实例。
//
// Create a new object from an existing object instance.
// Deprecated: use AsForm.
func FormFromObj(obj IObject) *TForm {
return AsForm(obj)
}
// 新建一个对象来自不安全的地址。注意:使用此函数可能造成一些不明情况,慎用。
//
// Create a new object from an unsecured address. Note: Using this function may cause some unclear situations and be used with caution..
// Deprecated: use AsForm.
func FormFromUnsafePointer(ptr unsafe.Pointer) *TForm {
return AsForm(ptr)
}
// -------------------------- Deprecated end --------------------------
// 释放对象。
//
// Free object.
func (f *TForm) Free() {
if f.instance != 0 {
Form_Free(f.instance)
f.instance, f.ptr = 0, nullptr
}
}
// 返回对象实例指针。
|
stance pointer.
func (f *TForm) Instance() uintptr {
return f.instance
}
// 获取一个不安全的地址。
//
// Get an unsafe address.
func (f *TForm) UnsafeAddr() unsafe.Pointer {
return f.ptr
}
// 检测地址是否为空。
//
// Check if the address is empty.
func (f *TForm) IsValid() bool {
return f.instance != 0
}
// 检测当前对象是否继承自目标对象。
//
// Checks whether the current object is inherited from the target object.
func (f *TForm) Is() TIs {
return TIs(f.instance)
}
// 动态转换当前对象为目标对象。
//
// Dynamically convert the current object to the target object.
//func (f *TForm) As() TAs {
// return TAs(f.instance)
//}
// 获取类信息指针。
//
// Get class information pointer.
func TFormClass() TClass {
return Form_StaticClassType()
}
// OnWndProc必须要调用的, 内部为 inherited WndProc(msg)。
func (f *TForm) InheritedWndProc(TheMessage *TMessage) {
Form_InheritedWndProc(f.instance, TheMessage)
}
// 启用/禁用 标题栏最大化按钮。
func (f *TForm) EnabledMaximize(AValue bool) {
Form_EnabledMaximize(f.instance, AValue)
}
// 启用/禁用 标题栏最小化按钮。
func (f *TForm) EnabledMinimize(AValue bool) {
Form_EnabledMinimize(f.instance, AValue)
}
// 启用/禁用 标题栏系统菜单。
func (f *TForm) EnabledSystemMenu(AValue bool) {
Form_EnabledSystemMenu(f.instance, AValue)
}
func (f *TForm) ScaleForCurrentDpi() {
Form_ScaleForCurrentDpi(f.instance)
}
func (f *TForm) ScaleForPPI(ANewPPI int32) {
Form_ScaleForPPI(f.instance, ANewPPI)
}
// 居于当前屏幕中心。
func (f *TForm) ScreenCenter() {
Form_ScreenCenter(f.instance)
}
// 窗口居于工作区中心,工作区为当前屏幕 - 任务栏空间。
func (f *TForm) WorkAreaCenter() {
Form_WorkAreaCenter(f.instance)
}
func (f *TForm) Cascade() {
Form_Cascade(f.instance)
}
// 关闭。
func (f *TForm) Close() {
Form_Close(f.instance)
}
func (f *TForm) FocusControl(Control IWinControl) {
Form_FocusControl(f.instance, CheckPtr(Control))
}
// 隐藏控件。
//
// Hidden control.
func (f *TForm) Hide() {
Form_Hide(f.instance)
}
// 设置控件焦点。
//
// Set control focus.
func (f *TForm) SetFocus() {
Form_SetFocus(f.instance)
}
// 显示控件。
//
// Show control.
func (f *TForm) Show() {
Form_Show(f.instance)
}
// 以模态模式显示对话框。
func (f *TForm) ShowModal() int32 {
return Form_ShowModal(f.instance)
}
func (f *TForm) ScrollInView(AControl IControl) {
Form_ScrollInView(f.instance, CheckPtr(AControl))
}
// 是否可以获得焦点。
func (f *TForm) CanFocus() bool {
return Form_CanFocus(f.instance)
}
// 返回是否包含指定控件。
//
// it's contain a specified control.
func (f *TForm) ContainsControl(Control IControl) bool {
return Form_ContainsControl(f.instance, CheckPtr(Control))
}
// 返回指定坐标及相关属性位置控件。
//
// Returns the specified coordinate and the relevant attribute position control..
func (f *TForm) ControlAtPos(Pos TPoint, AllowDisabled bool, AllowWinControls bool, AllLevels bool) *TControl {
return AsControl(Form_ControlAtPos(f.instance, Pos, AllowDisabled, AllowWinControls, AllLevels))
}
// 禁用控件的对齐。
//
// Disable control alignment.
func (f *TForm) DisableAlign() {
Form_DisableAlign(f.instance)
}
// 启用控件对齐。
//
// Enabled control alignment.
func (f *TForm) EnableAlign() {
Form_EnableAlign(f.instance)
}
// 查找子控件。
//
// Find sub controls.
func (f *TForm) FindChildControl(ControlName string) *TControl {
return AsControl(Form_FindChildControl(f.instance, ControlName))
}
func (f *TForm) FlipChildren(AllLevels bool) {
Form_FlipChildren(f.instance, AllLevels)
}
// 返回是否获取焦点。
//
// Return to get focus.
func (f *TForm) Focused() bool {
return Form_Focused(f.instance)
}
// 句柄是否已经分配。
//
// Is the handle already allocated.
func (f *TForm) HandleAllocated() bool {
return Form_HandleAllocated(f.instance)
}
// 插入一个控件。
//
// Insert a control.
func (f *TForm) InsertControl(AControl IControl) {
Form_InsertControl(f.instance, CheckPtr(AControl))
}
// 要求重绘。
//
// Redraw.
func (f *TForm) Invalidate() {
Form_Invalidate(f.instance)
}
// 绘画至指定DC。
//
// Painting to the specified DC.
func (f *TForm) PaintTo(DC HDC, X int32, Y int32) {
Form_PaintTo(f.instance, DC, X, Y)
}
// 移除一个控件。
//
// Remove a control.
func (f *TForm) RemoveControl(AControl IControl) {
Form_RemoveControl(f.instance, CheckPtr(AControl))
}
// 重新对齐。
//
// Realign.
func (f *TForm) Realign() {
Form_Realign(f.instance)
}
// 重绘。
//
// Repaint.
func (f *TForm) Repaint() {
Form_Repaint(f.instance)
}
// 按比例缩放。
//
// Scale by.
func (f *TForm) ScaleBy(M int32, D int32) {
Form_ScaleBy(f.instance, M, D)
}
// 滚动至指定位置。
//
// Scroll by.
func (f *TForm) ScrollBy(DeltaX int32, DeltaY int32) {
Form_ScrollBy(f.instance, DeltaX, DeltaY)
}
// 设置组件边界。
//
// Set component boundaries.
func (f *TForm) SetBounds(ALeft int32, ATop int32, AWidth int32, AHeight int32) {
Form_SetBounds(f.instance, ALeft, ATop, AWidth, AHeight)
}
// 控件更新。
//
// Update.
func (f *TForm) Update() {
Form_Update(f.instance)
}
// 将控件置于最前。
//
// Bring the control to the front.
func (f *TForm) BringToFront() {
Form_BringToFront(f.instance)
}
// 将客户端坐标转为绝对的屏幕坐标。
//
// Convert client coordinates to absolute screen coordinates.
func (f *TForm) ClientToScreen(Point TPoint) TPoint {
return Form_ClientToScreen(f.instance, Point)
}
// 将客户端坐标转为父容器坐标。
//
// Convert client coordinates to parent container coordinates.
func (f *TForm) ClientToParent(Point TPoint, AParent IWinControl) TPoint {
return Form_ClientToParent(f.instance, Point, CheckPtr(AParent))
}
// 是否在拖拽中。
//
// Is it in the middle of dragging.
func (f *TForm) Dragging() bool {
return Form_Dragging(f.instance)
}
// 是否有父容器。
//
// Is there a parent container.
func (f *TForm) HasParent() bool {
return Form_HasParent(f.instance)
}
// 发送一个消息。
//
// Send a message.
func (f *TForm) Perform(Msg uint32, WParam uintptr, LParam int) int {
return Form_Perform(f.instance, Msg, WParam, LParam)
}
// 刷新控件。
//
// Refresh control.
func (f *TForm) Refresh() {
Form_Refresh(f.instance)
}
// 将屏幕坐标转为客户端坐标。
//
// Convert screen coordinates to client coordinates.
func (f *TForm) ScreenToClient(Point TPoint) TPoint {
return Form_ScreenToClient(f.instance, Point)
}
// 将父容器坐标转为客户端坐标。
//
// Convert parent container coordinates to client coordinates.
func (f *TForm) ParentToClient(Point TPoint, AParent IWinControl) TPoint {
return Form_ParentToClient(f.instance, Point, CheckPtr(AParent))
}
// 控件至于最后面。
//
// The control is placed at the end.
func (f *TForm) SendToBack() {
Form_SendToBack(f.instance)
}
// 获取控件的字符,如果有。
//
// Get the characters of the control, if any.
func (f *TForm) GetTextBuf(Buffer *string, BufSize int32) int32 {
return Form_GetTextBuf(f.instance, Buffer, BufSize)
}
// 获取控件的字符长,如果有。
//
// Get the character length of the control, if any.
func (f *TForm) GetTextLen() int32 {
return Form_GetTextLen(f.instance)
}
// 设置控件字符,如果有。
//
// Set control characters, if any.
func (f *TForm) SetTextBuf(Buffer string) {
Form_SetTextBuf(f.instance, Buffer)
}
// 查找指定名称的组件。
//
// Find the component with the specified name.
func (f *TForm) FindComponent(AName string) *TComponent {
return AsComponent(Form_FindComponent(f.instance, AName))
}
// 获取类名路径。
//
// Get the class name path.
func (f *TForm) GetNamePath() string {
return Form_GetNamePath(f.instance)
}
// 复制一个对象,如果对象实现了此方法的话。
//
// Copy an object, if the object implements this method.
func (f *TForm) Assign(Source IObject) {
Form_Assign(f.instance, CheckPtr(Source))
}
// 获取类的类型信息。
//
// Get class type information.
func (f *TForm) ClassType() TClass {
return Form_ClassType(f.instance)
}
// 获取当前对象类名称。
//
// Get the current object class name.
func (f *TForm) ClassName() string {
return Form_ClassName(f.instance)
}
// 获取当前对象实例大小。
//
// Get the current object instance size.
func (f *TForm) InstanceSize() int32 {
return Form_InstanceSize(f.instance)
}
// 判断当前类是否继承自指定类。
//
// Determine whether the current class inherits from the specified class.
func (f *TForm) InheritsFrom(AClass TClass) bool {
return Form_InheritsFrom(f.instance, AClass)
}
// 与一个对象进行比较。
//
// Compare with an object.
func (f *TForm) Equals(Obj IObject) bool {
return Form_Equals(f.instance, CheckPtr(Obj))
}
// 获取类的哈希值。
//
// Get the hash value of the class.
func (f *TForm) GetHashCode() int32 {
return Form_GetHashCode(f.instance)
}
// 文本类信息。
//
// Text information.
func (f *TForm) ToString() string {
return Form_ToString(f.instance)
}
func (f *TForm) AnchorToNeighbour(ASide TAnchorKind, ASpace int32, ASibling IControl) {
Form_AnchorToNeighbour(f.instance, ASide, ASpace, CheckPtr(ASibling))
}
func (f *TForm) AnchorParallel(ASide TAnchorKind, ASpace int32, ASibling IControl) {
Form_AnchorParallel(f.instance, ASide, ASpace, CheckPtr(ASibling))
}
// 置于指定控件的横向中心。
func (f *TForm) AnchorHorizontalCenterTo(ASibling IControl) {
Form_AnchorHorizontalCenterTo(f.instance, CheckPtr(ASibling))
}
// 置于指定控件的纵向中心。
func (f *TForm) AnchorVerticalCenterTo(ASibling IControl) {
Form_AnchorVerticalCenterTo(f.instance, CheckPtr(ASibling))
}
func (f *TForm) AnchorSame(ASide TAnchorKind, ASibling IControl) {
Form_AnchorSame(f.instance, ASide, CheckPtr(ASibling))
}
func (f *TForm) AnchorAsAlign(ATheAlign TAlign, ASpace int32) {
Form_AnchorAsAlign(f.instance, ATheAlign, ASpace)
}
func (f *TForm) AnchorClient(ASpace int32) {
Form_AnchorClient(f.instance, ASpace)
}
func (f *TForm) ScaleDesignToForm(ASize int32) int32 {
return Form_ScaleDesignToForm(f.instance, ASize)
}
func (f *TForm) ScaleFormToDesign(ASize int32) int32 {
return Form_ScaleFormToDesign(f.instance, ASize)
}
func (f *TForm) Scale96ToForm(ASize int32) int32 {
return Form_Scale96ToForm(f.instance, ASize)
}
func (f *TForm) ScaleFormTo96(ASize int32) int32 {
return Form_ScaleFormTo96(f.instance, ASize)
}
func (f *TForm) Scale96ToFont(ASize int32) int32 {
return Form_Scale96ToFont(f.instance, ASize)
}
func (f *TForm) ScaleFontTo96(ASize int32) int32 {
return Form_ScaleFontTo96(f.instance, ASize)
}
func (f *TForm) ScaleScreenToFont(ASize int32) int32 {
return Form_ScaleScreenToFont(f.instance, ASize)
}
func (f *TForm) ScaleFontToScreen(ASize int32) int32 {
return Form_ScaleFontToScreen(f.instance, ASize)
}
func (f *TForm) Scale96ToScreen(ASize int32) int32 {
return Form_Scale96ToScreen(f.instance, ASize)
}
func (f *TForm) ScaleScreenTo96(ASize int32) int32 {
return Form_ScaleScreenTo96(f.instance, ASize)
}
func (f *TForm) AutoAdjustLayout(AMode TLayoutAdjustmentPolicy, AFromPPI int32, AToPPI int32, AOldFormWidth int32, ANewFormWidth int32) {
Form_AutoAdjustLayout(f.instance, AMode, AFromPPI, AToPPI, AOldFormWidth, ANewFormWidth)
}
func (f *TForm) FixDesignFontsPPI(ADesignTimePPI int32) {
Form_FixDesignFontsPPI(f.instance, ADesignTimePPI)
}
func (f *TForm) ScaleFontsPPI(AToPPI int32, AProportion float64) {
Form_ScaleFontsPPI(f.instance, AToPPI, AProportion)
}
// 获取允许拖放文件。
func (f *TForm) AllowDropFiles() bool {
return Form_GetAllowDropFiles(f.instance)
}
// 设置允许拖放文件。
func (f *TForm) SetAllowDropFiles(value bool) {
Form_SetAllowDropFiles(f.instance, value)
}
// 设置拖放文件事件。
func (f *TForm) SetOnDropFiles(fn TDropFilesEvent) {
Form_SetOnDropFiles(f.instance, fn)
}
// 获取显示在任务栏上。
func (f *TForm) ShowInTaskBar() TShowInTaskbar {
return Form_GetShowInTaskBar(f.instance)
}
// 设置显示在任务栏上。
func (f *TForm) SetShowInTaskBar(value TShowInTaskbar) {
Form_SetShowInTaskBar(f.instance, value)
}
func (f *TForm) DesignTimePPI() int32 {
return Form_GetDesignTimePPI(f.instance)
}
func (f *TForm) SetDesignTimePPI(value int32) {
Form_SetDesignTimePPI(f.instance, value)
}
func (f *TForm) SetOnUTF8KeyPress(fn TUTF8KeyPressEvent) {
Form_SetOnUTF8KeyPress(f.instance, fn)
}
func (f *TForm) Action() *TAction {
return AsAction(Form_GetAction(f.instance))
}
func (f *TForm) SetAction(value IComponent) {
Form_SetAction(f.instance, CheckPtr(value))
}
// 获取当前动控件。
func (f *TForm) ActiveControl() *TWinControl {
return AsWinControl(Form_GetActiveControl(f.instance))
}
// 设置当前动控件。
func (f *TForm) SetActiveControl(value IWinControl) {
Form_SetActiveControl(f.instance, CheckPtr(value))
}
// 获取控件自动调整。
//
// Get Control automatically adjusts.
func (f *TForm) Align() TAlign {
return Form_GetAlign(f.instance)
}
// 设置控件自动调整。
//
// Set Control automatically adjusts.
func (f *TForm) SetAlign(value TAlign) {
Form_SetAlign(f.instance, value)
}
// 获取半透明。
func (f *TForm) AlphaBlend() bool {
return Form_GetAlphaBlend(f.instance)
}
// 设置半透明。
func (f *TForm) SetAlphaBlend(value bool) {
Form_SetAlphaBlend(f.instance, value)
}
// 获取半透明值-0-255。
func (f *TForm) AlphaBlendValue() uint8 {
return Form_GetAlphaBlendValue(f.instance)
}
// 设置半透明值-0-255。
func (f *TForm) SetAlphaBlendValue(value uint8) {
Form_SetAlphaBlendValue(f.instance, value)
}
// 获取四个角位置的锚点。
func (f *TForm) Anchors() TAnchors {
return Form_GetAnchors(f.instance)
}
// 设置四个角位置的锚点。
func (f *TForm) SetAnchors(value TAnchors) {
Form_SetAnchors(f.instance, value)
}
func (f *TForm) AutoScroll() bool {
return Form_GetAutoScroll(f.instance)
}
func (f *TForm) SetAutoScroll(value bool) {
Form_SetAutoScroll(f.instance, value)
}
// 获取自动调整大小。
func (f *TForm) AutoSize() bool {
return Form_GetAutoSize(f.instance)
}
// 设置自动调整大小。
func (f *TForm) SetAutoSize(value bool) {
Form_SetAutoSize(f.instance, value)
}
func (f *TForm) BiDiMode() TBiDiMode {
return Form_GetBiDiMode(f.instance)
}
func (f *TForm) SetBiDiMode(value TBiDiMode) {
Form_SetBiDiMode(f.instance, value)
}
// 获取窗口标题栏图标设置。比如:关闭,最大化,最小化等。
func (f *TForm) BorderIcons() TBorderIcons {
return Form_GetBorderIcons(f.instance)
}
// 设置窗口标题栏图标设置。比如:关闭,最大化,最小化等。
func (f *TForm) SetBorderIcons(value TBorderIcons) {
Form_SetBorderIcons(f.instance, value)
}
// 获取窗口边框样式。比如:无边框,单一边框等。
func (f *TForm) BorderStyle() TFormBorderStyle {
return Form_GetBorderStyle(f.instance)
}
// 设置窗口边框样式。比如:无边框,单一边框等。
func (f *TForm) SetBorderStyle(value TFormBorderStyle) {
Form_SetBorderStyle(f.instance, value)
}
// 获取边框的宽度。
func (f *TForm) BorderWidth() int32 {
return Form_GetBorderWidth(f.instance)
}
// 设置边框的宽度。
func (f *TForm) SetBorderWidth(value int32) {
Form_SetBorderWidth(f.instance, value)
}
// 获取控件标题。
//
// Get the control title.
func (f *TForm) Caption() string {
return Form_GetCaption(f.instance)
}
// 设置控件标题。
//
// Set the control title.
func (f *TForm) SetCaption(value string) {
Form_SetCaption(f.instance, value)
}
// 获取客户区高度。
//
// Get client height.
func (f *TForm) ClientHeight() int32 {
return Form_GetClientHeight(f.instance)
}
// 设置客户区高度。
//
// Set client height.
func (f *TForm) SetClientHeight(value int32) {
Form_SetClientHeight(f.instance, value)
}
// 获取客户区宽度。
//
// Get client width.
func (f *TForm) ClientWidth() int32 {
return Form_GetClientWidth(f.instance)
}
// 设置客户区宽度。
//
// Set client width.
func (f *TForm) SetClientWidth(value int32) {
Form_SetClientWidth(f.instance, value)
}
// 获取颜色。
//
// Get color.
func (f *TForm) Color() TColor {
return Form_GetColor(f.instance)
}
// 设置颜色。
//
// Set color.
func (f *TForm) SetColor(value TColor) {
Form_SetColor(f.instance, value)
}
// 获取约束控件大小。
func (f *TForm) Constraints() *TSizeConstraints {
return AsSizeConstraints(Form_GetConstraints(f.instance))
}
// 设置约束控件大小。
func (f *TForm) SetConstraints(value *TSizeConstraints) {
Form_SetConstraints(f.instance, CheckPtr(value))
}
// 获取使用停靠管理。
func (f *TForm) UseDockManager() bool {
return Form_GetUseDockManager(f.instance)
}
// 设置使用停靠管理。
func (f *TForm) SetUseDockManager(value bool) {
Form_SetUseDockManager(f.instance, value)
}
// 获取默认监视器。
func (f *TForm) DefaultMonitor() TDefaultMonitor {
return Form_GetDefaultMonitor(f.instance)
}
// 设置默认监视器。
func (f *TForm) SetDefaultMonitor(value TDefaultMonitor) {
Form_SetDefaultMonitor(f.instance, value)
}
// 获取停靠站点。
//
// Get Docking site.
func (f *TForm) DockSite() bool {
return Form_GetDockSite(f.instance)
}
// 设置停靠站点。
//
// Set Docking site.
func (f *TForm) SetDockSite(value bool) {
Form_SetDockSite(f.instance, value)
}
// 获取设置控件双缓冲。
//
// Get Set control double buffering.
func (f *TForm) DoubleBuffered() bool {
return Form_GetDoubleBuffered(f.instance)
}
// 设置设置控件双缓冲。
//
// Set Set control double buffering.
func (f *TForm) SetDoubleBuffered(value bool) {
Form_SetDoubleBuffered(f.instance, value)
}
// 获取拖拽方式。
//
// Get Drag and drop.
func (f *TForm) DragKind() TDragKind {
return Form_GetDragKind(f.instance)
}
// 设置拖拽方式。
//
// Set Drag and drop.
func (f *TForm) SetDragKind(value TDragKind) {
Form_SetDragKind(f.instance, value)
}
// 获取拖拽模式。
//
// Get Drag mode.
func (f *TForm) DragMode() TDragMode {
return Form_GetDragMode(f.instance)
}
// 设置拖拽模式。
//
// Set Drag mode.
func (f *TForm) SetDragMode(value TDragMode) {
Form_SetDragMode(f.instance, value)
}
// 获取控件启用。
//
// Get the control enabled.
func (f *TForm) Enabled() bool {
return Form_GetEnabled(f.instance)
}
// 设置控件启用。
//
// Set the control enabled.
func (f *TForm) SetEnabled(value bool) {
Form_SetEnabled(f.instance, value)
}
// 获取使用父容器字体。
//
// Get Parent container font.
func (f *TForm) ParentFont() bool {
return Form_GetParentFont(f.instance)
}
// 设置使用父容器字体。
//
// Set Parent container font.
func (f *TForm) SetParentFont(value bool) {
Form_SetParentFont(f.instance, value)
}
// 获取字体。
//
// Get Font.
func (f *TForm) Font() *TFont {
return AsFont(Form_GetFont(f.instance))
}
// 设置字体。
//
// Set Font.
func (f *TForm) SetFont(value *TFont) {
Form_SetFont(f.instance, CheckPtr(value))
}
// 获取窗口样式。比如:置顶,MID窗口。
func (f *TForm) FormStyle() TFormStyle {
return Form_GetFormStyle(f.instance)
}
// 设置窗口样式。比如:置顶,MID窗口。
func (f *TForm) SetFormStyle(value TFormStyle) {
Form_SetFormStyle(f.instance, value)
}
// 获取高度。
//
// Get height.
func (f *TForm) Height() int32 {
return Form_GetHeight(f.instance)
}
// 设置高度。
//
// Set height.
func (f *TForm) SetHeight(value int32) {
Form_SetHeight(f.instance, value)
}
func (f *TForm) HorzScrollBar() *TControlScrollBar {
return AsControlScrollBar(Form_GetHorzScrollBar(f.instance))
}
func (f *TForm) SetHorzScrollBar(value *TControlScrollBar) {
Form_SetHorzScrollBar(f.instance, CheckPtr(value))
}
// 获取图标。
//
// Get icon.
func (f *TForm) Icon() *TIcon {
return AsIcon(Form_GetIcon(f.instance))
}
// 设置图标。
//
// Set icon.
func (f *TForm) SetIcon(value *TIcon) {
Form_SetIcon(f.instance, CheckPtr(value))
}
// 获取窗口优先接收键盘按盘消息。
func (f *TForm) KeyPreview() bool {
return Form_GetKeyPreview(f.instance)
}
// 设置窗口优先接收键盘按盘消息。
func (f *TForm) SetKeyPreview(value bool) {
Form_SetKeyPreview(f.instance, value)
}
// 获取窗口主菜单。
func (f *TForm) Menu() *TMainMenu {
return AsMainMenu(Form_GetMenu(f.instance))
}
// 设置窗口主菜单。
func (f *TForm) SetMenu(value IComponent) {
Form_SetMenu(f.instance, CheckPtr(value))
}
// 获取每英寸像素数。
func (f *TForm) PixelsPerInch() int32 {
return Form_GetPixelsPerInch(f.instance)
}
// 设置每英寸像素数。
func (f *TForm) SetPixelsPerInch(value int32) {
Form_SetPixelsPerInch(f.instance, value)
}
// 获取右键菜单。
//
// Get Right click menu.
func (f *TForm) PopupMenu() *TPopupMenu {
return AsPopupMenu(Form_GetPopupMenu(f.instance))
}
// 设置右键菜单。
//
// Set Right click menu.
func (f *TForm) SetPopupMenu(value IComponent) {
Form_SetPopupMenu(f.instance, CheckPtr(value))
}
// 获取窗口的位置。比如:居中等。。
func (f *TForm) Position() TPosition {
return Form_GetPosition(f.instance)
}
// 设置窗口的位置。比如:居中等。。
func (f *TForm) SetPosition(value TPosition) {
Form_SetPosition(f.instance, value)
}
// 获取自动缩放。
func (f *TForm) Scaled() bool {
return Form_GetScaled(f.instance)
}
// 设置自动缩放。
func (f *TForm) SetScaled(value bool) {
Form_SetScaled(f.instance, value)
}
// 获取显示鼠标悬停提示。
//
// Get Show mouseover tips.
func (f *TForm) ShowHint() bool {
return Form_GetShowHint(f.instance)
}
// 设置显示鼠标悬停提示。
//
// Set Show mouseover tips.
func (f *TForm) SetShowHint(value bool) {
Form_SetShowHint(f.instance, value)
}
func (f *TForm) VertScrollBar() *TControlScrollBar {
return AsControlScrollBar(Form_GetVertScrollBar(f.instance))
}
func (f *TForm) SetVertScrollBar(value *TControlScrollBar) {
Form_SetVertScrollBar(f.instance, CheckPtr(value))
}
// 获取控件可视。
//
// Get the control visible.
func (f *TForm) Visible() bool {
return Form_GetVisible(f.instance)
}
// 设置控件可视。
//
// Set the control visible.
func (f *TForm) SetVisible(value bool) {
Form_SetVisible(f.instance, value)
}
// 获取宽度。
//
// Get width.
func (f *TForm) Width() int32 {
return Form_GetWidth(f.instance)
}
// 设置宽度。
//
// Set width.
func (f *TForm) SetWidth(value int32) {
Form_SetWidth(f.instance, value)
}
// 获取窗口样式。比如:最大化,最小化等。
func (f *TForm) WindowState() TWindowState {
return Form_GetWindowState(f.instance)
}
// 设置窗口样式。比如:最大化,最小化等。
func (f *TForm) SetWindowState(value TWindowState) {
Form_SetWindowState(f.instance, value)
}
// 设置窗口激活事件。
func (f *TForm) SetOnActivate(fn TNotifyEvent) {
Form_SetOnActivate(f.instance, fn)
}
// 设置对齐位置事件,当Align为alCustom时Parent会收到这个消息。
func (f *TForm) SetOnAlignPosition(fn TAlignPositionEvent) {
Form_SetOnAlignPosition(f.instance, fn)
}
// 设置控件单击事件。
//
// Set control click event.
func (f *TForm) SetOnClick(fn TNotifyEvent) {
Form_SetOnClick(f.instance, fn)
}
// 设置窗口关闭事件。
func (f *TForm) SetOnClose(fn TCloseEvent) {
Form_SetOnClose(f.instance, fn)
}
// 设置窗口关闭询问事件。
func (f *TForm) SetOnCloseQuery(fn TCloseQueryEvent) {
Form_SetOnCloseQuery(f.instance, fn)
}
func (f *TForm) SetOnConstrainedResize(fn TConstrainedResizeEvent) {
Form_SetOnConstrainedResize(f.instance, fn)
}
// 设置上下文弹出事件,一般是右键时弹出。
//
// Set Context popup event, usually pop up when right click.
func (f *TForm) SetOnContextPopup(fn TContextPopupEvent) {
Form_SetOnContextPopup(f.instance, fn)
}
// 设置双击事件。
func (f *TForm) SetOnDblClick(fn TNotifyEvent) {
Form_SetOnDblClick(f.instance, fn)
}
func (f *TForm) SetOnDestroy(fn TNotifyEvent) {
Form_SetOnDestroy(f.instance, fn)
}
// 设置窗口失去激状态。
func (f *TForm) SetOnDeactivate(fn TNotifyEvent) {
Form_SetOnDeactivate(f.instance, fn)
}
func (f *TForm) SetOnDockDrop(fn TDockDropEvent) {
Form_SetOnDockDrop(f.instance, fn)
}
// 设置拖拽下落事件。
//
// Set Drag and drop event.
func (f *TForm) SetOnDragDrop(fn TDragDropEvent) {
Form_SetOnDragDrop(f.instance, fn)
}
// 设置拖拽完成事件。
//
// Set Drag and drop completion event.
func (f *TForm) SetOnDragOver(fn TDragOverEvent) {
Form_SetOnDragOver(f.instance, fn)
}
// 设置停靠结束事件。
//
// Set Dock end event.
func (f *TForm) SetOnEndDock(fn TEndDragEvent) {
Form_SetOnEndDock(f.instance, fn)
}
func (f *TForm) SetOnGetSiteInfo(fn TGetSiteInfoEvent) {
Form_SetOnGetSiteInfo(f.instance, fn)
}
// 设置隐藏事件。
func (f *TForm) SetOnHide(fn TNotifyEvent) {
Form_SetOnHide(f.instance, fn)
}
func (f *TForm) SetOnHelp(fn THelpEvent) {
Form_SetOnHelp(f.instance, fn)
}
// 设置键盘按键按下事件。
//
// Set Keyboard button press event.
func (f *TForm) SetOnKeyDown(fn TKeyEvent) {
Form_SetOnKeyDown(f.instance, fn)
}
// 设置键键下事件。
func (f *TForm) SetOnKeyPress(fn TKeyPressEvent) {
Form_SetOnKeyPress(f.instance, fn)
}
// 设置键盘按键抬起事件。
//
// Set Keyboard button lift event.
func (f *TForm) SetOnKeyUp(fn TKeyEvent) {
Form_SetOnKeyUp(f.instance, fn)
}
// 设置鼠标按下事件。
//
// Set Mouse down event.
func (f *TForm) SetOnMouseDown(fn TMouseEvent) {
Form_SetOnMouseDown(f.instance, fn)
}
// 设置鼠标进入事件。
//
// Set Mouse entry event.
func (f *TForm) SetOnMouseEnter(fn TNotifyEvent) {
Form_SetOnMouseEnter(f.instance, fn)
}
// 设置鼠标离开事件。
//
// Set Mouse leave event.
func (f *TForm) SetOnMouseLeave(fn TNotifyEvent) {
Form_SetOnMouseLeave(f.instance, fn)
}
// 设置鼠标移动事件。
func (f *TForm) SetOnMouseMove(fn TMouseMoveEvent) {
Form_SetOnMouseMove(f.instance, fn)
}
// 设置鼠标抬起事件。
//
// Set Mouse lift event.
func (f *TForm) SetOnMouseUp(fn TMouseEvent) {
Form_SetOnMouseUp(f.instance, fn)
}
// 设置鼠标滚轮事件。
func (f *TForm) SetOnMouseWheel(fn TMouseWheelEvent) {
Form_SetOnMouseWheel(f.instance, fn)
}
// 设置鼠标滚轮按下事件。
func (f *TForm) SetOnMouseWheelDown(fn TMouseWheelUpDownEvent) {
Form_SetOnMouseWheelDown(f.instance, fn)
}
// 设置鼠标滚轮抬起事件。
func (f *TForm) SetOnMouseWheelUp(fn TMouseWheelUpDownEvent) {
Form_SetOnMouseWheelUp(f.instance, fn)
}
// 设置绘画事件。
func (f *TForm) SetOnPaint(fn TNotifyEvent) {
Form_SetOnPaint(f.instance, fn)
}
// 设置大小被改变事件。
func (f *TForm) SetOnResize(fn TNotifyEvent) {
Form_SetOnResize(f.instance, fn)
}
func (f *TForm) SetOnShortCut(fn TShortCutEvent) {
Form_SetOnShortCut(f.instance, fn)
}
// 设置显示事件。
func (f *TForm) SetOnShow(fn TNotifyEvent) {
Form_SetOnShow(f.instance, fn)
}
// 设置启动停靠。
func (f *TForm) SetOnStartDock(fn TStartDockEvent) {
Form_SetOnStartDock(f.instance, fn)
}
func (f *TForm) SetOnUnDock(fn TUnDockEvent) {
Form_SetOnUnDock(f.instance, fn)
}
// 获取画布。
func (f *TForm) Canvas() *TCanvas {
return AsCanvas(Form_GetCanvas(f.instance))
}
// 获取模态对话框显示结果。
func (f *TForm) ModalResult() TModalResult {
return Form_GetModalResult(f.instance)
}
// 设置模态对话框显示结果。
func (f *TForm) SetModalResult(value TModalResult) {
Form_SetModalResult(f.instance, value)
}
// 获取监视器。
func (f *TForm) Monitor() *TMonitor {
return AsMonitor(Form_GetMonitor(f.instance))
}
// 获取左边位置。
//
// Get Left position.
func (f *TForm) Left() int32 {
return Form_GetLeft(f.instance)
}
// 设置左边位置。
//
// Set Left position.
func (f *TForm) SetLeft(value int32) {
Form_SetLeft(f.instance, value)
}
// 获取顶边位置。
//
// Get Top position.
func (f *TForm) Top() int32 {
return Form_GetTop(f.instance)
}
// 设置顶边位置。
//
// Set Top position.
func (f *TForm) SetTop(value int32) {
Form_SetTop(f.instance, value)
}
// 获取依靠客户端总数。
func (f *TForm) DockClientCount() int32 {
return Form_GetDockClientCount(f.instance)
}
// 获取鼠标是否在客户端,仅VCL有效。
//
// Get Whether the mouse is on the client, only VCL is valid.
func (f *TForm) MouseInClient() bool {
return Form_GetMouseInClient(f.instance)
}
// 获取当前停靠的可视总数。
//
// Get The total number of visible calls currently docked.
func (f *TForm) VisibleDockClientCount() int32 {
return Form_GetVisibleDockClientCount(f.instance)
}
// 获取画刷对象。
//
// Get Brush.
func (f *TForm) Brush() *TBrush {
return AsBrush(Form_GetBrush(f.instance))
}
// 获取子控件数。
//
// Get Number of child controls.
func (f *TForm) ControlCount() int32 {
return Form_GetControlCount(f.instance)
}
// 获取控件句柄。
//
// Get Control handle.
func (f *TForm) Handle() HWND {
return Form_GetHandle(f.instance)
}
// 获取使用父容器双缓冲。
//
// Get Parent container double buffering.
func (f *TForm) ParentDoubleBuffered() bool {
return Form_GetParentDoubleBuffered(f.instance)
}
// 设置使用父容器双缓冲。
//
// Set Parent container double buffering.
func (f *TForm) SetParentDoubleBuffered(value bool) {
Form_SetParentDoubleBuffered(f.instance, value)
}
// 获取父容器句柄。
//
// Get Parent container handle.
func (f *TForm) ParentWindow() HWND {
return Form_GetParentWindow(f.instance)
}
// 设置父容器句柄。
//
// Set Parent container handle.
func (f *TForm) SetParentWindow(value HWND) {
Form_SetParentWindow(f.instance, value)
}
func (f *TForm) Showing() bool {
return Form_GetShowing(f.instance)
}
// 获取Tab切换顺序序号。
//
// Get Tab switching sequence number.
func (f *TForm) TabOrder() TTabOrder {
return Form_GetTabOrder(f.instance)
}
// 设置Tab切换顺序序号。
//
// Set Tab switching sequence number.
func (f *TForm) SetTabOrder(value TTabOrder) {
Form_SetTabOrder(f.instance, value)
}
// 获取Tab可停留。
//
// Get Tab can stay.
func (f *TForm) TabStop() bool {
return Form_GetTabStop(f.instance)
}
// 设置Tab可停留。
//
// Set Tab can stay.
func (f *TForm) SetTabStop(value bool) {
Form_SetTabStop(f.instance, value)
}
func (f *TForm) BoundsRect() TRect {
return Form_GetBoundsRect(f.instance)
}
func (f *TForm) SetBoundsRect(value TRect) {
Form_SetBoundsRect(f.instance, value)
}
func (f *TForm) ClientOrigin() TPoint {
return Form_GetClientOrigin(f.instance)
}
// 获取客户区矩形。
//
// Get client rectangle.
func (f *TForm) ClientRect() TRect {
return Form_GetClientRect(f.instance)
}
// 获取控件状态。
//
// Get control state.
func (f *TForm) ControlState() TControlState {
return Form_GetControlState(f.instance)
}
// 设置控件状态。
//
// Set control state.
func (f *TForm) SetControlState(value TControlState) {
Form_SetControlState(f.instance, value)
}
// 获取控件样式。
//
// Get control style.
func (f *TForm) ControlStyle() TControlStyle {
return Form_GetControlStyle(f.instance)
}
// 设置控件样式。
//
// Set control style.
func (f *TForm) SetControlStyle(value TControlStyle) {
Form_SetControlStyle(f.instance, value)
}
func (f *TForm) Floating() bool {
return Form_GetFloating(f.instance)
}
// 获取控件父容器。
//
// Get control parent container.
func (f *TForm) Parent() *TWinControl {
return AsWinControl(Form_GetParent(f.instance))
}
// 设置控件父容器。
//
// Set control parent container.
func (f *TForm) SetParent(value IWinControl) {
Form_SetParent(f.instance, CheckPtr(value))
}
// 获取控件光标。
//
// Get control cursor.
func (f *TForm) Cursor() TCursor {
return Form_GetCursor(f.instance)
}
// 设置控件光标。
//
// Set control cursor.
func (f *TForm) SetCursor(value TCursor) {
Form_SetCursor(f.instance, value)
}
// 获取组件鼠标悬停提示。
//
// Get component mouse hints.
func (f *TForm) Hint() string {
return Form_GetHint(f.instance)
}
// 设置组件鼠标悬停提示。
//
// Set component mouse hints.
func (f *TForm) SetHint(value string) {
Form_SetHint(f.instance, value)
}
// 获取组件总数。
//
// Get the total number of components.
func (f *TForm) ComponentCount() int32 {
return Form_GetComponentCount(f.instance)
}
// 获取组件索引。
//
// Get component index.
func (f *TForm) ComponentIndex() int32 {
return Form_GetComponentIndex(f.instance)
}
// 设置组件索引。
//
// Set component index.
func (f *TForm) SetComponentIndex(value int32) {
Form_SetComponentIndex(f.instance, value)
}
// 获取组件所有者。
//
// Get component owner.
func (f *TForm) Owner() *TComponent {
return AsComponent(Form_GetOwner(f.instance))
}
// 获取组件名称。
//
// Get the component name.
func (f *TForm) Name() string {
return Form_GetName(f.instance)
}
// 设置组件名称。
//
// Set the component name.
func (f *TForm) SetName(value string) {
Form_SetName(f.instance, value)
}
// 获取对象标记。
//
// Get the control tag.
func (f *TForm) Tag() int {
return Form_GetTag(f.instance)
}
// 设置对象标记。
//
// Set the control tag.
func (f *TForm) SetTag(value int) {
Form_SetTag(f.instance, value)
}
// 获取左边锚点。
func (f *TForm) AnchorSideLeft() *TAnchorSide {
return AsAnchorSide(Form_GetAnchorSideLeft(f.instance))
}
// 设置左边锚点。
func (f *TForm) SetAnchorSideLeft(value *TAnchorSide) {
Form_SetAnchorSideLeft(f.instance, CheckPtr(value))
}
// 获取顶边锚点。
func (f *TForm) AnchorSideTop() *TAnchorSide {
return AsAnchorSide(Form_GetAnchorSideTop(f.instance))
}
// 设置顶边锚点。
func (f *TForm) SetAnchorSideTop(value *TAnchorSide) {
Form_SetAnchorSideTop(f.instance, CheckPtr(value))
}
// 获取右边锚点。
func (f *TForm) AnchorSideRight() *TAnchorSide {
return AsAnchorSide(Form_GetAnchorSideRight(f.instance))
}
// 设置右边锚点。
func (f *TForm) SetAnchorSideRight(value *TAnchorSide) {
Form_SetAnchorSideRight(f.instance, CheckPtr(value))
}
// 获取底边锚点。
func (f *TForm) AnchorSideBottom() *TAnchorSide {
return AsAnchorSide(Form_GetAnchorSideBottom(f.instance))
}
// 设置底边锚点。
func (f *TForm) SetAnchorSideBottom(value *TAnchorSide) {
Form_SetAnchorSideBottom(f.instance, CheckPtr(value))
}
func (f *TForm) ChildSizing() *TControlChildSizing {
return AsControlChildSizing(Form_GetChildSizing(f.instance))
}
func (f *TForm) SetChildSizing(value *TControlChildSizing) {
Form_SetChildSizing(f.instance, CheckPtr(value))
}
// 获取边框间距。
func (f *TForm) BorderSpacing() *TControlBorderSpacing {
return AsControlBorderSpacing(Form_GetBorderSpacing(f.instance))
}
// 设置边框间距。
func (f *TForm) SetBorderSpacing(value *TControlBorderSpacing) {
Form_SetBorderSpacing(f.instance, CheckPtr(value))
}
// 获取指定索引停靠客户端。
func (f *TForm) DockClients(Index int32) *TControl {
return AsControl(Form_GetDockClients(f.instance, Index))
}
// 获取指定索引子控件。
func (f *TForm) Controls(Index int32) *TControl {
return AsControl(Form_GetControls(f.instance, Index))
}
// 获取指定索引组件。
//
// Get the specified index component.
func (f *TForm) Components(AIndex int32) *TComponent {
return AsComponent(Form_GetComponents(f.instance, AIndex))
}
// 获取锚侧面。
func (f *TForm) AnchorSide(AKind TAnchorKind) *TAnchorSide {
return AsAnchorSide(Form_GetAnchorSide(f.instance, AKind))
}
|
//
// Return object in
|
interpreter.rs
|
use std::{
collections::HashMap,
io::{self, BufWriter, Write},
};
use anyhow::{Context, Result};
use crate::{ast::*, parser, token};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum RetVal {
Int(i64),
Void,
}
impl RetVal {
pub fn to_i(&self) -> Result<i64> {
match self {
Self::Int(i) => Ok(*i),
Self::Void => Err(anyhow::anyhow!("the retrun value type is void.")),
}
}
}
#[derive(Debug)]
pub struct Interpreter {
// Bolicの変数はすべてグローバル変数
sym_table: HashMap<char, i64>,
}
impl Interpreter {
pub fn new() -> Self {
Self
|
sym_table: HashMap::new(),
}
}
pub fn run(&mut self, code: &str) -> Result<()> {
let tokens = token::lex(code)?;
let ast = parser::parse(tokens)?;
self.eval(&ast)?;
Ok(())
}
fn eval(&mut self, ast: &Ast) -> Result<()> {
self.e_stmts(&ast)?;
Ok(())
}
fn e_stmts(&mut self, ast: &Ast) -> Result<RetVal> {
// 最後の文のリターン値を全体のリターン値とする
let mut res = RetVal::Void;
match ast {
Ast::Stmts(stmts) => {
for stmt in stmts.iter() {
res = self.e_stmt(stmt)?;
}
}
};
Ok(res)
}
fn e_stmt(&mut self, stmt: &Stmt) -> Result<RetVal> {
match stmt {
Stmt::Expr(expr) => {
let res = self.e_expr(expr)?;
Ok(res)
}
Stmt::While { .. } => {
let res = self.e_while(stmt)?;
Ok(res)
}
Stmt::NumOut(expr) => {
let x = self.e_expr(expr)?.to_i()?.to_string();
let mut writer = BufWriter::new(io::stdout());
writer.write(x.as_bytes())?;
writer.flush()?;
Ok(RetVal::Void)
}
Stmt::CharOut(expr) => {
let x = self.e_expr(expr)?.to_i()?;
let mut writer = BufWriter::new(io::stdout());
// ASCIIコードとみなす
writer.write(&[x as u8])?;
writer.flush()?;
Ok(RetVal::Void)
}
}
}
fn e_expr(&mut self, expr: &Expr) -> Result<RetVal> {
match expr {
Expr::Var(Variable::Int(i)) => Ok(RetVal::Int(*i)),
Expr::Var(Variable::Var(var)) => self
.sym_table
.get(var)
.with_context(|| {
let msg = format!("interpreter error: <{}> is undelared variable.", var);
anyhow::anyhow!(msg)
})
.and_then(|value| Ok(RetVal::Int(*value))),
Expr::Var(Variable::Assign { var, expr }) => {
let value = self.e_expr(expr)?;
// 名前が重複する変数の場合は上書き
self.sym_table.insert(*var, value.to_i()?);
Ok(value)
}
Expr::BinOp { op, l, r } => {
let l = self.e_expr(l)?.to_i()?;
let r = self.e_expr(r)?.to_i()?;
match op {
BinOp::Add => Ok(RetVal::Int(l + r)),
BinOp::Sub => Ok(RetVal::Int(l - r)),
BinOp::Mul => Ok(RetVal::Int(l * r)),
BinOp::Div => Ok(RetVal::Int(l / r)),
}
}
Expr::If { cond, conseq, alt } => {
// 0: false, other num: true
let cond = self.e_expr(cond)?.to_i()?;
match (cond, alt) {
(0, Some(alt)) => {
let alt = alt.to_owned();
self.e_stmts(&Ast::Stmts(*alt))
}
(0, None) => Ok(RetVal::Void),
(_, _) => {
let conseq = conseq.to_owned();
self.e_stmts(&Ast::Stmts(*conseq))
}
}
}
}
}
fn e_while(&mut self, wblock: &Stmt) -> Result<RetVal> {
match wblock {
Stmt::While { cond, body } => {
loop {
// 0: false, other num: true
let cond = self.e_expr(cond)?.to_i()?;
if cond == 0 {
break;
}
self.e_stmts(&Ast::Stmts(body.to_owned()))?;
}
Ok(RetVal::Void)
}
_ => {
let msg = format!(
"interpreter error: the stmt is not while. actual: {:?}",
wblock
);
Err(anyhow::anyhow!(msg))
}
}
}
}
#[cfg(test)]
mod tests {
use super::Interpreter;
#[test]
fn assgin() {
let code = "✩ ☜ ①+②";
let mut interpreter = Interpreter::new();
interpreter.run(code).unwrap();
let actual = interpreter.sym_table.get(&'✩').unwrap();
let expect = 3;
assert_eq!(expect, *actual);
}
#[test]
fn assgin2() {
let code = "✪ ☜ ✩ ☜ ① + ②";
let mut interpreter = Interpreter::new();
interpreter.run(code).unwrap();
let actual = interpreter.sym_table.get(&'✪').unwrap();
let expect = 3;
assert_eq!(expect, *actual);
}
}
|
{
|
update_task_status_response.py
|
# coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class UpdateTaskStatusResponse(SdkResponse):
|
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
}
attribute_map = {
}
def __init__(self):
"""UpdateTaskStatusResponse - a model defined in huaweicloud sdk"""
super(UpdateTaskStatusResponse, self).__init__()
self.discriminator = None
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
import simplejson as json
if six.PY2:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
def __repr__(self):
"""For `print`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UpdateTaskStatusResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
|
|
attachToProcess.ts
|
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
|
import { PsProcessParser } from './nativeAttach';
import { AttachItem, showQuickPick } from './attachQuickPick';
import * as debugUtils from './utils';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as util from '../common';
import * as vscode from 'vscode';
export interface AttachItemsProvider {
getAttachItems(): Promise<AttachItem[]>;
}
export class AttachPicker {
constructor(private attachItemsProvider: AttachItemsProvider) { }
public ShowAttachEntries(): Promise<string> {
return util.isExtensionReady().then(ready => {
if (!ready) {
util.displayExtensionNotReadyPrompt();
} else {
return showQuickPick(() => this.attachItemsProvider.getAttachItems());
}
});
}
}
export class RemoteAttachPicker {
constructor() {
this._channel = vscode.window.createOutputChannel('remote-attach');
}
private _channel: vscode.OutputChannel = null;
public ShowAttachEntries(config: any): Promise<string> {
return util.isExtensionReady().then(ready => {
if (!ready) {
util.displayExtensionNotReadyPrompt();
} else {
this._channel.clear();
let pipeTransport: any = config ? config.pipeTransport : null;
if (pipeTransport === null) {
return Promise.reject<string>(new Error("Chosen debug configuration does not contain pipeTransport"));
}
let pipeProgram: string = null;
if (os.platform() === 'win32' &&
pipeTransport.pipeProgram &&
!fs.existsSync(pipeTransport.pipeProgram)) {
const pipeProgramStr: string = pipeTransport.pipeProgram.toLowerCase().trim();
const expectedArch: debugUtils.ArchType = debugUtils.ArchType[process.arch];
// Check for pipeProgram
if (!fs.existsSync(config.pipeTransport.pipeProgram)) {
pipeProgram = debugUtils.ArchitectureReplacer.checkAndReplaceWSLPipeProgram(pipeProgramStr, expectedArch);
}
// If pipeProgram does not get replaced and there is a pipeCwd, concatenate with pipeProgramStr and attempt to replace.
if (!pipeProgram && config.pipeTransport.pipeCwd) {
const pipeCwdStr: string = config.pipeTransport.pipeCwd.toLowerCase().trim();
const newPipeProgramStr: string = path.join(pipeCwdStr, pipeProgramStr);
if (!fs.existsSync(newPipeProgramStr)) {
pipeProgram = debugUtils.ArchitectureReplacer.checkAndReplaceWSLPipeProgram(newPipeProgramStr, expectedArch);
}
}
}
if (!pipeProgram) {
pipeProgram = pipeTransport.pipeProgram;
}
let pipeArgs: string[] = pipeTransport.pipeArgs;
let argList: string = RemoteAttachPicker.createArgumentList(pipeArgs);
let pipeCmd: string = `"${pipeProgram}" ${argList}`;
return this.getRemoteOSAndProcesses(pipeCmd)
.then(processes => {
let attachPickOptions: vscode.QuickPickOptions = {
matchOnDetail: true,
matchOnDescription: true,
placeHolder: "Select the process to attach to"
};
return vscode.window.showQuickPick(processes, attachPickOptions)
.then(item => {
return item ? item.id : Promise.reject<string>(new Error("Process not selected."));
});
});
}
});
}
// Creates a string to run on the host machine which will execute a shell script on the remote machine to retrieve OS and processes
private getRemoteProcessCommand(): string {
let innerQuote: string = `'`;
let outerQuote: string = `"`;
// Must use single quotes around the whole command and double quotes for the argument to `sh -c` because Linux evaluates $() inside of double quotes.
// Having double quotes for the outerQuote will have $(uname) replaced before it is sent to the remote machine.
if (os.platform() !== "win32") {
innerQuote = `"`;
outerQuote = `'`;
}
return `${outerQuote}sh -c ${innerQuote}uname && if [ $(uname) = \\\"Linux\\\" ] ; then ${PsProcessParser.psLinuxCommand} ; elif [ $(uname) = \\\"Darwin\\\" ] ; ` +
`then ${PsProcessParser.psDarwinCommand}; fi${innerQuote}${outerQuote}`;
}
private getRemoteOSAndProcesses(pipeCmd: string): Promise<AttachItem[]> {
// Do not add any quoting in execCommand.
const execCommand: string = `${pipeCmd} ${this.getRemoteProcessCommand()}`;
return util.execChildProcess(execCommand, null, this._channel).then(output => {
// OS will be on first line
// Processes will follow if listed
let lines: string[] = output.split(/\r?\n/);
if (lines.length === 0) {
return Promise.reject<AttachItem[]>(new Error("Pipe transport failed to get OS and processes."));
} else {
let remoteOS: string = lines[0].replace(/[\r\n]+/g, '');
if (remoteOS !== "Linux" && remoteOS !== "Darwin") {
return Promise.reject<AttachItem[]>(new Error(`Operating system "${remoteOS}" not supported.`));
}
// Only got OS from uname
if (lines.length === 1) {
return Promise.reject<AttachItem[]>(new Error("Transport attach could not obtain processes list."));
} else {
let processes: string[] = lines.slice(1);
return PsProcessParser.ParseProcessFromPsArray(processes)
.sort((a, b) => {
if (a.name === undefined) {
if (b.name === undefined) {
return 0;
}
return 1;
}
if (b.name === undefined) {
return -1;
}
let aLower: string = a.name.toLowerCase();
let bLower: string = b.name.toLowerCase();
if (aLower === bLower) {
return 0;
}
return aLower < bLower ? -1 : 1;
})
.map(p => p.toAttachItem());
}
}
});
}
private static createArgumentList(args: string[]): string {
let argsString: string = "";
for (let arg of args) {
if (argsString) {
argsString += " ";
}
argsString += `"${arg}"`;
}
return argsString;
}
}
| |
__init__.py
|
"""
fuzza.transformer
|
"""
from .transformer import init
|
-----------------
The transformer module for data transformation.
|
app.js
|
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function
|
(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "./";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
(function () {
var burger = document.querySelector('.nav-toggle');
var menu = document.querySelector('.nav-menu');
burger.addEventListener('click', function () {
burger.classList.toggle('is-active');
menu.classList.toggle('is-active');
});
})();
/***/ }),
/* 1 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(0);
module.exports = __webpack_require__(1);
/***/ })
/******/ ]);
|
__webpack_require__
|
test_uniswap_add.py
|
import pytest
from brownie import interface
def
|
(
admin, alice, chain, bank, werc20, ufactory, urouter, simple_oracle, oracle, celo, cusd, ceur, UniswapV2SpellV1, UniswapV2Oracle, core_oracle
):
spell = UniswapV2SpellV1.deploy(bank, werc20, urouter, celo, {'from': admin})
cusd.mint(admin, 10000000 * 10**6, {'from': admin})
ceur.mint(admin, 10000000 * 10**6, {'from': admin})
cusd.approve(urouter, 2**256-1, {'from': admin})
ceur.approve(urouter, 2**256-1, {'from': admin})
urouter.addLiquidity(
cusd,
ceur,
1000000 * 10**6,
1000000 * 10**6,
0,
0,
admin,
chain.time() + 60,
{'from': admin},
)
lp = ufactory.getPair(cusd, ceur)
print('admin lp bal', interface.IERC20(lp).balanceOf(admin))
uniswap_lp_oracle = UniswapV2Oracle.deploy(core_oracle, {'from': admin})
print('ceur Px', simple_oracle.getCELOPx(ceur))
print('cusd Px', simple_oracle.getCELOPx(cusd))
core_oracle.setRoute([cusd, ceur, lp], [simple_oracle, simple_oracle, uniswap_lp_oracle])
print('lp Px', uniswap_lp_oracle.getCELOPx(lp))
oracle.setTokenFactors(
[cusd, ceur, lp],
[
[10000, 10000, 10000],
[10000, 10000, 10000],
[10000, 10000, 10000],
],
{'from': admin},
)
cusd.mint(alice, 10000000 * 10**6, {'from': admin})
ceur.mint(alice, 10000000 * 10**6, {'from': admin})
cusd.approve(bank, 2**256-1, {'from': alice})
ceur.approve(bank, 2**256-1, {'from': alice})
spell.getAndApprovePair(cusd, ceur, {'from': admin})
lp = ufactory.getPair(cusd, ceur)
spell.setWhitelistLPTokens([lp], [True], {'from': admin})
bank.setWhitelistSpells([spell], [True], {'from': admin})
bank.setWhitelistTokens([cusd, ceur], [True, True], {'from': admin})
tx = bank.execute(
0,
spell,
spell.addLiquidityWERC20.encode_input(
ceur, # token 0
cusd, # token 1
[
40000 * 10**6, # 40000 ceur
50000 * 10**6, # 50000 cusd
0,
1000 * 10**6, # 1000 ceur
200 * 10**6, # 200 cusd
0, # borrow LP tokens
0, # min ceur
0, # min cusd
],
),
{'from': alice}
)
position_id = tx.return_value
print('tx gas used', tx.gas_used)
print('bank collateral size', bank.getPositionInfo(position_id))
print('bank collateral value', bank.getCollateralCELOValue(position_id))
print('bank borrow value', bank.getBorrowCELOValue(position_id))
print('bank ceur', bank.getBankInfo(ceur))
print('bank cusd', bank.getBankInfo(cusd))
print('ceur Px', simple_oracle.getCELOPx(ceur))
print('cusd Px', simple_oracle.getCELOPx(cusd))
print('lp Px', uniswap_lp_oracle.getCELOPx(lp))
|
test_uniswap_add_two_tokens
|
wow.min.js
|
/*! WOW - v1.1.3 - 2016-05-06
* Copyright (c) 2016 Matthieu Aussaguel;*/(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
wow = new WOW(
{
boxClass: 'wow', // default
animateClass: 'animated', // default
offset: 0, // default
mobile: true, // default
live: true // default
}
|
)
wow.init();
| |
traversal.go
|
// Copyright 2018 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.
package container
import (
"errors"
"fmt"
)
|
// traversal.go provides functions that navigate the container tree.
// rootCont returns the root container.
func rootCont(c *Container) *Container {
for p := c.parent; p != nil; p = c.parent {
c = p
}
return c
}
// visitFunc is executed during traversals when node is visited.
// If the visit function returns an error, the traversal terminates and the
// errStr is set to the text of the returned error.
type visitFunc func(*Container) error
// preOrder performs pre-order DFS traversal on the container tree.
func preOrder(c *Container, errStr *string, visit visitFunc) {
if c == nil || *errStr != "" {
return
}
if err := visit(c); err != nil {
*errStr = err.Error()
return
}
preOrder(c.first, errStr, visit)
preOrder(c.second, errStr, visit)
}
// postOrder performs post-order DFS traversal on the container tree.
func postOrder(c *Container, errStr *string, visit visitFunc) {
if c == nil || *errStr != "" {
return
}
postOrder(c.first, errStr, visit)
postOrder(c.second, errStr, visit)
if err := visit(c); err != nil {
*errStr = err.Error()
return
}
}
// findID finds container with the provided ID.
// Returns an error of there is no container with the specified ID.
func findID(root *Container, id string) (*Container, error) {
if id == "" {
return nil, errors.New("the container ID must not be empty")
}
var (
errStr string
cont *Container
)
preOrder(root, &errStr, visitFunc(func(c *Container) error {
if c.opts.id == id {
cont = c
}
return nil
}))
if cont == nil {
return nil, fmt.Errorf("cannot find container with ID %q", id)
}
return cont, nil
}
| |
protocol.go
|
package net
import (
"bufio"
"fmt"
"io/ioutil"
"strconv"
"strings"
"io"
)
type request struct {
Cmd string
Args [][]byte
Conn io.ReadCloser
}
func newRequset(conn io.ReadCloser) (*request, error) {
reader := bufio.NewReader(conn)
// *<number of arguments>CRLF
line, err := reader.ReadString('\n')
if err != nil {
return nil, err
}
var argCount int
if line[0] == '*' {
if _, err := fmt.Sscanf(line, "*%d\r\n", &argCount); err != nil {
return nil, malformed("*<#Arguments>", line)
}
// $<number of bytes of argumnet 1>CRLF
// <argument data>CRLF
command, err := readArgumnet(reader)
if err != nil {
return nil, err
}
arguments := make([][]byte, argCount-1)
for i := 0; i < argCount-1; i++ {
if arguments[i], err = readArgumnet(reader); err != nil {
return nil, err
}
}
return &request{
Cmd: strings.ToUpper(string(command)),
Args: arguments,
Conn: conn,
}, nil
}
return nil, fmt.Errorf("new request error,line: %s\n", line)
}
func readArgumnet(reader *bufio.Reader) ([]byte, error) {
line, err := reader.ReadString('\n')
if err != nil {
return nil, malformed("$<ArgumentLenght>", line)
}
var argLength int
if _, err := fmt.Sscanf(line, "$%d\r\n", &argLength); err != nil {
return nil, malformed("$<ArgumentLength>", line)
}
data, err := ioutil.ReadAll(io.LimitReader(reader, int64(argLength)))
if err != nil {
return nil, err
}
if len(data) != argLength {
return nil, malformedLength(argLength, len(data))
}
if b, err := reader.ReadByte(); err != nil || b != '\r' {
return nil, malformedMissingCRLF()
}
if b, err := reader.ReadByte(); err != nil || b != '\n' {
return nil, malformedMissingCRLF()
}
return data, nil
}
func malformed(expected string, got string) error {
return fmt.Errorf("Mailformed request: %s does not match %s", got, expected)
}
func
|
(expected int, got int) error {
return fmt.Errorf("Mailformed request: argument length %d does not match %d", got, expected)
}
func malformedMissingCRLF() error {
return fmt.Errorf("Mailformed request: line should end with CRLF")
}
type reply io.WriterTo
type statusReply struct {
Code string
}
func (r *statusReply) WriteTo(w io.Writer) (int64, error) {
n, err := w.Write([]byte("+" + r.Code + "\r\n"))
return int64(n), err
}
type errReply struct {
Msg string
}
func (r *errReply) WriteTo(w io.Writer) (int64, error) {
n, err := w.Write([]byte("-ERR " + r.Msg + "\r\n"))
return int64(n), err
}
type intReply struct {
Nos int64
}
func (r *intReply) WriteTo(w io.Writer) (int64, error) {
n, err := w.Write([]byte(":" + strconv.FormatInt(r.Nos, 10) + "\r\n"))
return int64(n), err
}
type bulkReply struct {
Nil bool
Bulk string
}
func (r *bulkReply) WriteTo(w io.Writer) (int64, error) {
if r.Nil {
n, err := w.Write([]byte("$-1\r\n"))
return int64(n), err
}
n, err := w.Write([]byte("$" + strconv.Itoa(len(r.Bulk)) + "\r\n" + r.Bulk + "\r\n"))
return int64(n), err
}
type listReply struct {
Nil bool
List []string
}
func (r listReply) WriteTo(w io.Writer) (int64, error) {
if r.Nil {
n, err := w.Write([]byte("*-1\r\n"))
return int64(n), err
}
if len(r.List) == 0 {
n, err := w.Write([]byte("*0\r\n"))
return int64(n), err
}
body := "*" + strconv.Itoa(len(r.List)) + "\r\n"
for _, li := range r.List {
if li == "" {
body += "$-1\r\n"
continue
}
body += "$" + strconv.Itoa(len(li)) + "\r\n" + li + "\r\n"
}
n, err := w.Write([]byte(body))
return int64(n), err
}
|
malformedLength
|
0010_auto_20150923_1151.py
|
#-*- coding: utf-8 -*-
from __future__ import unicode_literals
import aldryn_apphooks_config.fields
import app_data.fields
import djangocms_text_ckeditor.fields
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '__first__'),
('djangocms_blog', '0009_latestpostsplugin_tags_new'),
]
operations = [
migrations.CreateModel(
name='BlogConfig',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
('type', models.CharField(verbose_name='type', max_length=100)),
('namespace', models.CharField(default=None, verbose_name='instance namespace', unique=True, max_length=100)),
('app_data', app_data.fields.AppDataField(editable=False, default='{}')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='BlogConfigTranslation',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
('language_code', models.CharField(db_index=True, verbose_name='Language', max_length=15)),
('app_title', models.CharField(verbose_name='application title', max_length=234)),
('master', models.ForeignKey(editable=False, to='djangocms_blog.BlogConfig', related_name='translations', null=True)),
],
options={
'verbose_name': 'blog config Translation',
'db_table': 'djangocms_blog_blogconfig_translation',
'default_permissions': (),
'db_tablespace': '',
'managed': True,
},
),
migrations.CreateModel(
name='GenericBlogPlugin',
fields=[
('cmsplugin_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, auto_created=True, to='cms.CMSPlugin')),
('app_config', aldryn_apphooks_config.fields.AppHookConfigField(verbose_name='app. config', blank=True, to='djangocms_blog.BlogConfig', help_text='When selecting a value, the form is reloaded to get the updated default')),
],
options={
'abstract': False,
},
bases=('cms.cmsplugin',),
),
migrations.AlterField(
model_name='posttranslation',
name='abstract',
field=djangocms_text_ckeditor.fields.HTMLField(default='', verbose_name='abstract', blank=True),
),
migrations.AddField(
model_name='authorentriesplugin',
name='app_config',
field=aldryn_apphooks_config.fields.AppHookConfigField(default=None, blank=True, verbose_name='app. config', to='djangocms_blog.BlogConfig', help_text='When selecting a value, the form is reloaded to get the updated default', null=True),
preserve_default=False,
),
migrations.AddField(
model_name='blogcategory',
name='app_config',
field=aldryn_apphooks_config.fields.AppHookConfigField(default=None, verbose_name='app. config', to='djangocms_blog.BlogConfig', help_text='When selecting a value, the form is reloaded to get the updated default', null=True),
preserve_default=False,
),
migrations.AddField(
model_name='latestpostsplugin',
name='app_config',
field=aldryn_apphooks_config.fields.AppHookConfigField(default=None, blank=True, verbose_name='app. config', to='djangocms_blog.BlogConfig', help_text='When selecting a value, the form is reloaded to get the updated default', null=True),
preserve_default=False,
),
migrations.AddField(
model_name='post',
name='app_config',
|
name='blogconfigtranslation',
unique_together=set([('language_code', 'master')]),
),
migrations.AlterField(
model_name='post',
name='sites',
field=models.ManyToManyField(to='sites.Site', help_text='Select sites in which to show the post. If none is set it will be visible in all the configured sites.', blank=True, verbose_name='Site(s)'),
),
]
|
field=aldryn_apphooks_config.fields.AppHookConfigField(default=None, verbose_name='app. config', to='djangocms_blog.BlogConfig', help_text='When selecting a value, the form is reloaded to get the updated default', null=True),
preserve_default=False,
),
migrations.AlterUniqueTogether(
|
adder.go
|
package main
import "fmt"
func adder() func(int) int {
sum := 0
return func(v int) int {
sum += v
return sum
}
}
// this one is the standard functional programming, the one below is not
type iAdder func(int) (int, iAdder)
func adder2(base int) iAdder {
return func(v int) (int, iAdder) {
return base + v, adder2(base + v)
}
}
func main()
|
{
a := adder2(0)
for i := 0; i < 10; i++ {
var s int
s, a = a(i)
fmt.Printf("0 + 1 + ... + %d = %d \n", i, s)
}
}
|
|
katparser.py
|
#!/usr/bin/env python3
import glob
def katparser(katfile):
"""Trivial parser for KAT files
"""
length = msg = md = None
with open(katfile) as f:
for line in f:
line = line.strip()
if not line or line.startswith("#"):
|
key, value = line.split(" = ")
if key == "Len":
length = int(value)
elif key == "Msg":
if not length:
msg = ''
else:
msg = value
elif key in ("MD", "Squeezed"):
md = value
if length % 8 == 0:
yield msg, md
length = msg = md = None
else:
raise ValueError(key)
def main():
for filename in sorted(glob.glob("ShortMsgKAT_*.txt")):
exportname = filename[12:].lower().replace('-', '_')
with open(exportname, 'w') as f:
f.write("# {}\n".format(filename))
for msg, md in katparser(filename):
f.write("{},{}\n".format(msg.lower(), md.lower()))
f.write("# EOF\n")
if __name__ == '__main__':
main()
|
continue
|
CheckParser.js
|
/**
* @author : Kaenn
*/
var gt=require("./gt");
var allCheck={
"gt" : gt
}
//Constructor
function CheckParser(checks) {
this.checks=checks;
}
/**
* Parse the result
* @param result
* @returns {CheckParser}
*/
CheckParser.prototype.checkField = function(field_name,field_value) {
if(field_name in this.checks){
var checks=this.checks[field_name];
var check_type=checks['type'];
var value=field_value;
if(check_type=="length") value=value.length;
var check_descs=checks['check'];
|
return allCheck[check_method].check(value,check_desc);
}else{
console.log("Check unknown. [name : "+check_type+"]");
}
}
}
return true;
};
CheckParser.prototype.check = function(row) {
for(var field_name in row){
var field_value=row[field_name];
if(!this.checkField(field_name,field_value)) return false;
}
return true;
};
// export the class
module.exports = CheckParser;
|
for(var check_method in check_descs){
var check_desc=check_descs[check_method];
if(check_method in allCheck){
|
index.js
|
"use strict";
require("dotenv").config();
|
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
});
const TOKEN = process.env.TOKEN;
// When the client is ready, run this code (only once)
client.once("ready", () => {
console.log("Ready! 🤖");
});
//Recibir mensaje
const BOT_CHANNEL = process.env.BOT_CHANNEL;
const MESSAGE_RESPONSE = ["Pito todos🍆", "A lamidas😜", "Pito`(¬‿¬)`", "Nyaaa`╰(*°▽°*)╯`"];
function gotMessage(message) {
console.log("New Message📰", message);
if (message.content.match(/([a-z])hupas+/)||message.content.match(/([a-z])hupan+/)) {
//message.reply("pito 7u7");
let randomIndex = Math.floor(Math.random() * MESSAGE_RESPONSE.length);
message.channel.send(MESSAGE_RESPONSE[randomIndex]);
// message.reply(); No sé como rresponder?
}
}
client.on("messageCreate", gotMessage);
//Mensaje hola
// Login to Discord with your client's token
client.login(TOKEN);
|
const { Client, Intents } = require("discord.js");
console.log("Here we go again 🕶");
|
storageaccount.go
|
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package storageaccount
import (
"context"
"errors"
"fmt"
"net/http"
"strings"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/apimachinery/pkg/runtime"
"github.com/Azure/azure-service-operator/api/v1alpha1"
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
"github.com/Azure/azure-service-operator/pkg/resourcemanager/config"
resourcemgrconfig "github.com/Azure/azure-service-operator/pkg/resourcemanager/config"
"github.com/Azure/azure-service-operator/pkg/resourcemanager/iam"
"github.com/Azure/azure-service-operator/pkg/secrets"
)
const templateForConnectionString = "DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;EndpointSuffix=%s"
type azureStorageManager struct {
Creds config.Credentials
SecretClient secrets.SecretClient
Scheme *runtime.Scheme
}
// ParseNetworkPolicy - helper function to parse network policies from Kubernetes spec
func ParseNetworkPolicy(ruleSet *v1alpha1.StorageNetworkRuleSet) storage.NetworkRuleSet {
bypass := storage.AzureServices
switch ruleSet.Bypass {
case "AzureServices":
bypass = storage.AzureServices
case "None":
bypass = storage.None
case "Logging":
bypass = storage.Logging
case "Metrics":
bypass = storage.Metrics
}
defaultAction := storage.DefaultActionDeny
if strings.EqualFold(ruleSet.DefaultAction, "allow") {
defaultAction = storage.DefaultActionAllow
}
var ipInstances []storage.IPRule
if ruleSet.IPRules != nil {
for _, i := range *ruleSet.IPRules {
ipmask := i.IPAddressOrRange
ipInstances = append(ipInstances, storage.IPRule{
IPAddressOrRange: ipmask,
Action: storage.Allow,
})
}
}
|
vnetInstances = append(vnetInstances, storage.VirtualNetworkRule{
VirtualNetworkResourceID: vnetID,
Action: storage.Allow,
})
}
}
return storage.NetworkRuleSet{
Bypass: bypass,
DefaultAction: defaultAction,
IPRules: &ipInstances,
VirtualNetworkRules: &vnetInstances,
}
}
func getStorageClient(creds config.Credentials) (storage.AccountsClient, error) {
storageClient := storage.NewAccountsClientWithBaseURI(config.BaseURI(), creds.SubscriptionID())
a, err := iam.GetResourceManagementAuthorizer(creds)
if err != nil {
return storage.AccountsClient{}, err
}
storageClient.Authorizer = a
storageClient.AddToUserAgent(config.UserAgent())
return storageClient, nil
}
// CreateStorage creates a new storage account
func (m *azureStorageManager) CreateStorage(ctx context.Context,
groupName string,
storageAccountName string,
location string,
sku azurev1alpha1.StorageAccountSku,
kind azurev1alpha1.StorageAccountKind,
tags map[string]*string,
accessTier azurev1alpha1.StorageAccountAccessTier,
enableHTTPsTrafficOnly *bool, dataLakeEnabled *bool, networkRule *storage.NetworkRuleSet) (pollingURL string, result storage.Account, err error) {
storageClient, err := getStorageClient(m.Creds)
if err != nil {
return "", storage.Account{}, err
}
//Check if name is available
storageType := "Microsoft.Storage/storageAccounts"
checkAccountParams := storage.AccountCheckNameAvailabilityParameters{Name: &storageAccountName, Type: &storageType}
checkNameResult, err := storageClient.CheckNameAvailability(ctx, checkAccountParams)
if err != nil {
return "", result, err
}
if dataLakeEnabled == to.BoolPtr(true) && kind != "StorageV2" {
err = errors.New("unable to create datalake enabled storage account")
return
}
if *checkNameResult.NameAvailable == false {
if checkNameResult.Reason == storage.AccountNameInvalid {
err = errors.New("AccountNameInvalid")
return
} else if checkNameResult.Reason == storage.AlreadyExists {
err = errors.New("AlreadyExists")
return
}
}
sSku := storage.Sku{Name: storage.SkuName(sku.Name)}
sKind := storage.Kind(kind)
sAccessTier := storage.AccessTier(accessTier)
params := storage.AccountCreateParameters{
Location: to.StringPtr(location),
Sku: &sSku,
Kind: sKind,
Tags: tags,
Identity: nil,
AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{
AccessTier: sAccessTier,
EnableHTTPSTrafficOnly: enableHTTPsTrafficOnly,
IsHnsEnabled: dataLakeEnabled,
NetworkRuleSet: networkRule,
},
}
future, err := storageClient.Create(ctx, groupName, storageAccountName, params)
if err != nil {
return "", result, err
}
result, err = future.Result(storageClient)
return future.PollingURL(), result, err
}
// Get gets the description of the specified storage account.
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
// storageAccountName - the name of the storage account
func (m *azureStorageManager) GetStorage(ctx context.Context, resourceGroupName string, storageAccountName string) (result storage.Account, err error) {
storageClient, err := getStorageClient(m.Creds)
if err != nil {
return storage.Account{}, err
}
return storageClient.GetProperties(ctx, resourceGroupName, storageAccountName, "")
}
// DeleteStorage removes the resource group named by env var
func (m *azureStorageManager) DeleteStorage(ctx context.Context, groupName string, storageAccountName string) (result autorest.Response, err error) {
storageClient, err := getStorageClient(m.Creds)
if err != nil {
return autorest.Response{
Response: &http.Response{
StatusCode: 500,
},
}, err
}
return storageClient.Delete(ctx, groupName, storageAccountName)
}
func (m *azureStorageManager) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result storage.AccountListKeysResult, err error) {
storageClient, err := getStorageClient(m.Creds)
if err != nil {
return storage.AccountListKeysResult{}, err
}
return storageClient.ListKeys(ctx, resourceGroupName, accountName, storage.Kerb)
}
// StoreSecrets upserts the secret information for this storage account
func (m *azureStorageManager) StoreSecrets(ctx context.Context, resourceGroupName string, accountName string, instance *v1alpha1.StorageAccount) error {
// get the keys
keyResult, err := m.ListKeys(ctx, resourceGroupName, accountName)
if err != nil {
return err
}
if keyResult.Keys == nil {
return errors.New("No keys were returned from ListKeys")
}
keys := *keyResult.Keys
storageEndpointSuffix := resourcemgrconfig.Environment().StorageEndpointSuffix
// build the connection string
data := map[string][]byte{
"StorageAccountName": []byte(accountName),
}
for i, key := range keys {
data[fmt.Sprintf("connectionString%d", i)] = []byte(fmt.Sprintf(templateForConnectionString, accountName, *key.Value, storageEndpointSuffix))
data[fmt.Sprintf("key%d", i)] = []byte(*key.Value)
}
// upsert
secretKey := m.makeSecretKey(instance)
return m.SecretClient.Upsert(ctx,
secretKey,
data,
secrets.WithOwner(instance),
secrets.WithScheme(m.Scheme),
)
}
func (m *azureStorageManager) makeSecretKey(instance *v1alpha1.StorageAccount) secrets.SecretKey {
if m.SecretClient.GetSecretNamingVersion() == secrets.SecretNamingV1 {
return secrets.SecretKey{
Name: fmt.Sprintf("storageaccount-%s-%s", instance.Spec.ResourceGroup, instance.Name),
Namespace: instance.Namespace, Kind: instance.TypeMeta.Kind,
}
}
return secrets.SecretKey{Name: instance.Name, Namespace: instance.Namespace, Kind: instance.TypeMeta.Kind}
}
|
var vnetInstances []storage.VirtualNetworkRule
if ruleSet.VirtualNetworkRules != nil {
for _, i := range *ruleSet.VirtualNetworkRules {
vnetID := i.SubnetId
|
template.js
|
(function ($) {
$(document).ready(function () {
initPage(document);
});
$(document).on("opencontent.change", function (event, element) {
initPage(element);
});
/*
function initPage(element) {
$(".jplist", element).each(function () {
$(this).jplist({
itemsBox: '.list'
, itemPath: '.list-item'
, panelPath: '.jplist-panel'
,deepLinking: true
});
});
}
*/
var template = '';
function
|
(element) {
$(".jplist", element).each(function () {
var moduleid = $(this).attr('data-moduleid');
var moduleScope = $(this),
self = moduleScope,
sf = $.ServicesFramework(moduleid);
var $list = $('#demo .list')
, template = Handlebars.compile($('#jplist-template').html());
$(this).jplist({
itemsBox: ".list"
, itemPath: ".list-item"
, panelPath: ".jplist-panel"
, deepLinking: false
, dataSource: {
type: 'server'
, server: {
ajax: {
data: {}
, url: sf.getServiceRoot('OpenContent') + "JplistAPI/List"
, dataType: 'json'
, type: 'POST'
, beforeSend: sf.setModuleHeaders
}
}
, render: function (dataItem, statuses) {
$list.html(template(dataItem.content));
var logs = dataItem.content.Logs;
$.fn.openContent.printLogs('Module ' + moduleid + ' - jplist webapi', logs);
}
}
});
var isTyping = false;
var typingHandler = null;
var $textfilter = $(".textfilter", this);
$textfilter.on('input', function(context){
if (isTyping) {
window.clearTimeout(typingHandler);
}
else {
isTyping = true;
}
typingHandler = window.setTimeout(function () {
isTyping = false;
$textfilter.trigger("keydelay");
}, 1000);
});
});
$(".flexslider.flex-carousel", element).each(function () {
$(this).flexslider({
'animationLoop': $(this).attr("data-animationloop") ? $(this).data("animationloop") : false,
'slideshow': $(this).attr("data-slideshow") ? $(this).data("slideshow") : false,
'animation': "slide",
'touch': $(this).attr("data-touch") ? $(this).data("touch") : false,
'controlNav': $(this).attr("data-controlnav") ? $(this).data("controlnav") : false,
'directionNav': $(this).attr("data-directionnav") ? $(this).data("directionnav") : false,
'itemWidth': $(this).attr("data-itemwidth") ? $(this).data("itemwidth") : 210,
'itemMargin': $(this).attr("data-itemmargin") ? $(this).data("itemmargin") : 5,
'minItems': $(this).attr("data-minitems") ? $(this).data("minitems") : 0,
'maxItems': $(this).attr("data-maxitems") ? $(this).data("maxitems") : 0,
'move': $(this).attr("data-move") ? $(this).data("move") : 0,
'asNavFor': $(this).attr("data-asnavfor") ? $(this).data("asnavfor") : ""
});
});
$(".flexslider.flex-slider", element).each(function () {
$(this).flexslider({
'animationLoop': $(this).attr("data-animationloop") ? $(this).data("animationloop") : false,
'slideshow': $(this).attr("data-slideshow") ? $(this).data("slideshow") : false,
'animation': $(this).attr("data-animation") ? $(this).data("animation") : "slide",
'touch': $(this).attr("data-touch") ? $(this).data("touch") : false,
'controlNav': $(this).attr("data-controlnav") ? $(this).data("controlnav") : false,
'directionNav': $(this).attr("data-directionnav") ? $(this).data("directionnav") : false,
'sync': $(this).attr("data-sync") ? $(this).data("sync") : ""
});
});
if ($.fn.oembed) {
$(".jplist-detail .description a").oembed(null, {'maxWidth':300});
}
}
if (typeof Handlebars != 'undefined') {
Handlebars.registerHelper('formatDateTime', function (context, format) {
if (window.moment && context && moment(context).isValid()) {
var f = format || "DD/MM/YYYY";
return moment(context).format(f);
} else {
return context; // moment plugin is not available, context does not have a truthy value, or context is not a valid date
}
});
Handlebars.registerHelper('lookup', function (context, field, value, options) {
if (context) {
for (var i = 0; i < context.length; i++) {
if (context[i][field] == value) {
return options.fn(context[i]);
}
}
}
return context;
});
}
}(jQuery));
|
initPage
|
parameter.rs
|
#![allow(clippy::missing_safety_doc)]
//! Gurobi parameters for [`Env`](crate::Env) and [`Model`](crate::Model) objects. See the
//! [manual](https://www.gurobi.com/documentation/9.1/refman/parameters.html) for a list
//! of parameters and their uses.
use grb_sys2 as ffi;
use std::ffi::{CStr, CString};
use crate::env::Env;
use crate::util::{copy_c_str, AsPtr};
use crate::Result;
#[allow(missing_docs)]
mod param_enums {
include!(concat!(env!("OUT_DIR"), "/param_enums.rs"));
// generated code - see build/main.rs
}
#[doc(inline)]
pub use param_enums::enum_exports::*;
pub use param_enums::variant_exports as param;
use crate::constants::GRB_MAX_STRLEN;
use cstr_enum::AsCStr;
/// A queryable Gurobi parameter for a [`Model`](crate::Model) or [`Env`](crate::Env)
pub trait ParamGet<V> {
/// This parameter's value type (string, double, int, char)
/// Query a parameter from an environment
fn get(&self, env: &Env) -> Result<V>;
}
/// A modifiable Gurobi parameter for a [`Model`](crate::Model) or [`Env`](crate::Env)
pub trait ParamSet<V> {
/// Set a parameter on an environment
fn set(&self, env: &mut Env, value: V) -> Result<()>;
}
macro_rules! impl_param_get {
($t:ty, $default:expr, $get:path) => {
#[inline]
fn get(&self, env: &Env) -> Result<$t> {
let mut val = $default;
unsafe {
env.check_apicall($get(env.as_mut_ptr(), self.as_cstr().as_ptr(), &mut val))?;
}
Ok(val)
}
};
}
macro_rules! impl_param_set {
($t:ty, $set:path) => {
#[inline]
fn set(&self, env: &mut Env, value: $t) -> Result<()> {
unsafe {
env.check_apicall($set(env.as_mut_ptr(), self.as_cstr().as_ptr(), value))?;
|
};
}
impl ParamGet<i32> for IntParam {
impl_param_get! { i32, i32::MIN, ffi::GRBgetintparam }
}
impl ParamSet<i32> for IntParam {
impl_param_set! { i32, ffi::GRBsetintparam }
}
impl ParamGet<f64> for DoubleParam {
impl_param_get! { f64, f64::NAN, ffi::GRBgetdblparam }
}
impl ParamSet<f64> for DoubleParam {
impl_param_set! { f64, ffi::GRBsetdblparam }
}
impl ParamGet<String> for StrParam {
fn get(&self, env: &Env) -> Result<String> {
let mut buf = [0i8; GRB_MAX_STRLEN];
unsafe {
env.check_apicall(ffi::GRBgetstrparam(
env.as_mut_ptr(),
self.as_cstr().as_ptr(),
buf.as_mut_ptr(),
))?;
Ok(copy_c_str(buf.as_ptr()))
}
}
}
impl ParamSet<String> for StrParam {
fn set(&self, env: &mut Env, value: String) -> Result<()> {
let value = CString::new(value)?;
unsafe {
env.check_apicall(ffi::GRBsetstrparam(
env.as_mut_ptr(),
self.as_cstr().as_ptr(),
value.as_ptr(),
))
}
}
}
/// Support for querying and seting undocumented Gurobi parameters.
///
/// Use an instance of this type to set or query parameters using the [`Model::get_param`](crate::Model::get_param)
/// or [`Model::set_param`](crate::Model::set_param) methods.
///
/// Current (very short) list of undocumented parameters:
///
/// | Name | Type | Default | Description |
/// | --- | --- | --- | --- |
/// | `GURO_PAR_MINBPFORBID` | `i32` | `2000000000` |Minimum `BranchPriority` a variable must have to stop it being removed during presolve |
///
/// # Example
/// ```
/// use grb::prelude::*;
/// use grb::parameter::Undocumented;
///
/// let mut m = Model::new("model")?;
/// let undocumented_parameter = Undocumented::new("GURO_PAR_MINBPFORBID")?;
///
/// // requires return type to be annotated
/// let val : i32 = m.get_param(&undocumented_parameter)?;
/// assert_eq!(val, 2_000_000_000);
///
/// // Wrong return type results in a FromAPI error
/// let result : grb::Result<String> = m.get_param(&undocumented_parameter);
/// assert!(matches!(result, Err(grb::Error::FromAPI(_, _))));
///
/// m.set_param(&undocumented_parameter, 10)?;
/// # Ok::<(), grb::Error>(())
/// ```
#[derive(Clone, Eq, PartialEq)]
pub struct Undocumented {
name: CString,
}
impl Undocumented {
/// Declare a new `Undocumented` parameter.
///
/// # Errors
/// Will return an [`Error::NulError`](crate::Error) if the string given cannot be converted into a
/// C-style string.
pub fn new(string: impl Into<Vec<u8>>) -> Result<Undocumented> {
Ok(Undocumented {
name: CString::new(string)?,
})
}
}
// not strictly necessary, since we can use self.name directly
impl AsCStr for Undocumented {
fn as_cstr(&self) -> &CStr {
self.name.as_ref()
}
}
impl ParamGet<i32> for &Undocumented {
impl_param_get! { i32, i32::MIN, ffi::GRBgetintparam }
}
impl ParamSet<i32> for &Undocumented {
impl_param_set! { i32, ffi::GRBsetintparam }
}
impl ParamGet<f64> for &Undocumented {
impl_param_get! { f64, f64::NAN, ffi::GRBgetdblparam }
}
impl ParamSet<f64> for &Undocumented {
impl_param_set! { f64, ffi::GRBsetdblparam }
}
impl ParamGet<String> for &Undocumented {
fn get(&self, env: &Env) -> Result<String> {
let mut buf = [0i8; GRB_MAX_STRLEN];
unsafe {
env.check_apicall(ffi::GRBgetstrparam(
env.as_mut_ptr(),
self.as_cstr().as_ptr(),
buf.as_mut_ptr(),
))?;
Ok(copy_c_str(buf.as_ptr()))
}
}
}
impl ParamSet<String> for &Undocumented {
fn set(&self, env: &mut Env, value: String) -> Result<()> {
let value = CString::new(value)?;
unsafe {
env.check_apicall(ffi::GRBsetstrparam(
env.as_mut_ptr(),
self.as_cstr().as_ptr(),
value.as_ptr(),
))
}
}
}
|
}
Ok(())
}
|
users.go
|
package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/owncloud/ocis/storage/pkg/config"
)
// UsersWithConfig applies cfg to the root flagset
func UsersWithConfig(cfg *config.Config) []cli.Flag {
flags := []cli.Flag{
// debug ports are the odd ports
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Users.DebugAddr, "0.0.0.0:9145"),
Usage: "Address to bind debug server",
EnvVars: []string{"STORAGE_USERPROVIDER_DEBUG_ADDR"},
Destination: &cfg.Reva.Users.DebugAddr,
},
// Services
// Userprovider
&cli.StringFlag{
Name: "network",
Value: flags.OverrideDefaultString(cfg.Reva.Users.GRPCNetwork, "tcp"),
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_USERPROVIDER_NETWORK"},
Destination: &cfg.Reva.Users.GRPCNetwork,
},
&cli.StringFlag{
Name: "addr",
Value: flags.OverrideDefaultString(cfg.Reva.Users.GRPCAddr, "0.0.0.0:9144"),
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_USERPROVIDER_ADDR"},
Destination: &cfg.Reva.Users.GRPCAddr,
},
&cli.StringFlag{
Name: "endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Users.Endpoint, "localhost:9144"),
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
Destination: &cfg.Reva.Users.Endpoint,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("userprovider"), // TODO preferences
Usage: "--service userprovider [--service otherservice]",
EnvVars: []string{"STORAGE_USERPROVIDER_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: flags.OverrideDefaultString(cfg.Reva.Users.Driver, "ldap"),
Usage: "user driver: 'demo', 'json', 'ldap', 'owncloudsql' or 'rest'",
EnvVars: []string{"STORAGE_USERPROVIDER_DRIVER"},
Destination: &cfg.Reva.Users.Driver,
},
&cli.StringFlag{
Name: "json-config",
Value: flags.OverrideDefaultString(cfg.Reva.Users.JSON, ""),
Usage: "Path to users.json file",
EnvVars: []string{"STORAGE_USERPROVIDER_JSON"},
Destination: &cfg.Reva.Users.JSON,
},
&cli.IntFlag{
Name: "user-groups-cache-expiration",
Value: flags.OverrideDefaultInt(cfg.Reva.Users.UserGroupsCacheExpiration, 5),
Usage: "Time in minutes for redis cache expiration.",
EnvVars: []string{"STORAGE_USER_CACHE_EXPIRATION"},
Destination: &cfg.Reva.Users.UserGroupsCacheExpiration,
},
// user owncloudsql
&cli.StringFlag{
Name: "owncloudsql-dbhost",
Value: flags.OverrideDefaultString(cfg.Reva.UserOwnCloudSQL.DBHost, "mysql"),
Usage: "hostname of the mysql db",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_DBHOST"},
Destination: &cfg.Reva.UserOwnCloudSQL.DBHost,
},
&cli.IntFlag{
Name: "owncloudsql-dbport",
Value: flags.OverrideDefaultInt(cfg.Reva.UserOwnCloudSQL.DBPort, 3306),
Usage: "port of the mysql db",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_DBPORT"},
Destination: &cfg.Reva.UserOwnCloudSQL.DBPort,
},
&cli.StringFlag{
Name: "owncloudsql-dbname",
Value: flags.OverrideDefaultString(cfg.Reva.UserOwnCloudSQL.DBName, "owncloud"),
Usage: "database name of the owncloud db",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_DBNAME"},
Destination: &cfg.Reva.UserOwnCloudSQL.DBName,
},
&cli.StringFlag{
Name: "owncloudsql-dbuser",
Value: flags.OverrideDefaultString(cfg.Reva.UserOwnCloudSQL.DBUsername, "owncloud"),
Usage: "user name to use when connecting to the mysql owncloud db",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_DBUSER"},
Destination: &cfg.Reva.UserOwnCloudSQL.DBUsername,
},
&cli.StringFlag{
Name: "owncloudsql-dbpass",
Value: flags.OverrideDefaultString(cfg.Reva.UserOwnCloudSQL.DBPassword, "secret"),
Usage: "password to use when connecting to the mysql owncloud db",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_DBPASS"},
Destination: &cfg.Reva.UserOwnCloudSQL.DBPassword,
},
&cli.StringFlag{
Name: "owncloudsql-idp",
Value: flags.OverrideDefaultString(cfg.Reva.UserOwnCloudSQL.Idp, "https://localhost:9200"),
Usage: "Identity provider to use for users",
|
Name: "owncloudsql-nobody",
Value: flags.OverrideDefaultInt64(cfg.Reva.UserOwnCloudSQL.Nobody, 99),
Usage: "fallback user id to use when user has no id",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_NOBODY"},
Destination: &cfg.Reva.UserOwnCloudSQL.Nobody,
},
&cli.BoolFlag{
Name: "owncloudsql-join-username",
Value: flags.OverrideDefaultBool(cfg.Reva.UserOwnCloudSQL.JoinUsername, false),
Usage: "join the username from the oc_preferences table",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_JOIN_USERNAME"},
Destination: &cfg.Reva.UserOwnCloudSQL.JoinUsername,
},
&cli.BoolFlag{
Name: "owncloudsql-join-ownclouduuid",
Value: flags.OverrideDefaultBool(cfg.Reva.UserOwnCloudSQL.JoinOwnCloudUUID, false),
Usage: "join the ownclouduuid from the oc_preferences table",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_JOIN_OWNCLOUDUUID"},
Destination: &cfg.Reva.UserOwnCloudSQL.JoinOwnCloudUUID,
},
&cli.BoolFlag{
Name: "owncloudsql-enable-medial-search",
Value: flags.OverrideDefaultBool(cfg.Reva.UserOwnCloudSQL.EnableMedialSearch, false),
Usage: "enable medial search when finding users",
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_ENABLE_MEDIAL_SEARCH"},
Destination: &cfg.Reva.UserOwnCloudSQL.EnableMedialSearch,
},
}
flags = append(flags, TracingWithConfig(cfg)...)
flags = append(flags, DebugWithConfig(cfg)...)
flags = append(flags, SecretWithConfig(cfg)...)
flags = append(flags, LDAPWithConfig(cfg)...)
flags = append(flags, RestWithConfig(cfg)...)
return flags
}
|
EnvVars: []string{"STORAGE_USERPROVIDER_OWNCLOUDSQL_IDP", "OCIS_URL"},
Destination: &cfg.Reva.UserOwnCloudSQL.Idp,
},
&cli.Int64Flag{
|
Account.rs
|
// This file is generated by rust-protobuf 2.10.1. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `Account.proto`
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_1;
#[derive(PartialEq,Clone,Default)]
pub struct Address {
// message fields
pub network_type: super::Network::NetworkType,
pub account_type: AccountType,
pub public_key_hash: ::std::vec::Vec<u8>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Address {
fn default() -> &'a Address {
<Address as ::protobuf::Message>::default_instance()
}
}
impl Address {
pub fn new() -> Address {
::std::default::Default::default()
}
// .Catalyst.Protocol.Network.NetworkType network_type = 1;
pub fn get_network_type(&self) -> super::Network::NetworkType {
self.network_type
}
pub fn clear_network_type(&mut self) {
self.network_type = super::Network::NetworkType::NETWORK_TYPE_UNKNOWN;
}
// Param is passed by value, moved
pub fn set_network_type(&mut self, v: super::Network::NetworkType) {
self.network_type = v;
}
// .Catalyst.Protocol.Account.AccountType account_type = 2;
pub fn get_account_type(&self) -> AccountType {
self.account_type
}
pub fn clear_account_type(&mut self) {
self.account_type = AccountType::ACCOUNT_TYPE_UNKNOWN;
}
// Param is passed by value, moved
pub fn set_account_type(&mut self, v: AccountType)
|
// bytes public_key_hash = 3;
pub fn get_public_key_hash(&self) -> &[u8] {
&self.public_key_hash
}
pub fn clear_public_key_hash(&mut self) {
self.public_key_hash.clear();
}
// Param is passed by value, moved
pub fn set_public_key_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key_hash = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_public_key_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.public_key_hash
}
// Take field
pub fn take_public_key_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.public_key_hash, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for Address {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.network_type, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.account_type, 2, &mut self.unknown_fields)?
},
3 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.public_key_hash)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.network_type != super::Network::NetworkType::NETWORK_TYPE_UNKNOWN {
my_size += ::protobuf::rt::enum_size(1, self.network_type);
}
if self.account_type != AccountType::ACCOUNT_TYPE_UNKNOWN {
my_size += ::protobuf::rt::enum_size(2, self.account_type);
}
if !self.public_key_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(3, &self.public_key_hash);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.network_type != super::Network::NetworkType::NETWORK_TYPE_UNKNOWN {
os.write_enum(1, self.network_type.value())?;
}
if self.account_type != AccountType::ACCOUNT_TYPE_UNKNOWN {
os.write_enum(2, self.account_type.value())?;
}
if !self.public_key_hash.is_empty() {
os.write_bytes(3, &self.public_key_hash)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Address {
Address::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::Network::NetworkType>>(
"network_type",
|m: &Address| { &m.network_type },
|m: &mut Address| { &mut m.network_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AccountType>>(
"account_type",
|m: &Address| { &m.account_type },
|m: &mut Address| { &mut m.account_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"public_key_hash",
|m: &Address| { &m.public_key_hash },
|m: &mut Address| { &mut m.public_key_hash },
));
::protobuf::reflect::MessageDescriptor::new::<Address>(
"Address",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Address {
static mut instance: ::protobuf::lazy::Lazy<Address> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Address,
};
unsafe {
instance.get(Address::new)
}
}
}
impl ::protobuf::Clear for Address {
fn clear(&mut self) {
self.network_type = super::Network::NetworkType::NETWORK_TYPE_UNKNOWN;
self.account_type = AccountType::ACCOUNT_TYPE_UNKNOWN;
self.public_key_hash.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Address {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Address {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum AccountType {
ACCOUNT_TYPE_UNKNOWN = 0,
PUBLIC_ACCOUNT = 8,
CONFIDENTIAL_ACCOUNT = 16,
SMART_CONTRACT_ACCOUNT = 24,
}
impl ::protobuf::ProtobufEnum for AccountType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<AccountType> {
match value {
0 => ::std::option::Option::Some(AccountType::ACCOUNT_TYPE_UNKNOWN),
8 => ::std::option::Option::Some(AccountType::PUBLIC_ACCOUNT),
16 => ::std::option::Option::Some(AccountType::CONFIDENTIAL_ACCOUNT),
24 => ::std::option::Option::Some(AccountType::SMART_CONTRACT_ACCOUNT),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [AccountType] = &[
AccountType::ACCOUNT_TYPE_UNKNOWN,
AccountType::PUBLIC_ACCOUNT,
AccountType::CONFIDENTIAL_ACCOUNT,
AccountType::SMART_CONTRACT_ACCOUNT,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
};
unsafe {
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new("AccountType", file_descriptor_proto())
})
}
}
}
impl ::std::marker::Copy for AccountType {
}
impl ::std::default::Default for AccountType {
fn default() -> Self {
AccountType::ACCOUNT_TYPE_UNKNOWN
}
}
impl ::protobuf::reflect::ProtobufValue for AccountType {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\rAccount.proto\x12\x19Catalyst.Protocol.Account\x1a\x12Cryptography.p\
roto\x1a\rNetwork.proto\"\xc7\x01\n\x07Address\x12I\n\x0cnetwork_type\
\x18\x01\x20\x01(\x0e2&.Catalyst.Protocol.Network.NetworkTypeR\x0bnetwor\
kType\x12I\n\x0caccount_type\x18\x02\x20\x01(\x0e2&.Catalyst.Protocol.Ac\
count.AccountTypeR\x0baccountType\x12&\n\x0fpublic_key_hash\x18\x03\x20\
\x01(\x0cR\rpublicKeyHash*q\n\x0bAccountType\x12\x18\n\x14ACCOUNT_TYPE_U\
NKNOWN\x10\0\x12\x12\n\x0ePUBLIC_ACCOUNT\x10\x08\x12\x18\n\x14CONFIDENTI\
AL_ACCOUNT\x10\x10\x12\x1a\n\x16SMART_CONTRACT_ACCOUNT\x10\x18B\x02P\x01\
J\xe6\x0c\n\x06\x12\x04\x13\0(\x01\n\xdf\x06\n\x01\x0c\x12\x03\x13\0\x12\
2\xd4\x06*\n\x20Copyright\x20(c)\x202019\x20Catalyst\x20Network\n\n\x20T\
his\x20file\x20is\x20part\x20of\x20Catalyst.Network.Protocol.Protobuffs\
\x20<https://github.com/catalyst-network/protocol-protobuffs>\n\n\x20Cat\
alyst.Network.Protocol.Protobuffs\x20is\x20free\x20software:\x20you\x20c\
an\x20redistribute\x20it\x20and/or\x20modify\n\x20it\x20under\x20the\x20\
terms\x20of\x20the\x20GNU\x20General\x20Public\x20License\x20as\x20publi\
shed\x20by\n\x20the\x20Free\x20Software\x20Foundation,\x20either\x20vers\
ion\x202\x20of\x20the\x20License,\x20or\n\x20(at\x20your\x20option)\x20a\
ny\x20later\x20version.\n\x20\n\x20Catalyst.Network.Protocol.Protobuffs\
\x20is\x20distributed\x20in\x20the\x20hope\x20that\x20it\x20will\x20be\
\x20useful,\n\x20but\x20WITHOUT\x20ANY\x20WARRANTY;\x20without\x20even\
\x20the\x20implied\x20warranty\x20of\n\x20MERCHANTABILITY\x20or\x20FITNE\
SS\x20FOR\x20A\x20PARTICULAR\x20PURPOSE.\x20See\x20the\n\x20GNU\x20Gener\
al\x20Public\x20License\x20for\x20more\x20details.\n\x20\n\x20You\x20sho\
uld\x20have\x20received\x20a\x20copy\x20of\x20the\x20GNU\x20General\x20P\
ublic\x20License\n\x20along\x20with\x20Catalyst.Network.Protocol.Protobu\
ffs\x20If\x20not,\x20see\x20<https://www.gnu.org/licenses/>.\n\n\x08\n\
\x01\x08\x12\x03\x15\0\"\n\t\n\x02\x08\n\x12\x03\x15\0\"\n\t\n\x02\x03\0\
\x12\x03\x17\0\x1c\n\t\n\x02\x03\x01\x12\x03\x18\0\x17\n\x08\n\x01\x02\
\x12\x03\x1a\0\"\n\n\n\x02\x04\0\x12\x04\x1c\0\x20\x01\n\n\n\x03\x04\0\
\x01\x12\x03\x1c\x08\x0f\n.\n\x04\x04\0\x02\0\x12\x03\x1d\x08-\"!\x20bit\
\x20signalling\x20the\x20network\x20type\n\n\x0c\n\x05\x04\0\x02\0\x06\
\x12\x03\x1d\x08\x1b\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x1d\x1c(\n\x0c\
\n\x05\x04\0\x02\0\x03\x12\x03\x1d+,\n1\n\x04\x04\0\x02\x01\x12\x03\x1e\
\x04!\"$\x20bit\x20signalling\x20the\x20type\x20of\x20account\n\n\x0c\n\
\x05\x04\0\x02\x01\x06\x12\x03\x1e\x04\x0f\n\x0c\n\x05\x04\0\x02\x01\x01\
\x12\x03\x1e\x10\x1c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x1e\x1f\x20\n\
*\n\x04\x04\0\x02\x02\x12\x03\x1f\x08\"\"\x1d\x20multihash\x20of\x20the\
\x20public\x20key\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x1f\x08\r\n\
\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x1f\x0e\x1d\n\x0c\n\x05\x04\0\x02\
\x02\x03\x12\x03\x1f\x20!\nl\n\x02\x05\0\x12\x04#\0(\x01\x1a`\x20We\x20n\
eed\x20to\x20leave\x20the\x203\x20first\x20bits\x20for\x20the\x20Network\
Type\x20and\x20can\x20use\x20the\x20rest\x20for\x20the\x20AccountType\n\
\n\n\n\x03\x05\0\x01\x12\x03#\x05\x10\n%\n\x04\x05\0\x02\0\x12\x03$\x04\
\x1d\"\x18\x20Un-known\x20account\x20type.\n\n\x0c\n\x05\x05\0\x02\0\x01\
\x12\x03$\x04\x18\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03$\x1b\x1c\n#\n\x04\
\x05\0\x02\x01\x12\x03%\x04\x17\"\x16\x20Public\x20account\x20type.\n\n\
\x0c\n\x05\x05\0\x02\x01\x01\x12\x03%\x04\x12\n\x0c\n\x05\x05\0\x02\x01\
\x02\x12\x03%\x15\x16\n)\n\x04\x05\0\x02\x02\x12\x03&\x04\x1e\"\x1c\x20C\
onfidential\x20account\x20type.\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03&\
\x04\x18\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03&\x1b\x1d\n?\n\x04\x05\0\
\x02\x03\x12\x03'\x04\x20\"2\x20Smart\x20contract\x20account\x20type\x20\
{TO\x20BE\x20DEPRECATED}.\x20\n\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03'\
\x04\x1a\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03'\x1d\x1fb\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}
|
{
self.account_type = v;
}
|
theme.module.js
|
/**
* @author v.lugovsky
* created on 15.12.2015
*/
|
'ui.bootstrap',
'textAngular',
'angular.morris-chart',
'chart.js',
'angular-chartist',
'blocks.theme.components'
]);
})();
|
(function () {
'use strict';
angular.module('blocks.theme', [
|
setup.py
|
import os
from setuptools import setup, find_packages
def parse_requirements(file):
|
setup(
name='eo-flow',
python_requires='>=3.5',
version='1.1.0',
description='Tensorflow wrapper built for prototyping and deploying earth observation deep models.',
author='Sinergise EO research team',
author_email='[email protected]',
packages=find_packages(),
install_requires=parse_requirements('requirements.txt'),
extras_require={
'DEV': parse_requirements('requirements-dev.txt')
}
)
|
return sorted(set(
line.partition('#')[0].strip()
for line in open(os.path.join(os.path.dirname(__file__), file))
) - set(''))
|
system.py
|
import os
import psutil
COEFFICIENT = 2 ** 20
def get_other_ram() -> int:
"""Ram used by other processes"""
return get_ram_used() - get_process_ram()
def get_total_ram() -> int:
mem = psutil.virtual_memory()
return mem[0] / COEFFICIENT
def get_process_ram() -> int:
process = psutil.Process(os.getpid())
return process.memory_info()[0] / COEFFICIENT
def get_ram_used() -> int:
"""ram used by all processes"""
mem = psutil.virtual_memory()
return mem[4] / COEFFICIENT
def
|
() -> list:
"""get all cpu core usage"""
percentage = psutil.cpu_percent()
return percentage
|
get_cpu
|
Home.js
|
import React, {useContext} from 'react';
import Card from '../UI/Card/Card';
import classes from './Home.module.css';
import Button from "../UI/Button/Button";
import AuthContext from "../../context/auth-context";
const Home = (props) => {
const {onLogout} = useContext(AuthContext);
return (
<Card className={classes.home}>
<h1>Welcome back!</h1>
|
);
};
export default Home;
|
<Button onClick={onLogout}>Logout</Button>
</Card>
|
formatTitle.js
|
export default function formatTitle(column, columnFormat) {
// Get format tag from end of column name (if supplied):
let fmt = columnFormat;
// Remove the format tag from the column name (only if preceded by
// an underscore):
let colname = column.replace("_"+fmt,"");
let suffix = "";
// Add special formatting depending on format of column name:
switch(fmt){
case "pct":
// take name exluding fmt tag (colnam)
colname = colname
break;
case "usd":
colname = colname;
suffix = " ($)";
break;
case "cad":
colname = colname;
suffix = " ($)";
break;
case "eur":
colname = colname;
suffix = " (€)";
break;
case "gbp":
colname = colname;
suffix = " (£)";
break;
case "chf":
colname = colname;
suffix = " (CHF)";
break;
case "str":
colname = colname;
break;
case "date":
// take name including fmt tag (column)
colname = column;
break;
default:
colname = column;
}
// Allow some acronyms to remain fully capitalized in titles:
let acronyms = [
"id"
]
// Set name to proper casing:
function toT
|
r) {
return str.replace(
/\w\S*/g,
function(txt) {
if(!acronyms.includes(txt)){
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
} else {
return txt.toUpperCase();
}
});
}
// Remove all underscores before passing to title case function:
colname = toTitleCase(colname.replace(/_/g, ' '))
colname = colname + suffix;
return colname;
}
|
itleCase(st
|
lib.rs
|
pub use crate::buffer::{SliceBuffer, SliceInfo};
pub use crate::read::StreamReader;
pub use crate::store::StreamStorage;
pub use crate::stream::{DocId, Head, PeerId, SignedHead, Slice, Stream, StreamId};
pub use crate::write::StreamWriter;
pub use bao::Hash;
pub use ed25519_dalek::{Keypair, PublicKey, SecretKey};
mod buffer;
mod read;
mod store;
mod stream;
mod write;
#[cfg(test)]
mod tests {
use super::*;
use anyhow::Result;
use bao::decode::SliceDecoder;
use rand::RngCore;
use std::io::{BufReader, Read, Write};
use tempdir::TempDir;
fn
|
(size: usize) -> Vec<u8> {
let mut rng = rand::thread_rng();
let mut data = Vec::with_capacity(size);
data.resize(data.capacity(), 0);
rng.fill_bytes(&mut data);
data
}
fn keypair(secret: [u8; 32]) -> Keypair {
let secret = SecretKey::from_bytes(&secret).unwrap();
let public = PublicKey::from(&secret);
Keypair { secret, public }
}
#[test]
fn test_append_stream() -> Result<()> {
let tmp = TempDir::new("test_append_stream")?;
let mut storage = StreamStorage::open(tmp.path(), keypair([0; 32]))?;
let data = rand_bytes(1_000_000);
let doc = DocId::unique();
let mut stream = storage.append(doc)?;
stream.write_all(&data)?;
stream.commit()?;
let stream = storage.slice(stream.id(), 0, data.len() as u64)?;
let mut reader = BufReader::new(stream);
let mut data2 = Vec::with_capacity(data.len());
data2.resize(data2.capacity(), 0);
reader.read_exact(&mut data2)?;
assert_eq!(data, data2);
Ok(())
}
#[test]
fn test_extract_slice() -> Result<()> {
let tmp = TempDir::new("test_extract_slice")?;
let mut storage = StreamStorage::open(tmp.path(), keypair([0; 32]))?;
let data = rand_bytes(1027);
let doc = DocId::unique();
let mut stream = storage.append(doc)?;
stream.write_all(&data)?;
stream.commit()?;
let offset = 8;
let len = 32;
let slice = data[offset..(offset + len)].to_vec();
let mut stream = storage.slice(stream.id(), offset as u64, len as u64)?;
let mut slice2 = vec![];
stream.read_to_end(&mut slice2)?;
assert_eq!(slice2, slice);
let mut vslice = Slice::default();
storage.extract(stream.id(), offset as u64, len as u64, &mut vslice)?;
let mut slice2 = vec![];
vslice.head.verify(stream.id())?;
let mut decoder = SliceDecoder::new(
&vslice.data[..],
&Hash::from(vslice.head.head.hash),
offset as u64,
len as u64,
);
decoder.read_to_end(&mut slice2)?;
assert_eq!(slice2, slice);
Ok(())
}
#[test]
fn test_sync() -> Result<()> {
let tmp = TempDir::new("test_sync_1")?;
let mut storage = StreamStorage::open(tmp.path(), keypair([0; 32]))?;
let data = rand_bytes(8192);
let doc = DocId::unique();
let mut stream = storage.append(doc)?;
stream.write_all(&data[..4096])?;
let head1 = stream.commit()?;
stream.write_all(&data[4096..])?;
let head2 = stream.commit()?;
let tmp = TempDir::new("test_sync_2")?;
let mut storage2 = StreamStorage::open(tmp.path(), keypair([1; 32]))?;
let stream = storage2.subscribe(stream.id())?;
let mut stream = SliceBuffer::new(stream, 1024);
let mut slice = Slice::default();
for head in [head1, head2].iter() {
head.verify(stream.id())?;
stream.prepare(head.head().len() - stream.head().head().len);
for i in 0..stream.slices().len() {
let info = &stream.slices()[i];
storage.extract(stream.id(), info.offset, info.len, &mut slice)?;
stream.add_slice(&slice, i)?;
}
stream.commit(*head.sig())?;
}
let mut stream = storage2.slice(stream.id(), 0, 8192)?;
let mut data2 = vec![];
stream.read_to_end(&mut data2)?;
assert_eq!(data, data2);
let tmp = TempDir::new("test_sync_3")?;
let mut storage = StreamStorage::open(tmp.path(), keypair([1; 32]))?;
let stream = storage.subscribe(stream.id())?;
let mut stream = SliceBuffer::new(stream, 1024);
let mut slice = Slice::default();
for head in [head1, head2].iter() {
head.verify(stream.id()).unwrap();
stream.prepare(head.head().len() - stream.head().head().len);
for i in 0..stream.slices().len() {
let info = &stream.slices()[i];
storage2.extract(stream.id(), info.offset, info.len, &mut slice)?;
stream.add_slice(&slice, i)?;
}
stream.commit(*head.sig())?;
}
let mut stream = storage.slice(stream.id(), 0, 8192)?;
let mut data2 = vec![];
stream.read_to_end(&mut data2)?;
assert_eq!(data, data2);
let docs = storage.docs().collect::<Result<Vec<_>>>()?;
assert!(!docs.is_empty());
let streams = storage.streams().collect::<Result<Vec<_>>>()?;
assert!(!streams.is_empty());
let substreams = storage
.substreams(stream.id().doc())
.collect::<Result<Vec<_>>>()?;
assert!(!substreams.is_empty());
Ok(())
}
}
|
rand_bytes
|
lib.rs
|
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use {
anyhow::Result,
ffx_config::sdk::{Sdk, SdkVersion},
ffx_core::ffx_plugin,
ffx_sdk_args::{SdkCommand, SubCommand},
std::io::Write,
};
#[ffx_plugin()]
pub async fn exec_sdk(command: SdkCommand) -> Result<()> {
let writer = Box::new(std::io::stdout());
let sdk = ffx_config::get_sdk().await?;
match &command.sub {
SubCommand::Version(_) => exec_version(sdk, writer).await,
}
}
async fn exec_version<W: Write + Sync>(sdk: Sdk, mut writer: W) -> Result<()> {
match sdk.get_version() {
SdkVersion::Version(v) => writeln!(writer, "{}", v)?,
SdkVersion::InTree => writeln!(writer, "<in tree>")?,
SdkVersion::Unknown => writeln!(writer, "<unknown>")?,
}
Ok(())
}
#[cfg(test)]
mod test {
use super::*;
#[fuchsia_async::run_singlethreaded(test)]
async fn test_version_with_string() {
let mut out = Vec::new();
let sdk = Sdk::get_empty_sdk_with_version(SdkVersion::Version("Test.0".to_owned()));
exec_version(sdk, &mut out).await.unwrap();
let out = String::from_utf8(out).unwrap();
assert_eq!("Test.0\n", out);
}
#[fuchsia_async::run_singlethreaded(test)]
async fn test_version_in_tree() {
let mut out = Vec::new();
let sdk = Sdk::get_empty_sdk_with_version(SdkVersion::InTree);
exec_version(sdk, &mut out).await.unwrap();
let out = String::from_utf8(out).unwrap();
assert_eq!("<in tree>\n", out);
}
#[fuchsia_async::run_singlethreaded(test)]
async fn test_version_unknown()
|
}
|
{
let mut out = Vec::new();
let sdk = Sdk::get_empty_sdk_with_version(SdkVersion::Unknown);
exec_version(sdk, &mut out).await.unwrap();
let out = String::from_utf8(out).unwrap();
assert_eq!("<unknown>\n", out);
}
|
const-vec-of-fns.rs
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
|
// except according to those terms.
// run-pass
// pretty-expanded FIXME #23616
#![allow(non_upper_case_globals)]
/*!
* Try to double-check that static fns have the right size (with or
* without dummy env ptr, as appropriate) by iterating a size-2 array.
* If the static size differs from the runtime size, the second element
* should be read as a null or otherwise wrong pointer and crash.
*/
fn f() { }
static bare_fns: &'static [fn()] = &[f, f];
struct S<F: FnOnce()>(F);
static mut closures: &'static mut [S<fn()>] = &mut [S(f as fn()), S(f as fn())];
pub fn main() {
unsafe {
for &bare_fn in bare_fns { bare_fn() }
for closure in &mut *closures {
let S(ref mut closure) = *closure;
(*closure)()
}
}
}
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
|
events_sub_eventa.rs
|
use super::{identification, producer::Control, protocol, scope::AnonymousScope, Context};
use crate::stat::Alias;
use crate::test::samples;
use clibri::server;
use std::str::FromStr;
use uuid::Uuid;
type BroadcastGroupBGroupCStructA = (Vec<Uuid>, protocol::GroupB::GroupC::StructA);
type BroadcastGroupBGroupCStructB = (Vec<Uuid>, protocol::GroupB::GroupC::StructB);
#[allow(unused_variables)]
pub async fn emit<E: server::Error, C: server::Control<E>>(
event: protocol::Events::Sub::EventA,
scope: &mut AnonymousScope<'_, E, C>,
) -> Result<(BroadcastGroupBGroupCStructA, BroadcastGroupBGroupCStructB), String>
|
{
let uuid = match Uuid::from_str(&event.uuid) {
Ok(uuid) => uuid,
Err(err) => {
return Err(format!("Fail to parse uuid {}: {:?}", event.uuid, err));
}
};
scope.context.inc_stat(uuid, Alias::GroupBGroupCStructA);
scope.context.inc_stat(uuid, Alias::GroupBGroupCStructB);
Ok((
(vec![uuid], samples::group_b::group_c::struct_a::get()),
(vec![uuid], samples::group_b::group_c::struct_b::get()),
))
}
|
|
helpers_test.go
|
package integration_tests
import (
"fmt"
sdk "github.com/ionos-cloud/ionos-enterprise-sdk-go/v5"
"os"
"strings"
"sync"
)
var (
syncDC sync.Once
syncCDC sync.Once
dataCenter *sdk.Datacenter
compositeDataCenter *sdk.Datacenter
server *sdk.Server
volume *sdk.Volume
lan *sdk.Lan
location = "us/las"
image *sdk.Image
fw *sdk.FirewallRule
nic *sdk.Nic
sourceMac = "01:23:45:67:89:00"
portRangeStart = 22
portRangeEnd = 22
onceDC sync.Once
onceServerDC sync.Once
onceServer sync.Once
onceFw sync.Once
onceServerVolume sync.Once
onceCD sync.Once
onceLan sync.Once
onceLanServer sync.Once
onceLanLan sync.Once
onceLB sync.Once
onceLBDC sync.Once
onceLBServer sync.Once
onceLBNic sync.Once
onceNicNic sync.Once
ipBlock *sdk.IPBlock
loadBalancer *sdk.Loadbalancer
snapshot *sdk.Snapshot
snapshotname = "GO SDK TEST"
snapshotdescription = "GO SDK test snapshot"
backupUnit *sdk.BackupUnit
cluster *sdk.KubernetesCluster
share *sdk.Share
)
func boolAddr(v bool) *bool {
return &v
}
// Setup creds for single running tests
func setupTestEnv() sdk.Client {
client := *sdk.NewClient(os.Getenv("IONOS_USERNAME"), os.Getenv("IONOS_PASSWORD"))
if val, ok := os.LookupEnv("IONOS_API_URL"); ok {
client.SetCloudApiURL(val)
}
return client
}
func createDataCenter() {
c := setupTestEnv()
var obj = sdk.Datacenter{
Properties: sdk.DatacenterProperties{
Name: "GO SDK Test",
Description: "GO SDK test datacenter",
Location: location,
},
}
resp, err := c.CreateDatacenter(obj)
if err != nil {
panic(err)
}
err = c.WaitTillProvisioned(resp.Headers.Get("Location"))
if err != nil {
panic(err)
}
dataCenter = resp
}
func createLan() {
c := setupTestEnv()
var obj = sdk.Lan{
Properties: sdk.LanProperties{
Name: "GO SDK Test",
Public: true,
},
}
resp, _ := c.CreateLan(dataCenter.ID, obj)
c.WaitTillProvisioned(resp.Headers.Get("Location"))
lan = resp
}
func createCompositeDataCenter() {
c := setupTestEnv()
var obj = sdk.Datacenter{
Properties: sdk.DatacenterProperties{
Name: "GO SDK Test Composite",
Description: "GO SDK test composite datacenter",
Location: location,
},
Entities: sdk.DatacenterEntities{
Servers: &sdk.Servers{
Items: []sdk.Server{
{
Properties: sdk.ServerProperties{
Name: "GO SDK Test",
RAM: 1024,
Cores: 1,
},
},
},
},
Volumes: &sdk.Volumes{
Items: []sdk.Volume{
{
Properties: sdk.VolumeProperties{
Type: "HDD",
Size: 2,
Name: "GO SDK Test",
Bus: "VIRTIO",
LicenceType: "UNKNOWN",
AvailabilityZone: "ZONE_3",
},
},
},
},
},
}
resp, err := c.CreateDatacenter(obj)
if err != nil {
fmt.Println("error while creating", err)
fmt.Println(resp.Response)
return
}
compositeDataCenter = resp
err = c.WaitTillProvisioned(compositeDataCenter.Headers.Get("Location"))
if err != nil {
fmt.Println("error while waiting", err)
}
}
func createCompositeServerFW() {
c := setupTestEnv()
var req = sdk.Server{
Properties: sdk.ServerProperties{
Name: "GO SDK Test",
RAM: 1024,
Cores: 1,
AvailabilityZone: "ZONE_1",
CPUFamily: "INTEL_XEON",
},
Entities: &sdk.ServerEntities{
Volumes: &sdk.Volumes{
Items: []sdk.Volume{
{
Properties: sdk.VolumeProperties{
Type: "HDD",
Size: 5,
Name: "volume1",
ImageAlias: "ubuntu:latest",
ImagePassword: "JWXuXR9CMghXAc6v",
},
},
},
},
Nics: &sdk.Nics{
Items: []sdk.Nic{
{
Properties: &sdk.NicProperties{
Name: "nic",
Lan: 1,
},
Entities: &sdk.NicEntities{
FirewallRules: &sdk.FirewallRules{
Items: []sdk.FirewallRule{
{
Properties: sdk.FirewallruleProperties{
Name: "SSH",
Protocol: "TCP",
SourceMac: &sourceMac,
PortRangeStart: &portRangeStart,
PortRangeEnd: &portRangeEnd,
},
},
},
},
},
},
},
},
},
}
srv, err := c.CreateServer(dataCenter.ID, req)
if err != nil {
fmt.Println("[createCompositeServerFW] error while creating a server: ", err)
os.Exit(1)
}
server = srv
nic = &srv.Entities.Nics.Items[0]
fw = &nic.Entities.FirewallRules.Items[0]
err = c.WaitTillProvisioned(srv.Headers.Get("Location"))
if err != nil {
fmt.Println("[createCompositeServerFW] server creation timeout timeout: ", err)
os.Exit(1)
}
}
func createNic() {
c := setupTestEnv()
obj := sdk.Nic{
Properties: &sdk.NicProperties{
Name: "GO SDK Test",
Lan: 1,
},
}
resp, _ := c.CreateNic(dataCenter.ID, server.ID, obj)
c.WaitTillProvisioned(resp.Headers.Get("Location"))
nic = resp
}
func createLoadBalancerWithIP() {
c := setupTestEnv()
var obj = sdk.IPBlock{
Properties: sdk.IPBlockProperties{
Name: "GO SDK Test",
Size: 1,
Location: "us/las",
},
}
resp, err := c.ReserveIPBlock(obj)
if err != nil
|
err = c.WaitTillProvisioned(resp.Headers.Get("Location"))
if err != nil {
fmt.Println("error while waiting for IPBlock to be reserved: ", err)
os.Exit(1)
}
ipBlock = resp
var request = sdk.Loadbalancer{
Properties: sdk.LoadbalancerProperties{
Name: "GO SDK Test",
IP: resp.Properties.IPs[0],
Dhcp: true,
},
Entities: sdk.LoadbalancerEntities{
Balancednics: &sdk.BalancedNics{
Items: []sdk.Nic{
{
ID: nic.ID,
},
},
},
},
}
resp1, err := c.CreateLoadbalancer(dataCenter.ID, request)
if err != nil {
fmt.Println("error while creating load balancer: ", err)
fmt.Println(resp1.Response)
os.Exit(1)
}
err = c.WaitTillProvisioned(resp1.Headers.Get("Location"))
if err != nil {
fmt.Println("error while waiting for load balancer to be created: ", err)
os.Exit(1)
}
loadBalancer = resp1
nic = &loadBalancer.Entities.Balancednics.Items[0]
}
func createVolume() {
c := setupTestEnv()
var request = sdk.Volume{
Properties: sdk.VolumeProperties{
Size: 2,
Name: "GO SDK Test",
LicenceType: "OTHER",
Type: "HDD",
},
}
resp, err := c.CreateVolume(dataCenter.ID, request)
if err != nil {
fmt.Println("error while creating volume: ", err)
fmt.Println(resp.Response)
os.Exit(1)
}
volume = resp
c.WaitTillProvisioned(resp.Headers.Get("Location"))
}
func createSnapshot() {
c := setupTestEnv()
resp, err := c.CreateSnapshot(dataCenter.ID, volume.ID, snapshotname, snapshotdescription)
if err != nil {
fmt.Println("error creating snapshot: ", err)
os.Exit(1)
}
snapshot = resp
err = c.WaitTillProvisioned(snapshot.Headers.Get("Location"))
if err != nil {
fmt.Println("time out waiting for snapshot creation: ", err)
os.Exit(1)
}
}
func mknicCustom(client sdk.Client, dcid, serverid string, lanid int, ips []string) string {
var request = sdk.Nic{
Properties: &sdk.NicProperties{
Lan: lanid,
Name: "GO SDK Test",
Nat: boolAddr(false),
FirewallActive: boolAddr(true),
Ips: ips,
},
}
resp, err := client.CreateNic(dcid, serverid, request)
if err != nil {
return ""
}
err = client.WaitTillProvisioned(resp.Headers.Get("Location"))
if err != nil {
return ""
}
return resp.ID
}
func createServer() {
server = setupCreateServer(dataCenter.ID)
if server == nil {
panic("Server not created")
}
}
func setupCreateServer(srvDc string) *sdk.Server {
c := setupTestEnv()
var req = sdk.Server{
Properties: sdk.ServerProperties{
Name: "GO SDK Test",
RAM: 1024,
Cores: 1,
AvailabilityZone: "ZONE_1",
CPUFamily: "INTEL_XEON",
},
}
srv, err := c.CreateServer(srvDc, req)
if err != nil {
return nil
}
err = c.WaitTillProvisioned(srv.Headers.Get("Location"))
if err != nil {
return nil
}
return srv
}
func setupVolume() {
c := setupTestEnv()
vol := sdk.Volume{
Properties: sdk.VolumeProperties{
Type: "HDD",
Size: 2,
Name: "GO SDK Test",
Bus: "VIRTIO",
LicenceType: "UNKNOWN",
},
}
resp, err := c.CreateVolume(dataCenter.ID, vol)
if err != nil {
fmt.Println("create volume failed")
}
volume = resp
err = c.WaitTillProvisioned(resp.Headers.Get("Location"))
if err != nil {
fmt.Println("failed while waiting on volume to finish")
}
}
func setupVolumeAttached() {
c := setupTestEnv()
vol := sdk.Volume{
Properties: sdk.VolumeProperties{
Type: "HDD",
Size: 2,
Name: "GO SDK Test",
Bus: "VIRTIO",
LicenceType: "UNKNOWN",
},
}
resp, err := c.CreateVolume(dataCenter.ID, vol)
if err != nil {
fmt.Println("create volume failed")
}
err = c.WaitTillProvisioned(resp.Headers.Get("Location"))
if err != nil {
fmt.Println("failed while waiting on volume to finish")
}
volume = resp
volume, err = c.AttachVolume(dataCenter.ID, server.ID, volume.ID)
if err != nil {
fmt.Println("attach volume failed", err)
}
err = c.WaitTillProvisioned(volume.Headers.Get("Location"))
if err != nil {
fmt.Println("failed while waiting on volume to finish")
}
}
func setupCDAttached() {
c := setupTestEnv()
var imageID string
images, err := c.ListImages()
for _, img := range images.Items {
if img.Properties.ImageType == "CDROM" && img.Properties.Location == "us/las" && img.Properties.Public == true {
imageID = img.ID
break
}
}
resp, err := c.AttachCdrom(dataCenter.ID, server.ID, imageID)
if err != nil {
fmt.Println("attach CD failed", err)
}
image = resp
err = c.WaitTillProvisioned(resp.Headers.Get("Location"))
if err != nil {
fmt.Println("failed while waiting on volume to finish")
}
}
func reserveIP() {
c := setupTestEnv()
var obj = sdk.IPBlock{
Properties: sdk.IPBlockProperties{
Name: "GO SDK Test",
Size: 1,
Location: location,
},
}
resp, _ := c.ReserveIPBlock(obj)
ipBlock = resp
}
func getImageID(location string, imageName string, imageType string) string {
if imageName == "" {
return ""
}
c := setupTestEnv()
images, err := c.ListImages()
if err != nil {
return ""
}
if len(images.Items) > 0 {
for _, i := range images.Items {
imgName := ""
if i.Properties.Name != "" {
imgName = i.Properties.Name
}
if imageType == "SSD" {
imageType = "HDD"
}
if imgName != "" && strings.Contains(strings.ToLower(imgName), strings.ToLower(imageName)) && i.Properties.ImageType == imageType && i.Properties.Location == location && i.Properties.Public == true {
return i.ID
}
}
}
return ""
}
|
{
fmt.Println("Error while reserving an IP block", err)
fmt.Println(resp.Response)
os.Exit(1)
}
|
expand-support.d.ts
|
import Operator from '../Operator';
import Observable from '../Observable';
import Subscriber from '../Subscriber';
import Subscription from '../Subscription';
import OuterSubscriber from '../OuterSubscriber';
export declare class ExpandOperator<T, R> implements Operator<T, R> {
private project;
|
}
export declare class ExpandSubscriber<T, R> extends OuterSubscriber<T, R> {
private project;
private concurrent;
private index;
private active;
private hasCompleted;
private buffer;
constructor(destination: Subscriber<R>, project: (value: T, index: number) => Observable<R>, concurrent?: number);
_next(value: any): void;
_complete(): void;
notifyComplete(innerSub: Subscription<T>): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number): void;
}
|
private concurrent;
constructor(project: (value: T, index: number) => Observable<any>, concurrent?: number);
call(subscriber: Subscriber<R>): Subscriber<T>;
|
rom.rs
|
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Entry"]
pub entry: ENTRY,
#[doc = "0x04 - End of Table Marker Register"]
pub tablemark: TABLEMARK,
_reserved2: [u8; 4036usize],
|
pub periphid4: PERIPHID,
#[doc = "0xfd4 - Peripheral ID Register"]
pub periphid5: PERIPHID,
#[doc = "0xfd8 - Peripheral ID Register"]
pub periphid6: PERIPHID,
#[doc = "0xfdc - Peripheral ID Register"]
pub periphid7: PERIPHID,
#[doc = "0xfe0 - Peripheral ID Register"]
pub periphid0: PERIPHID,
#[doc = "0xfe4 - Peripheral ID Register"]
pub periphid1: PERIPHID,
#[doc = "0xfe8 - Peripheral ID Register"]
pub periphid2: PERIPHID,
#[doc = "0xfec - Peripheral ID Register"]
pub periphid3: PERIPHID,
#[doc = "0xff0 - Component ID Register"]
pub compid: [COMPID; 4],
}
#[doc = "Entry\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [entry](entry) module"]
pub type ENTRY = crate::Reg<u32, _ENTRY>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _ENTRY;
#[doc = "`read()` method returns [entry::R](entry::R) reader structure"]
impl crate::Readable for ENTRY {}
#[doc = "Entry"]
pub mod entry;
#[doc = "End of Table Marker Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tablemark](tablemark) module"]
pub type TABLEMARK = crate::Reg<u32, _TABLEMARK>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _TABLEMARK;
#[doc = "`read()` method returns [tablemark::R](tablemark::R) reader structure"]
impl crate::Readable for TABLEMARK {}
#[doc = "End of Table Marker Register"]
pub mod tablemark;
#[doc = "System Access Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sysaccess](sysaccess) module"]
pub type SYSACCESS = crate::Reg<u32, _SYSACCESS>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _SYSACCESS;
#[doc = "`read()` method returns [sysaccess::R](sysaccess::R) reader structure"]
impl crate::Readable for SYSACCESS {}
#[doc = "System Access Register"]
pub mod sysaccess;
#[doc = "Peripheral ID Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [periphid](periphid) module"]
pub type PERIPHID = crate::Reg<u32, _PERIPHID>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _PERIPHID;
#[doc = "`read()` method returns [periphid::R](periphid::R) reader structure"]
impl crate::Readable for PERIPHID {}
#[doc = "Peripheral ID Register"]
pub mod periphid;
#[doc = "Component ID Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [compid](compid) module"]
pub type COMPID = crate::Reg<u32, _COMPID>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _COMPID;
#[doc = "`read()` method returns [compid::R](compid::R) reader structure"]
impl crate::Readable for COMPID {}
#[doc = "Component ID Register"]
pub mod compid;
|
#[doc = "0xfcc - System Access Register"]
pub sysaccess: SYSACCESS,
#[doc = "0xfd0 - Peripheral ID Register"]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.