text:
ALTER TABLE "PollMessage"
    ADD COLUMN IF NOT EXISTS "transfer_response_host_id" text;


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Token.Type</title>
<meta name="date" content="2015-11-09">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Enum Constants |

Field |

Method

Detail:

Enum Constants |

Field |

Method

sg.edu.cs2103aug2015_w13_2j.parser

Enum Token.Type

java.lang.Object

java.lang.Enum<Token.Type>

sg.edu.cs2103aug2015_w13_2j.parser.Token.Type

All Implemented Interfaces:

java.io.Serializable, java.lang.Comparable<Token.Type>

Enclosing class:

Token

public static enum Token.Type
extends java.lang.Enum<Token.Type>

Enum Constant Summary

Enum Constants

Enum Constant and Description

ALPHA_NUM

DATE

DATE_INVALID

EMPTY

FLAG

FLAG_INVALID

ID

ID_INVALID

NAME

RESERVED

WHITESPACE

Method Summary

All Methods Static Methods Concrete Methods

Modifier and Type
Method and Description

static Token.Type
valueOf(java.lang.String name)

Returns the enum constant of this type with the specified name.

static Token.Type[]
values()

Returns an array containing the constants of this enum type, in
the order they are declared.

Methods inherited from class java.lang.Enum

compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

EMPTY

public static final Token.Type EMPTY

RESERVED

public static final Token.Type RESERVED

DATE

public static final Token.Type DATE

DATE_INVALID

public static final Token.Type DATE_INVALID

FLAG

public static final Token.Type FLAG

FLAG_INVALID

public static final Token.Type FLAG_INVALID

ID

public static final Token.Type ID

ID_INVALID

public static final Token.Type ID_INVALID

NAME

public static final Token.Type NAME

WHITESPACE

public static final Token.Type WHITESPACE

ALPHA_NUM

public static final Token.Type ALPHA_NUM

Method Detail

values

public static Token.Type[] values()

Returns an array containing the constants of this enum type, in
the order they are declared.  This method may be used to iterate
over the constants as follows:

for (Token.Type c : Token.Type.values())
    System.out.println(c);

Returns:

an array containing the constants of this enum type, in the order they are declared

valueOf

public static Token.Type valueOf(java.lang.String name)

Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type.  (Extraneous whitespace characters are
not permitted.)

Parameters:

name - the name of the enum constant to be returned.

Returns:

the enum constant with the specified name

Throws:

java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

java.lang.NullPointerException - if the argument is null

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Enum Constants |

Field |

Method

Detail:

Enum Constants |

Field |

Method

redpajama_set_name: RedPajamaGithub


text:
<link rel="import" href="/bower_components/user-surveys/user-surveys.html">
<link rel="import" href="/bower_components/user-cards/user-cards.html">
<link rel="import" href="/bower_components/user-white-list/user-white-list.html">
<link rel="import" href="/bower_components/user-badges/user-badges.html">

<dom-module id="user-page">
  <template>

{{name}}

Here is all your account information. In order to access this you to have installed a little program called an extension. This shows the providers of your computer and customer support that it's working plus how things are progressing. To install this piece of software please click the button below.

      <template is="dom-if" if="{{installed}}">
        Thank you for installing the
      </template>
      <paper-button raised on-tap="install">Hi9 Extension</paper-button>

Survey Questions

        <user-surveys answer folder="[[user.uid]]" location="https://hi9site.firebaseio.com/users/"></user-surveys>

Your Badges

        <user-badges location="https://hi9site.firebaseio.com/users/" folder="[[user.uid]]"></user-badges>

    <content></content>

    <hi9-login admin="{{admin}}" role="{{role}}" user="{{user}}" data="{{userData}}" style="float: right; clear: left;"></hi9-login>

  </template>
</dom-module>


text: export var path = true;


text:
Ti.include("geoFunctions.js");
Ti.include("mapFunctions.js");

//-----------------------------------------------------------
// Switch för att visa hotspots/sevärdheter på kartan
//-----------------------------------------------------------
$.hotspotSwitch.addEventListener('change', function(e) {
	if ($.hotspotSwitch.value == true) {
		displayAllMarkers(map);
	} else {
		removeAnnoHotspot(map);
	}
});

//-----------------------------------------------------------
// Switch för att visa och släcka användarens position på kartan
//-----------------------------------------------------------
$.posSwitch.addEventListener('change', function(e) {
	if ($.posSwitch.value == true) {
		getPosition(map);
	} else {
		map.userLocation = false;
	}
});

//-----------------------------------------------------------
// Funktioner för att tända och släcka infopunkter på kartan
//-----------------------------------------------------------
function showFarglage() {
	try {
		if (farjelage == false) {
			map.addAnnotations(displayInfoSpots('farjelage'));

			$.btnShowFarjelage.backgroundImage = '/images/farjelage.png';
			farjelage = true;
		} else {
			removeAnnoSpot('info', 'farjelage');
			$.btnShowFarjelage.backgroundImage = '/images/grayfarjelage.png';
			farjelage = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showTaltplats() {
	try {
		if (taltplats == false) {
			map.addAnnotations(displayInfoSpots("taltplats"));
			$.btnShowTaltplats.backgroundImage = '/images/taltplats.png';
			taltplats = true;
		} else {
			removeAnnoSpot('info', 'taltplats');
			$.btnShowTaltplats.backgroundImage = '/images/graytaltplats.png';
			taltplats = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showEldplats() {
	try {
		if (eldplats == false) {
			map.addAnnotations(displayInfoSpots("eldplats"));
			$.btnShowEldplats.backgroundImage = '/images/eldplats.png';
			eldplats = true;
		} else {
			removeAnnoSpot('info', 'eldplats');
			$.btnShowEldplats.backgroundImage = '/images/grayeldplats.png';
			eldplats = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showSnorkelled() {
	try {
		if (snorkel == false) {
			map.addAnnotations(displayInfoSpots("snorkelled"));
			$.btnShowSnorkelled.backgroundImage = '/images/snorkelled.png';
			snorkel = true;
		} else {
			removeAnnoSpot('info', 'snorkelled');
			$.btnShowSnorkelled.backgroundImage = '/images/graysnorkelled.png';
			snorkel = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showInformation() {
	try {
		if (information == false) {
			map.addAnnotations(displayInfoSpots("information"));
			$.btnShowInformation.backgroundImage = '/images/information.png';
			information = true;
		} else {
			removeAnnoSpot('info', 'information');
			$.btnShowInformation.backgroundImage = '/images/grayinformation.png';
			information = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showBadplats() {
	try {
		if (badplats == false) {
			map.addAnnotations(displayInfoSpots("badplats"));
			$.btnShowBadplats.backgroundImage = '/images/badplats.png';
			badplats = true;
		} else {
			removeAnnoSpot('info', 'badplats');
			$.btnShowBadplats.backgroundImage = '/images/graybadplats.png';
			badplats = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showRastplats() {
	try {
		if (rastplats == false) {
			map.addAnnotations(displayInfoSpots("rastplats"));
			$.btnShowRastplats.backgroundImage = '/images/rastplats.png';
			rastplats = true;
		} else {
			removeAnnoSpot('info', 'rastplats');
			$.btnShowRastplats.backgroundImage = '/images/grayrastplats.png';
			rastplats = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showUtkiksplats() {
	try {
		if (utsiktsplats == false) {
			map.addAnnotations(displayInfoSpots("utsiktsplats"));
			$.btnShowUtsiktsplats.backgroundImage = '/images/utsiktsplats.png';
			utsiktsplats = true;
		} else {
			removeAnnoSpot('info', 'utsiktsplats');
			$.btnShowUtsiktsplats.backgroundImage = '/images/grayutsiktsplats.png';
			utsiktsplats = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}

function showTorrdass() {
	try {
		if (torrdass == false) {
			map.addAnnotations(displayInfoSpots("torrdass"));
			$.btnShowTorrdass.backgroundImage = '/images/torrdass.png';
			torrdass = true;
		} else {
			removeAnnoSpot('info', 'torrdass');
			$.btnShowTorrdass.backgroundImage = '/images/graytorrdass.png';
			torrdass = false;
		}
	} catch(e) {
		newError("Något gick fel när sidan skulle laddas, prova igen!", "Kartmenyn");
	}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/checkedTextViewList"
    style="@style/Widget.SeriesGuide.TextView.SingleLine"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple"
    android:ellipsize="end"
    android:foreground="?attr/selectableItemBackground"
    android:gravity="center_vertical"
    android:minHeight="48dp"
    android:paddingLeft="@dimen/larger_padding"
    android:paddingTop="@dimen/default_padding"
    android:paddingRight="@dimen/larger_padding"
    android:paddingBottom="@dimen/default_padding"
    android:textAppearance="@style/TextAppearance.SeriesGuide.Subtitle1"
    tools:text="Example List" />


text:
from django import forms
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, PasswordResetForm, UserChangeForm, PasswordChangeForm
from django.forms import ModelForm
from webshop.models import Address

"""
Address form.

Author(s): Markku Laine
"""
class AddressForm( ModelForm ):
    class Meta:
        model                   = Address
        exclude                 = ( "user" )

    def __init__( self, *args, **kwargs ):
        super( AddressForm, self ).__init__( *args, **kwargs )
        # Override default error messages
        self.fields[ "streetAddressLine1" ].error_messages = { "required": "%s is required." % self.fields[ "streetAddressLine1" ].label, "max_length" : "%s is too long, maximum length is %d." % ( self.fields[ "streetAddressLine1" ].label,self.fields[ "streetAddressLine1" ].max_length ) }
        self.fields[ "streetAddressLine2" ].error_messages = { "max_length" : "%s is too long, maximum length is %d." % ( self.fields[ "streetAddressLine2" ].label,self.fields[ "streetAddressLine2" ].max_length ) }
        self.fields[ "zipCode" ].error_messages = { "required": "%s is required." % self.fields[ "zipCode" ].label, "max_length" : "%s is too long, maximum length is %d." % ( self.fields[ "zipCode" ].label,self.fields[ "zipCode" ].max_length ) }
        self.fields[ "city" ].error_messages = { "required": "%s is required." % self.fields[ "city" ].label, "max_length" : "%s is too long, maximum length is %d." % ( self.fields[ "city" ].label,self.fields[ "city" ].max_length ) }
        self.fields[ "state" ].error_messages = { "max_length" : "%s is too long, maximum length is %d." % ( self.fields[ "state" ].label,self.fields[ "state" ].max_length ) }
        self.fields[ "country" ].error_messages = { "required": "%s is required." % self.fields[ "country" ].label, "max_length" : "%s is too long, maximum length is %d." % ( self.fields[ "country" ].label,self.fields[ "country" ].max_length ) }
        self.fields[ "country" ].widget.attrs[ "readonly" ]  = True

"""
Authentication (login) form.

Author(s): Markku Laine
"""
class MyAuthenticationForm( AuthenticationForm ):
    username_label              = "Username"
    username_max_length         = 30
    password_label              = "Password"
    password_max_length         = 128
    username                    = forms.CharField( label="%s" % username_label, max_length="%d" % username_max_length, error_messages={ "required" : "%s is required." % username_label, "max_length" : "%s is too long, maximum length is %d." % ( username_label, username_max_length ) } )
    password                    = forms.CharField( label="%s" % password_label, max_length="%d" % password_max_length, widget=forms.PasswordInput, error_messages={ "required" : "%s is required." % password_label, "max_length" : "%s is too long, maximum length is %d." % ( password_label, password_max_length ) })

"""
Password reset (forgot your password?) form.

Author(s): Markku Laine
"""
class MyPasswordResetForm( PasswordResetForm ):
    email_label                 = "E-mail address"
    email_max_length            = 128
    email                       = forms.EmailField( label="%s" % email_label, max_length="%d" % email_max_length, error_messages={ "required" : "%s is required." % email_label, "max_length" : "%s is too long, maximum length is %d." % ( email_label, email_max_length ) } )

"""
Password change (change password) form.

Author(s): Markku Laine
"""
class MyPasswordChangeForm( PasswordChangeForm ):
    old_password_label          = "Old password"
    old_password_max_length     = 128
    new_password1_label         = "New password"
    new_password1_max_length    = 128
    new_password2_label         = "Confirm new password"
    new_password2_max_length    = 128
    old_password                = forms.CharField( label="%s" % old_password_label, max_length="%d" % old_password_max_length, widget=forms.PasswordInput, error_messages={ "required" : "%s is required." % old_password_label, "max_length" : "%s is too long, maximum length is %d." % ( old_password_label, old_password_max_length ) })
    new_password1               = forms.CharField( label="%s" % new_password1_label, max_length="%d" % new_password1_max_length, widget=forms.PasswordInput, error_messages={ "required" : "%s is required." % new_password1_label, "max_length" : "%s is too long, maximum length is %d." % ( new_password1_label, new_password1_max_length ) })
    new_password2               = forms.CharField( label="%s" % new_password2_label, max_length="%d" % new_password2_max_length, widget=forms.PasswordInput, error_messages={ "required" : "%s is required." % new_password2_label, "max_length" : "%s is too long, maximum length is %d." % ( new_password2_label, new_password2_max_length ) })

"""
User creation (register) form.

Author(s): Markku Laine
"""
class MyUserCreationForm( UserCreationForm ):
    first_name_label            = "First name"
    first_name_max_length       = 30
    last_name_label             = "Last name"
    last_name_max_length        = 30
    username_label              = "Username"
    username_max_length         = 30
    password1_label             = "Password"
    password1_max_length        = 128
    password2_label             = "Confirm password"
    password2_max_length        = 128
    email_label                 = "E-mail address"
    email_max_length            = 128
    first_name                  = forms.CharField( label="%s" % first_name_label, max_length="%d" % first_name_max_length, error_messages={ "required" : "%s is required." % first_name_label, "max_length" : "%s is too long, maximum length is %d." % ( first_name_label, first_name_max_length ) } )
    last_name                   = forms.CharField( label="%s" % last_name_label, max_length="%d" % last_name_max_length, error_messages={ "required" : "%s is required." % last_name_label, "max_length" : "%s is too long, maximum length is %d." % ( last_name_label, last_name_max_length ) } )
    username                    = forms.RegexField( label="%s" % username_label, max_length="%d" % username_max_length, regex=r"^[\w.@+-]+$", error_messages={ "required" : "%s is required." % username_label, "max_length" : "%s is too long, maximum length is %d." % ( username_label, username_max_length ), "invalid": "%s may contain only letters, numbers and @/./+/-/_ characters." % username_label } )
    password1                   = forms.CharField( label="%s" % password1_label, max_length="%d" % password1_max_length, widget=forms.PasswordInput, error_messages={ "required" : "%s is required." % password1_label, "max_length" : "%s is too long, maximum length is %d." % ( password1_label, password1_max_length ) })
    password2                   = forms.CharField( label="%s" % password2_label, max_length="%d" % password2_max_length, widget=forms.PasswordInput, error_messages={ "required" : "%s is required." % password2_label, "max_length" : "%s is too long, maximum length is %d." % ( password2_label, password2_max_length ) })
    email                       = forms.EmailField( label="%s" % email_label, max_length="%d" % email_max_length, error_messages={ "required" : "%s is required." % email_label, "max_length" : "%s is too long, maximum length is %d." % ( email_label, email_max_length ) } )

    class Meta( UserCreationForm.Meta ):
        fields                  = ( "first_name", "last_name", "username", "password1", "password2", "email" )

"""
User change (account details) form.

Author(s): Markku Laine
"""
class MyUserChangeForm( UserChangeForm ):
    first_name_label            = "First name"
    first_name_max_length       = 30
    last_name_label             = "Last name"
    last_name_max_length        = 30
    email_label                 = "E-mail address"
    email_max_length            = 128
    first_name                  = forms.CharField( label="%s" % first_name_label, max_length="%d" % first_name_max_length, error_messages={ "required" : "%s is required." % first_name_label, "max_length" : "%s is too long, maximum length is %d." % ( first_name_label, first_name_max_length ) } )
    last_name                   = forms.CharField( label="%s" % last_name_label, max_length="%d" % last_name_max_length, error_messages={ "required" : "%s is required." % last_name_label, "max_length" : "%s is too long, maximum length is %d." % ( last_name_label, last_name_max_length ) } )
    email                       = forms.EmailField( label="%s" % email_label, max_length="%d" % email_max_length, error_messages={ "required" : "%s is required." % email_label, "max_length" : "%s is too long, maximum length is %d." % ( email_label, email_max_length ) } )

    class Meta( UserChangeForm.Meta ):
        fields  = ( "username", "first_name", "last_name", "email" )

    def __init__( self, *args, **kwargs ):
        super( MyUserChangeForm, self ).__init__( *args, **kwargs )
        self.fields[ "username" ].widget.attrs[ "readonly" ]  = True
        #del self.fields[ "username" ] # This is a declared field we really want to be removed from the form to be rendered


text:
package org.itsnat.droid.impl.xmlinflater.drawable.classtree;

import org.itsnat.droid.impl.dom.drawable.DOMElemDrawable;
import org.itsnat.droid.impl.xmlinflated.drawable.ElementDrawableChild;
import org.itsnat.droid.impl.xmlinflated.drawable.ElementDrawableChildBase;
import org.itsnat.droid.impl.xmlinflated.drawable.TransitionDrawableChildItem;
import org.itsnat.droid.impl.xmlinflater.drawable.AttrDrawableContext;
import org.itsnat.droid.impl.xmlinflater.drawable.ClassDescDrawableMgr;

/**
 * Created by jmarranz on 10/11/14.
 */
public class ClassDescTransitionDrawableChildItem extends ClassDescElementDrawableChildWithDrawable<TransitionDrawableChildItem>
{
    public ClassDescTransitionDrawableChildItem(ClassDescDrawableMgr classMgr, ClassDescElementDrawableChildBased<? super TransitionDrawableChildItem>  parentClass)
    {
        super(classMgr,"transition:item",parentClass);
    }

    @Override
    public Class<TransitionDrawableChildItem> getDrawableOrElementDrawableClass()
    {
        return TransitionDrawableChildItem.class;
    }

    @Override
    public ElementDrawableChild createElementDrawableChild(DOMElemDrawable domElement, DOMElemDrawable domElementParent, ElementDrawableChildBase parentChildDrawable, AttrDrawableContext attrCtx)
    {
        return new TransitionDrawableChildItem(parentChildDrawable);
    }

    protected void init()
    {
        super.init();

        // Se definen en la clase base item de LayerDrawable
    }

}


text:
@import KZAsserts;
#import "UIViewController+PerformSegueMapping.h"
#import "TWCommonMacros.h"

@implementation UIViewController (PerformSegueMapping)

- (void)performSelectorForSegue:(UIStoryboardSegue *)segue usingMapping:(NSDictionary *)mapping
{
  AssertTrueOrReturn(segue);
  AssertTrueOrReturn(mapping.count);

  NSString *methodString = mapping[segue.identifier];
  AssertTrueOrReturn(methodString.length > 0);

  SuppressPerformSelectorLeakWarning(
    [self performSelector:NSSelectorFromString(methodString) withObject:segue.destinationViewController];
  );
}

@end


text:
package org.apache.bval.jsr.metadata;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.AnnotatedParameterizedType;
import java.lang.reflect.AnnotatedType;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.Executable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.validation.ConstraintDeclarationException;
import javax.validation.ConstraintTarget;
import javax.validation.Payload;
import javax.validation.ValidationException;
import javax.validation.groups.Default;
import javax.xml.bind.JAXBElement;

import org.apache.bval.jsr.ApacheValidatorFactory;
import org.apache.bval.jsr.ConstraintAnnotationAttributes;
import org.apache.bval.jsr.groups.GroupConversion;
import org.apache.bval.jsr.util.AnnotationProxyBuilder;
import org.apache.bval.jsr.util.ToUnmodifiable;
import org.apache.bval.jsr.xml.AnnotationType;
import org.apache.bval.jsr.xml.BeanType;
import org.apache.bval.jsr.xml.ClassType;
import org.apache.bval.jsr.xml.ConstraintMappingsType;
import org.apache.bval.jsr.xml.ConstraintType;
import org.apache.bval.jsr.xml.ConstructorType;
import org.apache.bval.jsr.xml.ContainerElementTypeType;
import org.apache.bval.jsr.xml.CrossParameterType;
import org.apache.bval.jsr.xml.ElementType;
import org.apache.bval.jsr.xml.FieldType;
import org.apache.bval.jsr.xml.GetterType;
import org.apache.bval.jsr.xml.GroupConversionType;
import org.apache.bval.jsr.xml.GroupSequenceType;
import org.apache.bval.jsr.xml.GroupsType;
import org.apache.bval.jsr.xml.MappingValidator;
import org.apache.bval.jsr.xml.MethodType;
import org.apache.bval.jsr.xml.ParameterType;
import org.apache.bval.jsr.xml.PayloadType;
import org.apache.bval.jsr.xml.ReturnValueType;
import org.apache.bval.util.Exceptions;
import org.apache.bval.util.Lazy;
import org.apache.bval.util.ObjectUtils;
import org.apache.bval.util.StringUtils;
import org.apache.bval.util.Validate;
import org.apache.bval.util.reflection.Reflection;
import org.apache.commons.weaver.privilizer.Privilizing;
import org.apache.commons.weaver.privilizer.Privilizing.CallTo;

@Privilizing(@CallTo(Reflection.class))
public class XmlBuilder {
    //@formatter:off
    public enum Version {
        v10("1.0"), v11("1.1"), v20("2.0");
        //@formatter:on

        static Version of(ConstraintMappingsType constraintMappings) {
            Validate.notNull(constraintMappings);
            String version = constraintMappings.getVersion();
            if (StringUtils.isBlank(version)) {
                return v10;
            }
            version = version.trim();
            for (Version candidate : values()) {
                if (candidate.id.equals(version)) {
                    return candidate;
                }
            }
            throw new ValidationException("Unknown schema version: " + version);
        }

        private final String id;

        private Version(String number) {
            this.id = number;
        }

        public String getId() {
            return id;
        }
    }

    private class ForBean<T> implements MetadataBuilder.ForBean<T> {

        private final BeanType descriptor;

        ForBean(BeanType descriptor) {
            super();
            this.descriptor = Validate.notNull(descriptor, "descriptor");
        }

        Class<?> getBeanClass() {
            return resolveClass(descriptor.getClazz());
        }

        @Override
        public MetadataBuilder.ForClass<T> getClass(Meta<Class<T>> meta) {
            final ClassType classType = descriptor.getClassType();
            return classType == null ? EmptyBuilder.instance().<T> forBean().getClass(meta)
                : new XmlBuilder.ForClass<T>(classType);
        }

        @Override
        public Map<String, MetadataBuilder.ForContainer<Field>> getFields(Meta<Class<T>> meta) {
            return descriptor.getField().stream()
                .collect(ToUnmodifiable.map(FieldType::getName, XmlBuilder.ForField::new));
        }

        @Override
        public Map<String, MetadataBuilder.ForContainer<Method>> getGetters(Meta<Class<T>> meta) {
            return descriptor.getGetter().stream()
                .collect(ToUnmodifiable.map(GetterType::getName, XmlBuilder.ForGetter::new));
        }

        @Override
        public Map<Signature, MetadataBuilder.ForExecutable<Constructor<? extends T>>> getConstructors(Meta<Class<T>> meta) {
            if (!atLeast(Version.v11)) {
                return Collections.emptyMap();
            }
            final Function<ConstructorType, Class<?>[]> params = ct -> ct.getParameter().stream()
                .map(ParameterType::getType).map(XmlBuilder.this::resolveClass).toArray(Class[]::new);

            final Function<ConstructorType, Signature> signature =
                ct -> new Signature(meta.getHost().getName(), params.apply(ct));

            return descriptor.getConstructor().stream()
                .collect(Collectors.toMap(signature, XmlBuilder.ForConstructor::new));
        }

        @Override
        public Map<Signature, MetadataBuilder.ForExecutable<Method>> getMethods(Meta<Class<T>> meta) {
            if (!atLeast(Version.v11)) {
                return Collections.emptyMap();
            }
            final Function<MethodType, Class<?>[]> params = mt -> mt.getParameter().stream().map(ParameterType::getType)
                .map(XmlBuilder.this::resolveClass).toArray(Class[]::new);

            final Function<MethodType, Signature> signature = mt -> new Signature(mt.getName(), params.apply(mt));

            return descriptor.getMethod().stream().collect(Collectors.toMap(signature, XmlBuilder.ForMethod::new));
        }

        @Override
        public final AnnotationBehavior getAnnotationBehavior() {
            return descriptor.getIgnoreAnnotations() ? AnnotationBehavior.EXCLUDE : AnnotationBehavior.INCLUDE;
        }
    }

    private class NonRootLevel<SELF extends NonRootLevel<SELF, D>, D> implements HasAnnotationBehavior {
        protected final D descriptor;
        private Lazy<Boolean> getIgnoreAnnotations;

        public NonRootLevel(D descriptor) {
            super();
            this.descriptor = Validate.notNull(descriptor, "descriptor");
        }

        @Override
        public final AnnotationBehavior getAnnotationBehavior() {
            return Optional.ofNullable(getIgnoreAnnotations).map(Lazy::get)
                .map(b -> b.booleanValue() ? AnnotationBehavior.EXCLUDE : AnnotationBehavior.INCLUDE)
                .orElse(AnnotationBehavior.ABSTAIN);
        }

        @SuppressWarnings("unchecked")
        final SELF withGetIgnoreAnnotations(Function<D, Boolean> getIgnoreAnnotations) {
            Validate.notNull(getIgnoreAnnotations);
            this.getIgnoreAnnotations = new Lazy<>(() -> getIgnoreAnnotations.apply(descriptor));
            return (SELF) this;
        }
    }

    private class ForElement<SELF extends XmlBuilder.ForElement<SELF, E, D>, E extends AnnotatedElement, D>
        extends NonRootLevel<SELF, D> implements MetadataBuilder.ForElement<E> {

        private Lazy<Annotation[]> getDeclaredConstraints;

        ForElement(D descriptor) {
            super(descriptor);
        }

        @Override
        public final Annotation[] getDeclaredConstraints(Meta<E> meta) {
            return lazy(getDeclaredConstraints, "getDeclaredConstraints");
        }

        final SELF withGetConstraintTypes(Function<D, List<ConstraintType>> getConstraintTypes) {
            return withGetDeclaredConstraints(getConstraintTypes
                .andThen(l -> l.stream().map(XmlBuilder.this::createConstraint).toArray(Annotation[]::new)));
        }

        @SuppressWarnings("unchecked")
        final SELF withGetDeclaredConstraints(Function<D, Annotation[]> getDeclaredConstraints) {
            this.getDeclaredConstraints = new Lazy<>(() -> getDeclaredConstraints.apply(descriptor));
            return (SELF) this;
        }
    }

    private class ForClass<T> extends ForElement<ForClass<T>, Class<T>, ClassType> implements MetadataBuilder.ForClass<T> {

        ForClass(ClassType descriptor) {
            super(descriptor);
            this.withGetConstraintTypes(ClassType::getConstraint)
                .withGetIgnoreAnnotations(ClassType::getIgnoreAnnotations);
        }

        @Override
        public List<Class<?>> getGroupSequence(Meta<Class<T>> meta) {
            final GroupSequenceType groupSequence = descriptor.getGroupSequence();
            return groupSequence == null ? null
                : groupSequence.getValue().stream().map(XmlBuilder.this::resolveClass).collect(ToUnmodifiable.list());
        }
    }

    private class ForContainer<SELF extends XmlBuilder.ForContainer<SELF, E, D>, E extends AnnotatedElement, D>
        extends XmlBuilder.ForElement<SELF, E, D> implements MetadataBuilder.ForContainer<E> {

        private Lazy<Boolean> isCascade;
        private Lazy<Set<GroupConversion>> getGroupConversions;
        private Lazy<List<ContainerElementTypeType>> getContainerElementTypes;

        ForContainer(D descriptor) {
            super(descriptor);
        }

        @Override
        public boolean isCascade(Meta<E> meta) {
            return Boolean.TRUE.equals(lazy(isCascade, "isCascade"));
        }

        @Override
        public Set<GroupConversion> getGroupConversions(Meta<E> meta) {
            return lazy(getGroupConversions, "getGroupConversions");
        }

        @Override
        public Map<ContainerElementKey, MetadataBuilder.ForContainer<AnnotatedType>> getContainerElementTypes(
            Meta<E> meta) {
            if (!atLeast(Version.v20)) {
                return Collections.emptyMap();
            }
            final List<ContainerElementTypeType> elements = lazy(getContainerElementTypes, "getContainerElementTypes");
            final AnnotatedType annotatedType = meta.getAnnotatedType();
            final E host = meta.getHost();

            if (annotatedType instanceof AnnotatedParameterizedType) {
                final AnnotatedType[] actualTypeArguments =
                    ((AnnotatedParameterizedType) annotatedType).getAnnotatedActualTypeArguments();

                return elements.stream().collect(ToUnmodifiable.map(cet -> {
                    Integer typeArgumentIndex = cet.getTypeArgumentIndex();
                    if (typeArgumentIndex == null) {
                        Exceptions.raiseIf(actualTypeArguments.length > 1, ValidationException::new,
                            "Missing required type argument index for %s", host);
                        typeArgumentIndex = Integer.valueOf(0);
                    }
                    return new ContainerElementKey(annotatedType, typeArgumentIndex);
                }, XmlBuilder.ForContainerElementType::new));
            }
            if (!elements.isEmpty()) {
                Exceptions.raise(ValidationException::new, "Illegally specified %d container element type(s) for %s",
                    elements.size(), host);
            }
            return Collections.emptyMap();
        }

        @SuppressWarnings("unchecked")
        SELF withGetValid(Function<D, String> getValid) {
            Validate.notNull(getValid);
            this.isCascade = new Lazy<>(() -> getValid.apply(descriptor) != null);
            return (SELF) this;
        }

        @SuppressWarnings("unchecked")
        SELF withGetGroupConversions(Function<D, List<GroupConversionType>> getGroupConversions) {
            Validate.notNull(getGroupConversions);

            this.getGroupConversions = new Lazy<>(() -> {
                return getGroupConversions.apply(descriptor).stream().map(gc -> {
                    final String from = gc.getFrom();
                    final Class<?> source = from == null ? Default.class : resolveClass(from);
                    final Class<?> target = resolveClass(gc.getTo());
                    return GroupConversion.from(source).to(target);
                }).collect(ToUnmodifiable.set());
            });
            return (SELF) this;
        }

        @SuppressWarnings("unchecked")
        SELF withGetContainerElementTypes(Function<D, List<ContainerElementTypeType>> getContainerElementTypes) {
            Validate.notNull(getContainerElementTypes);
            this.getContainerElementTypes = new Lazy<>(() -> getContainerElementTypes.apply(descriptor));
            return (SELF) this;
        }
    }

    private class ForContainerElementType
        extends ForContainer<ForContainerElementType, AnnotatedType, ContainerElementTypeType> {

        ForContainerElementType(ContainerElementTypeType descriptor) {
            super(descriptor);
            this.withGetConstraintTypes(ContainerElementTypeType::getConstraint)
                .withGetValid(ContainerElementTypeType::getValid)
                .withGetGroupConversions(ContainerElementTypeType::getConvertGroup)
                .withGetContainerElementTypes(ContainerElementTypeType::getContainerElementType);
        }
    }

    private class ForField extends XmlBuilder.ForContainer<ForField, Field, FieldType> {

        ForField(FieldType descriptor) {
            super(descriptor);
            this.withGetIgnoreAnnotations(FieldType::getIgnoreAnnotations)
                .withGetConstraintTypes(FieldType::getConstraint).withGetValid(FieldType::getValid)
                .withGetGroupConversions(FieldType::getConvertGroup)
                .withGetContainerElementTypes(FieldType::getContainerElementType);
        }
    }

    private class ForGetter extends XmlBuilder.ForContainer<ForGetter, Method, GetterType> {

        ForGetter(GetterType descriptor) {
            super(descriptor);
            this.withGetIgnoreAnnotations(GetterType::getIgnoreAnnotations)
                .withGetConstraintTypes(GetterType::getConstraint).withGetValid(GetterType::getValid)
                .withGetGroupConversions(GetterType::getConvertGroup)
                .withGetContainerElementTypes(GetterType::getContainerElementType);
        }
    }

    private abstract class ForExecutable<SELF extends ForExecutable<SELF, E, D>, E extends Executable, D>
        extends NonRootLevel<SELF, D> implements MetadataBuilder.ForExecutable<E> {

        Lazy<ReturnValueType> getReturnValue;
        Lazy<CrossParameterType> getCrossParameter;
        Lazy<List<ParameterType>> getParameters;

        ForExecutable(D descriptor) {
            super(descriptor);
        }

        @Override
        public MetadataBuilder.ForElement<E> getCrossParameter(Meta<E> meta) {
            final CrossParameterType cp = lazy(getCrossParameter, "getCrossParameter");
            if (cp == null) {
                return EmptyBuilder.instance().<E> forExecutable().getCrossParameter(meta);
            }
            return new XmlBuilder.ForCrossParameter<>(cp);
        }

        @Override
        public MetadataBuilder.ForContainer<E> getReturnValue(Meta<E> meta) {
            final ReturnValueType rv = lazy(getReturnValue, "getReturnValue");
            if (rv == null) {
                return EmptyBuilder.instance().<E> forExecutable().getReturnValue(meta);
            }
            return new XmlBuilder.ForReturnValue<>(rv);
        }

        @Override
        public List<MetadataBuilder.ForContainer<Parameter>> getParameters(Meta<E> meta) {
            return lazy(getParameters, "getParameters").stream().map(XmlBuilder.ForParameter::new)
                .collect(Collectors.toList());
        }

        @SuppressWarnings("unchecked")
        SELF withGetReturnValue(Function<D, ReturnValueType> getReturnValue) {
            Validate.notNull(getReturnValue);
            this.getReturnValue = new Lazy<>(() -> getReturnValue.apply(descriptor));
            return (SELF) this;
        }

        @SuppressWarnings("unchecked")
        SELF withGetCrossParameter(Function<D, CrossParameterType> getCrossParameter) {
            Validate.notNull(getCrossParameter);
            this.getCrossParameter = new Lazy<>(() -> getCrossParameter.apply(descriptor));
            return (SELF) this;
        }

        @SuppressWarnings("unchecked")
        SELF withGetParameters(Function<D, List<ParameterType>> getParameters) {
            Validate.notNull(getParameters);
            this.getParameters = new Lazy<>(() -> getParameters.apply(descriptor));
            return (SELF) this;
        }
    }

    private class ForConstructor<T> extends ForExecutable<ForConstructor<T>, Constructor<? extends T>, ConstructorType> {

        ForConstructor(ConstructorType descriptor) {
            super(descriptor);
            this.withGetIgnoreAnnotations(ConstructorType::getIgnoreAnnotations)
                .withGetReturnValue(ConstructorType::getReturnValue)
                .withGetCrossParameter(ConstructorType::getCrossParameter)
                .withGetParameters(ConstructorType::getParameter);
        }
    }

    private class ForMethod extends ForExecutable<ForMethod, Method, MethodType> {

        ForMethod(MethodType descriptor) {
            super(descriptor);
            this.withGetIgnoreAnnotations(MethodType::getIgnoreAnnotations)
                .withGetReturnValue(MethodType::getReturnValue).withGetCrossParameter(MethodType::getCrossParameter)
                .withGetParameters(MethodType::getParameter);
        }
    }

    private class ForParameter extends ForContainer<ForParameter, Parameter, ParameterType> {

        ForParameter(ParameterType descriptor) {
            super(descriptor);
            this.withGetIgnoreAnnotations(ParameterType::getIgnoreAnnotations)
                .withGetConstraintTypes(ParameterType::getConstraint).withGetValid(ParameterType::getValid)
                .withGetGroupConversions(ParameterType::getConvertGroup)
                .withGetContainerElementTypes(ParameterType::getContainerElementType);
        }
    }

    private class ForCrossParameter<E extends Executable>
        extends ForElement<ForCrossParameter<E>, E, CrossParameterType> {

        ForCrossParameter(CrossParameterType descriptor) {
            super(descriptor);
            this.withGetIgnoreAnnotations(CrossParameterType::getIgnoreAnnotations)
                .withGetDeclaredConstraints(d -> d.getConstraint().stream()
                    .map(ct -> createConstraint(ct, ConstraintTarget.PARAMETERS)).toArray(Annotation[]::new));
        }
    }

    private class ForReturnValue<E extends Executable> extends ForContainer<ForReturnValue<E>, E, ReturnValueType> {

        ForReturnValue(ReturnValueType descriptor) {
            super(descriptor);
            this.withGetDeclaredConstraints(d -> d.getConstraint().stream()
                .map(ct -> createConstraint(ct, ConstraintTarget.RETURN_VALUE)).toArray(Annotation[]::new))
                .withGetIgnoreAnnotations(ReturnValueType::getIgnoreAnnotations).withGetValid(ReturnValueType::getValid)
                .withGetGroupConversions(ReturnValueType::getConvertGroup)
                .withGetContainerElementTypes(ReturnValueType::getContainerElementType);
        }
    }

    private static final <T> T lazy(Lazy<T> lazy, String name) {
        Validate.validState(lazy != null, "%s not set", name);
        return lazy.get();
    }

    private final ApacheValidatorFactory validatorFactory;
    private final ConstraintMappingsType constraintMappings;
    private final Version version;

    public XmlBuilder(ApacheValidatorFactory validatorFactory, ConstraintMappingsType constraintMappings) {
        super();
        this.validatorFactory = Validate.notNull(validatorFactory, "validatorFactory");
        this.constraintMappings = Validate.notNull(constraintMappings, "constraintMappings");
        this.version = Version.of(constraintMappings);
        new MappingValidator(constraintMappings, this::resolveClass).validateMappings();
    }

    public Map<Class<?>, MetadataBuilder.ForBean<?>> forBeans() {
        return constraintMappings.getBean().stream().map(XmlBuilder.ForBean::new)
            .collect(ToUnmodifiable.map(XmlBuilder.ForBean::getBeanClass, Function.identity()));
    }

    public String getDefaultPackage() {
        return constraintMappings.getDefaultPackage();
    }

    boolean atLeast(Version v) {
        return version.compareTo(v) >= 0;
    }

    <T> Class<T> resolveClass(String className) {
        return loadClass(toQualifiedClassName(className));
    }

    private String toQualifiedClassName(String className) {
        if (isQualifiedClass(className)) {
            return className;
        }
        if (className.startsWith("[L") && className.endsWith(";")) {
            return "[L" + getDefaultPackage() + "." + className.substring(2);
        }
        return getDefaultPackage() + "." + className;
    }

    private boolean isQualifiedClass(String clazz) {
        return clazz.indexOf('.') >= 0;
    }

    @SuppressWarnings("unchecked")
    private <T> Class<T> loadClass(final String fqn) {
        ClassLoader loader = Reflection.loaderFromThreadOrClass(XmlBuilder.class);
        if (loader == null) {
            loader = getClass().getClassLoader();
        }
        try {
            return (Class<T>) Class.forName(fqn, true, loader);
        } catch (ClassNotFoundException ex) {
            throw Exceptions.create(ValidationException::new, ex, "Unable to load class: %d", fqn);
        }
    }

    private Class<?>[] loadClasses(Supplier<Stream<String>> classNames) {
        return streamClasses(classNames).toArray(Class[]::new);
    }

    private Stream<Class<?>> streamClasses(Supplier<Stream<String>> classNames) {
        return classNames.get().map(this::loadClass);
    }

    private <A extends Annotation, T> A createConstraint(final ConstraintType constraint) {
        return createConstraint(constraint, ConstraintTarget.IMPLICIT);
    }

    private <A extends Annotation, T> A createConstraint(final ConstraintType constraint, ConstraintTarget target) {
        final Class<A> annotationClass = this.<A> loadClass(toQualifiedClassName(constraint.getAnnotation()));
        final AnnotationProxyBuilder<A> annoBuilder =
            validatorFactory.getAnnotationsManager().buildProxyFor(annotationClass);

        if (constraint.getMessage() != null) {
            annoBuilder.setMessage(constraint.getMessage());
        }
        annoBuilder.setGroups(getGroups(constraint.getGroups()));
        annoBuilder.setPayload(getPayload(constraint.getPayload()));

        if (ConstraintAnnotationAttributes.VALIDATION_APPLIES_TO.analyze(annotationClass).isValid()) {
            annoBuilder.setValidationAppliesTo(target);
        }
        for (final ElementType elementType : constraint.getElement()) {
            final String name = elementType.getName();
            final Class<?> returnType = getAnnotationParameterType(annotationClass, name);
            final Object elementValue = getElementValue(elementType, returnType);
            annoBuilder.setValue(name, elementValue);
        }
        return annoBuilder.createAnnotation();
    }

    private <A extends Annotation> Class<?> getAnnotationParameterType(final Class<A> annotationClass,
        final String name) {
        final Method m = Reflection.getPublicMethod(annotationClass, name);
        Exceptions.raiseIf(m == null, ValidationException::new,
            "Annotation of type %s does not contain a parameter %s.", annotationClass.getName(), name);
        return m.getReturnType();
    }

    private Object getElementValue(ElementType elementType, Class<?> returnType) {
        removeEmptyContentElements(elementType);

        final List<Serializable> content = elementType.getContent();
        final int sz = content.size();
        if (returnType.isArray()) {
            final Object result = Array.newInstance(returnType.getComponentType(), sz);
            for (int i = 0; i < sz; i++) {
                Array.set(result, i, getSingleValue(content.get(i), returnType.getComponentType()));
            }
            return result;
        }
        Exceptions.raiseIf(sz != 1, ValidationException::new,
            "Attempt to specify an array where single value is expected.");

        return getSingleValue(content.get(0), returnType);
    }

    private void removeEmptyContentElements(ElementType elementType) {
        for (Iterator<Serializable> iter = elementType.getContent().iterator(); iter.hasNext();) {
            final Serializable content = iter.next();
            if (content instanceof String && ((String) content).matches("[\\n ].*")) {
                iter.remove();
            }
        }
    }

    @SuppressWarnings("unchecked")
    private Object getSingleValue(Serializable serializable, Class<?> returnType) {
        if (serializable instanceof String) {
            return convertToResultType(returnType, (String) serializable);
        }
        if (serializable instanceof JAXBElement<?>) {
            final JAXBElement<?> elem = (JAXBElement<?>) serializable;
            if (String.class.equals(elem.getDeclaredType())) {
                return convertToResultType(returnType, (String) elem.getValue());
            }
            if (AnnotationType.class.equals(elem.getDeclaredType())) {
                AnnotationType annotationType = (AnnotationType) elem.getValue();
                try {
                    return createAnnotation(annotationType, (Class<? extends Annotation>) returnType);
                } catch (ClassCastException e) {
                    throw new ValidationException("Unexpected parameter value");
                }
            }
        }
        throw new ValidationException("Unexpected parameter value");
    }

    private Object convertToResultType(Class<?> returnType, String value) {
        /**
         * Class is represented by the fully qualified class name of the class. spec: Note that if the raw string is
         * unqualified, default package is taken into account.
         */
        if (String.class.equals(returnType)) {
            return value;
        }
        if (Class.class.equals(returnType)) {
            return resolveClass(value);
        }
        if (returnType.isEnum()) {
            try {
                @SuppressWarnings({ "rawtypes", "unchecked" })
                final Enum e = Enum.valueOf(returnType.asSubclass(Enum.class), value);
                return e;
            } catch (IllegalArgumentException e) {
                throw new ConstraintDeclarationException(e);
            }
        }
        try {
            if (Byte.class.equals(returnType) || byte.class.equals(returnType)) {
                // spec mandates it:
                return Byte.parseByte(value);
            }
            if (Short.class.equals(returnType) || short.class.equals(returnType)) {
                return Short.parseShort(value);
            }
            if (Integer.class.equals(returnType) || int.class.equals(returnType)) {
                return Integer.parseInt(value);
            }
            if (Long.class.equals(returnType) || long.class.equals(returnType)) {
                return Long.parseLong(value);
            }
            if (Float.class.equals(returnType) || float.class.equals(returnType)) {
                return Float.parseFloat(value);
            }
            if (Double.class.equals(returnType) || double.class.equals(returnType)) {
                return Double.parseDouble(value);
            }
            if (Boolean.class.equals(returnType) || boolean.class.equals(returnType)) {
                return Boolean.parseBoolean(value);
            }
        } catch (Exception e) {
            Exceptions.raise(ValidationException::new, e, "Unable to coerce value '%s' to %s", value, returnType);
        }
        if (Character.class.equals(returnType) || char.class.equals(returnType)) {
            Exceptions.raiseIf(value.length() > 1, ConstraintDeclarationException::new,
                "a char must have a length of 1");
            return value.charAt(0);
        }
        return Exceptions.raise(ValidationException::new, "Unknown annotation value type %s", returnType.getName());
    }

    private <A extends Annotation> Annotation createAnnotation(AnnotationType annotationType, Class<A> returnType) {
        final AnnotationProxyBuilder<A> metaAnnotation =
            validatorFactory.getAnnotationsManager().buildProxyFor(returnType);
        for (ElementType elementType : annotationType.getElement()) {
            final String name = elementType.getName();
            metaAnnotation.setValue(name, getElementValue(elementType, getAnnotationParameterType(returnType, name)));
        }
        return metaAnnotation.createAnnotation();
    }

    private Class<?>[] getGroups(GroupsType groupsType) {
        if (groupsType == null) {
            return ObjectUtils.EMPTY_CLASS_ARRAY;
        }
        return loadClasses(groupsType.getValue()::stream);
    }

    @SuppressWarnings("unchecked")
    private Class<? extends Payload>[] getPayload(PayloadType payloadType) {
        if (payloadType == null) {
            return (Class<? extends Payload>[]) ObjectUtils.EMPTY_CLASS_ARRAY;
        }
        return streamClasses(payloadType.getValue()::stream).peek(pc -> {
            Exceptions.raiseUnless(Payload.class.isAssignableFrom(pc), ConstraintDeclarationException::new,
                "Specified payload class %s does not implement %s", pc.getName(), Payload.class.getName());
        }).<Class<? extends Payload>> map(pc -> pc.asSubclass(Payload.class)).toArray(Class[]::new);
    }
}


text:
#pragma once
#include <aws/grafana/ManagedGrafana_EXPORTS.h>
#include <aws/grafana/ManagedGrafanaRequest.h>
#include <aws/grafana/model/AccountAccessType.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/grafana/model/PermissionType.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/grafana/model/AuthenticationProviderTypes.h>
#include <aws/grafana/model/DataSourceType.h>
#include <aws/grafana/model/NotificationDestinationType.h>
#include <utility>
#include <aws/core/utils/UUID.h>

namespace Aws
{
namespace ManagedGrafana
{
namespace Model
{

  /**
   */
  class AWS_MANAGEDGRAFANA_API CreateWorkspaceRequest : public ManagedGrafanaRequest
  {
  public:
    CreateWorkspaceRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "CreateWorkspace"; }

    Aws::String SerializePayload() const override;

    /**
     *
Specifies whether the workspace can access Amazon Web Services resources in
     * this Amazon Web Services account only, or whether it can also access Amazon Web
     * Services resources in other accounts in the same organization. If you specify
     * ORGANIZATION, you must specify which organizational units the
     * workspace can access in the workspaceOrganizationalUnits
     * parameter.

     */
    inline const AccountAccessType& GetAccountAccessType() const{ return m_accountAccessType; }

    /**
     *
Specifies whether the workspace can access Amazon Web Services resources in
     * this Amazon Web Services account only, or whether it can also access Amazon Web
     * Services resources in other accounts in the same organization. If you specify
     * ORGANIZATION, you must specify which organizational units the
     * workspace can access in the workspaceOrganizationalUnits
     * parameter.

     */
    inline bool AccountAccessTypeHasBeenSet() const { return m_accountAccessTypeHasBeenSet; }

    /**
     *
Specifies whether the workspace can access Amazon Web Services resources in
     * this Amazon Web Services account only, or whether it can also access Amazon Web
     * Services resources in other accounts in the same organization. If you specify
     * ORGANIZATION, you must specify which organizational units the
     * workspace can access in the workspaceOrganizationalUnits
     * parameter.

     */
    inline void SetAccountAccessType(const AccountAccessType& value) { m_accountAccessTypeHasBeenSet = true; m_accountAccessType = value; }

    /**
     *
Specifies whether the workspace can access Amazon Web Services resources in
     * this Amazon Web Services account only, or whether it can also access Amazon Web
     * Services resources in other accounts in the same organization. If you specify
     * ORGANIZATION, you must specify which organizational units the
     * workspace can access in the workspaceOrganizationalUnits
     * parameter.

     */
    inline void SetAccountAccessType(AccountAccessType&& value) { m_accountAccessTypeHasBeenSet = true; m_accountAccessType = std::move(value); }

    /**
     *
Specifies whether the workspace can access Amazon Web Services resources in
     * this Amazon Web Services account only, or whether it can also access Amazon Web
     * Services resources in other accounts in the same organization. If you specify
     * ORGANIZATION, you must specify which organizational units the
     * workspace can access in the workspaceOrganizationalUnits
     * parameter.

     */
    inline CreateWorkspaceRequest& WithAccountAccessType(const AccountAccessType& value) { SetAccountAccessType(value); return *this;}

    /**
     *
Specifies whether the workspace can access Amazon Web Services resources in
     * this Amazon Web Services account only, or whether it can also access Amazon Web
     * Services resources in other accounts in the same organization. If you specify
     * ORGANIZATION, you must specify which organizational units the
     * workspace can access in the workspaceOrganizationalUnits
     * parameter.

     */
    inline CreateWorkspaceRequest& WithAccountAccessType(AccountAccessType&& value) { SetAccountAccessType(std::move(value)); return *this;}

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline const Aws::Vector<AuthenticationProviderTypes>& GetAuthenticationProviders() const{ return m_authenticationProviders; }

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline bool AuthenticationProvidersHasBeenSet() const { return m_authenticationProvidersHasBeenSet; }

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline void SetAuthenticationProviders(const Aws::Vector<AuthenticationProviderTypes>& value) { m_authenticationProvidersHasBeenSet = true; m_authenticationProviders = value; }

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline void SetAuthenticationProviders(Aws::Vector<AuthenticationProviderTypes>&& value) { m_authenticationProvidersHasBeenSet = true; m_authenticationProviders = std::move(value); }

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline CreateWorkspaceRequest& WithAuthenticationProviders(const Aws::Vector<AuthenticationProviderTypes>& value) { SetAuthenticationProviders(value); return *this;}

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline CreateWorkspaceRequest& WithAuthenticationProviders(Aws::Vector<AuthenticationProviderTypes>&& value) { SetAuthenticationProviders(std::move(value)); return *this;}

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline CreateWorkspaceRequest& AddAuthenticationProviders(const AuthenticationProviderTypes& value) { m_authenticationProvidersHasBeenSet = true; m_authenticationProviders.push_back(value); return *this; }

    /**
     *
Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single
     * Sign On, or both to authenticate users for using the Grafana console within a
     * workspace. For more information, see User
     * authentication in Amazon Managed Grafana.

     */
    inline CreateWorkspaceRequest& AddAuthenticationProviders(AuthenticationProviderTypes&& value) { m_authenticationProvidersHasBeenSet = true; m_authenticationProviders.push_back(std::move(value)); return *this; }

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline const Aws::String& GetClientToken() const{ return m_clientToken; }

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline CreateWorkspaceRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline CreateWorkspaceRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}

    /**
     *
A unique, case-sensitive, user-provided identifier to ensure the idempotency
     * of the request.

     */
    inline CreateWorkspaceRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline const Aws::String& GetOrganizationRoleName() const{ return m_organizationRoleName; }

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline bool OrganizationRoleNameHasBeenSet() const { return m_organizationRoleNameHasBeenSet; }

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline void SetOrganizationRoleName(const Aws::String& value) { m_organizationRoleNameHasBeenSet = true; m_organizationRoleName = value; }

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline void SetOrganizationRoleName(Aws::String&& value) { m_organizationRoleNameHasBeenSet = true; m_organizationRoleName = std::move(value); }

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline void SetOrganizationRoleName(const char* value) { m_organizationRoleNameHasBeenSet = true; m_organizationRoleName.assign(value); }

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline CreateWorkspaceRequest& WithOrganizationRoleName(const Aws::String& value) { SetOrganizationRoleName(value); return *this;}

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline CreateWorkspaceRequest& WithOrganizationRoleName(Aws::String&& value) { SetOrganizationRoleName(std::move(value)); return *this;}

    /**
     *
The name of an IAM role that already exists to use with Organizations to
     * access Amazon Web Services data sources and notification channels in other
     * accounts in an organization.

     */
    inline CreateWorkspaceRequest& WithOrganizationRoleName(const char* value) { SetOrganizationRoleName(value); return *this;}

    /**
     *
If you specify SERVICE_MANAGED on AWS Grafana console, Amazon
     * Managed Grafana automatically creates the IAM roles and provisions the
     * permissions that the workspace needs to use Amazon Web Services data sources and
     * notification channels. In CLI mode, the permissionType
     * SERVICE_MANAGED will not create the IAM role for you.

If you
     * specify CUSTOMER_MANAGED, you will manage those roles and
     * permissions yourself. If you are creating this workspace in a member account of
     * an organization that is not a delegated administrator account, and you want the
     * workspace to access data sources in other Amazon Web Services accounts in the
     * organization, you must choose CUSTOMER_MANAGED.

For more
     * information, see Amazon
     * Managed Grafana permissions and policies for Amazon Web Services data sources
     * and notification channels.

     */
    inline const PermissionType& GetPermissionType() const{ return m_permissionType; }

    /**
     *
If you specify SERVICE_MANAGED on AWS Grafana console, Amazon
     * Managed Grafana automatically creates the IAM roles and provisions the
     * permissions that the workspace needs to use Amazon Web Services data sources and
     * notification channels. In CLI mode, the permissionType
     * SERVICE_MANAGED will not create the IAM role for you.

If you
     * specify CUSTOMER_MANAGED, you will manage those roles and
     * permissions yourself. If you are creating this workspace in a member account of
     * an organization that is not a delegated administrator account, and you want the
     * workspace to access data sources in other Amazon Web Services accounts in the
     * organization, you must choose CUSTOMER_MANAGED.

For more
     * information, see Amazon
     * Managed Grafana permissions and policies for Amazon Web Services data sources
     * and notification channels.

     */
    inline bool PermissionTypeHasBeenSet() const { return m_permissionTypeHasBeenSet; }

    /**
     *
If you specify SERVICE_MANAGED on AWS Grafana console, Amazon
     * Managed Grafana automatically creates the IAM roles and provisions the
     * permissions that the workspace needs to use Amazon Web Services data sources and
     * notification channels. In CLI mode, the permissionType
     * SERVICE_MANAGED will not create the IAM role for you.

If you
     * specify CUSTOMER_MANAGED, you will manage those roles and
     * permissions yourself. If you are creating this workspace in a member account of
     * an organization that is not a delegated administrator account, and you want the
     * workspace to access data sources in other Amazon Web Services accounts in the
     * organization, you must choose CUSTOMER_MANAGED.

For more
     * information, see Amazon
     * Managed Grafana permissions and policies for Amazon Web Services data sources
     * and notification channels.

     */
    inline void SetPermissionType(const PermissionType& value) { m_permissionTypeHasBeenSet = true; m_permissionType = value; }

    /**
     *
If you specify SERVICE_MANAGED on AWS Grafana console, Amazon
     * Managed Grafana automatically creates the IAM roles and provisions the
     * permissions that the workspace needs to use Amazon Web Services data sources and
     * notification channels. In CLI mode, the permissionType
     * SERVICE_MANAGED will not create the IAM role for you.

If you
     * specify CUSTOMER_MANAGED, you will manage those roles and
     * permissions yourself. If you are creating this workspace in a member account of
     * an organization that is not a delegated administrator account, and you want the
     * workspace to access data sources in other Amazon Web Services accounts in the
     * organization, you must choose CUSTOMER_MANAGED.

For more
     * information, see Amazon
     * Managed Grafana permissions and policies for Amazon Web Services data sources
     * and notification channels.

     */
    inline void SetPermissionType(PermissionType&& value) { m_permissionTypeHasBeenSet = true; m_permissionType = std::move(value); }

    /**
     *
If you specify SERVICE_MANAGED on AWS Grafana console, Amazon
     * Managed Grafana automatically creates the IAM roles and provisions the
     * permissions that the workspace needs to use Amazon Web Services data sources and
     * notification channels. In CLI mode, the permissionType
     * SERVICE_MANAGED will not create the IAM role for you.

If you
     * specify CUSTOMER_MANAGED, you will manage those roles and
     * permissions yourself. If you are creating this workspace in a member account of
     * an organization that is not a delegated administrator account, and you want the
     * workspace to access data sources in other Amazon Web Services accounts in the
     * organization, you must choose CUSTOMER_MANAGED.

For more
     * information, see Amazon
     * Managed Grafana permissions and policies for Amazon Web Services data sources
     * and notification channels.

     */
    inline CreateWorkspaceRequest& WithPermissionType(const PermissionType& value) { SetPermissionType(value); return *this;}

    /**
     *
If you specify SERVICE_MANAGED on AWS Grafana console, Amazon
     * Managed Grafana automatically creates the IAM roles and provisions the
     * permissions that the workspace needs to use Amazon Web Services data sources and
     * notification channels. In CLI mode, the permissionType
     * SERVICE_MANAGED will not create the IAM role for you.

If you
     * specify CUSTOMER_MANAGED, you will manage those roles and
     * permissions yourself. If you are creating this workspace in a member account of
     * an organization that is not a delegated administrator account, and you want the
     * workspace to access data sources in other Amazon Web Services accounts in the
     * organization, you must choose CUSTOMER_MANAGED.

For more
     * information, see Amazon
     * Managed Grafana permissions and policies for Amazon Web Services data sources
     * and notification channels.

     */
    inline CreateWorkspaceRequest& WithPermissionType(PermissionType&& value) { SetPermissionType(std::move(value)); return *this;}

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline const Aws::String& GetStackSetName() const{ return m_stackSetName; }

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline bool StackSetNameHasBeenSet() const { return m_stackSetNameHasBeenSet; }

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline void SetStackSetName(const Aws::String& value) { m_stackSetNameHasBeenSet = true; m_stackSetName = value; }

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline void SetStackSetName(Aws::String&& value) { m_stackSetNameHasBeenSet = true; m_stackSetName = std::move(value); }

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline void SetStackSetName(const char* value) { m_stackSetNameHasBeenSet = true; m_stackSetName.assign(value); }

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline CreateWorkspaceRequest& WithStackSetName(const Aws::String& value) { SetStackSetName(value); return *this;}

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline CreateWorkspaceRequest& WithStackSetName(Aws::String&& value) { SetStackSetName(std::move(value)); return *this;}

    /**
     *
The name of the CloudFormation stack set to use to generate IAM roles to be
     * used for this workspace.

     */
    inline CreateWorkspaceRequest& WithStackSetName(const char* value) { SetStackSetName(value); return *this;}

    /**
     *
The list of tags associated with the workspace.

     */
    inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
The list of tags associated with the workspace.

     */
    inline CreateWorkspaceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline const Aws::Vector<DataSourceType>& GetWorkspaceDataSources() const{ return m_workspaceDataSources; }

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline bool WorkspaceDataSourcesHasBeenSet() const { return m_workspaceDataSourcesHasBeenSet; }

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline void SetWorkspaceDataSources(const Aws::Vector<DataSourceType>& value) { m_workspaceDataSourcesHasBeenSet = true; m_workspaceDataSources = value; }

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline void SetWorkspaceDataSources(Aws::Vector<DataSourceType>&& value) { m_workspaceDataSourcesHasBeenSet = true; m_workspaceDataSources = std::move(value); }

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline CreateWorkspaceRequest& WithWorkspaceDataSources(const Aws::Vector<DataSourceType>& value) { SetWorkspaceDataSources(value); return *this;}

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline CreateWorkspaceRequest& WithWorkspaceDataSources(Aws::Vector<DataSourceType>&& value) { SetWorkspaceDataSources(std::move(value)); return *this;}

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline CreateWorkspaceRequest& AddWorkspaceDataSources(const DataSourceType& value) { m_workspaceDataSourcesHasBeenSet = true; m_workspaceDataSources.push_back(value); return *this; }

    /**
     *
Specify the Amazon Web Services data sources that you want to be queried in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * read data from these sources. You must still add them as data sources in the
     * Grafana console in the workspace.

If you don't specify a data source
     * here, you can still add it as a data source in the workspace console later.
     * However, you will then have to manually configure permissions for it.

     */
    inline CreateWorkspaceRequest& AddWorkspaceDataSources(DataSourceType&& value) { m_workspaceDataSourcesHasBeenSet = true; m_workspaceDataSources.push_back(std::move(value)); return *this; }

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline const Aws::String& GetWorkspaceDescription() const{ return m_workspaceDescription; }

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline bool WorkspaceDescriptionHasBeenSet() const { return m_workspaceDescriptionHasBeenSet; }

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline void SetWorkspaceDescription(const Aws::String& value) { m_workspaceDescriptionHasBeenSet = true; m_workspaceDescription = value; }

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline void SetWorkspaceDescription(Aws::String&& value) { m_workspaceDescriptionHasBeenSet = true; m_workspaceDescription = std::move(value); }

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline void SetWorkspaceDescription(const char* value) { m_workspaceDescriptionHasBeenSet = true; m_workspaceDescription.assign(value); }

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline CreateWorkspaceRequest& WithWorkspaceDescription(const Aws::String& value) { SetWorkspaceDescription(value); return *this;}

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline CreateWorkspaceRequest& WithWorkspaceDescription(Aws::String&& value) { SetWorkspaceDescription(std::move(value)); return *this;}

    /**
     *
A description for the workspace. This is used only to help you identify this
     * workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
     *

     */
    inline CreateWorkspaceRequest& WithWorkspaceDescription(const char* value) { SetWorkspaceDescription(value); return *this;}

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline const Aws::String& GetWorkspaceName() const{ return m_workspaceName; }

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline bool WorkspaceNameHasBeenSet() const { return m_workspaceNameHasBeenSet; }

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline void SetWorkspaceName(const Aws::String& value) { m_workspaceNameHasBeenSet = true; m_workspaceName = value; }

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline void SetWorkspaceName(Aws::String&& value) { m_workspaceNameHasBeenSet = true; m_workspaceName = std::move(value); }

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline void SetWorkspaceName(const char* value) { m_workspaceNameHasBeenSet = true; m_workspaceName.assign(value); }

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline CreateWorkspaceRequest& WithWorkspaceName(const Aws::String& value) { SetWorkspaceName(value); return *this;}

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline CreateWorkspaceRequest& WithWorkspaceName(Aws::String&& value) { SetWorkspaceName(std::move(value)); return *this;}

    /**
     *
The name for the workspace. It does not have to be unique.

     */
    inline CreateWorkspaceRequest& WithWorkspaceName(const char* value) { SetWorkspaceName(value); return *this;}

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline const Aws::Vector<NotificationDestinationType>& GetWorkspaceNotificationDestinations() const{ return m_workspaceNotificationDestinations; }

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline bool WorkspaceNotificationDestinationsHasBeenSet() const { return m_workspaceNotificationDestinationsHasBeenSet; }

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline void SetWorkspaceNotificationDestinations(const Aws::Vector<NotificationDestinationType>& value) { m_workspaceNotificationDestinationsHasBeenSet = true; m_workspaceNotificationDestinations = value; }

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline void SetWorkspaceNotificationDestinations(Aws::Vector<NotificationDestinationType>&& value) { m_workspaceNotificationDestinationsHasBeenSet = true; m_workspaceNotificationDestinations = std::move(value); }

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline CreateWorkspaceRequest& WithWorkspaceNotificationDestinations(const Aws::Vector<NotificationDestinationType>& value) { SetWorkspaceNotificationDestinations(value); return *this;}

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline CreateWorkspaceRequest& WithWorkspaceNotificationDestinations(Aws::Vector<NotificationDestinationType>&& value) { SetWorkspaceNotificationDestinations(std::move(value)); return *this;}

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline CreateWorkspaceRequest& AddWorkspaceNotificationDestinations(const NotificationDestinationType& value) { m_workspaceNotificationDestinationsHasBeenSet = true; m_workspaceNotificationDestinations.push_back(value); return *this; }

    /**
     *
Specify the Amazon Web Services notification channels that you plan to use in
     * this workspace. Specifying these data sources here enables Amazon Managed
     * Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to
     * use these channels.

     */
    inline CreateWorkspaceRequest& AddWorkspaceNotificationDestinations(NotificationDestinationType&& value) { m_workspaceNotificationDestinationsHasBeenSet = true; m_workspaceNotificationDestinations.push_back(std::move(value)); return *this; }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline const Aws::Vector<Aws::String>& GetWorkspaceOrganizationalUnits() const{ return m_workspaceOrganizationalUnits; }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline bool WorkspaceOrganizationalUnitsHasBeenSet() const { return m_workspaceOrganizationalUnitsHasBeenSet; }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline void SetWorkspaceOrganizationalUnits(const Aws::Vector<Aws::String>& value) { m_workspaceOrganizationalUnitsHasBeenSet = true; m_workspaceOrganizationalUnits = value; }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline void SetWorkspaceOrganizationalUnits(Aws::Vector<Aws::String>&& value) { m_workspaceOrganizationalUnitsHasBeenSet = true; m_workspaceOrganizationalUnits = std::move(value); }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline CreateWorkspaceRequest& WithWorkspaceOrganizationalUnits(const Aws::Vector<Aws::String>& value) { SetWorkspaceOrganizationalUnits(value); return *this;}

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline CreateWorkspaceRequest& WithWorkspaceOrganizationalUnits(Aws::Vector<Aws::String>&& value) { SetWorkspaceOrganizationalUnits(std::move(value)); return *this;}

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline CreateWorkspaceRequest& AddWorkspaceOrganizationalUnits(const Aws::String& value) { m_workspaceOrganizationalUnitsHasBeenSet = true; m_workspaceOrganizationalUnits.push_back(value); return *this; }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline CreateWorkspaceRequest& AddWorkspaceOrganizationalUnits(Aws::String&& value) { m_workspaceOrganizationalUnitsHasBeenSet = true; m_workspaceOrganizationalUnits.push_back(std::move(value)); return *this; }

    /**
     *
Specifies the organizational units that this workspace is allowed to use data
     * sources from, if this workspace is in an account that is part of an
     * organization.

     */
    inline CreateWorkspaceRequest& AddWorkspaceOrganizationalUnits(const char* value) { m_workspaceOrganizationalUnitsHasBeenSet = true; m_workspaceOrganizationalUnits.push_back(value); return *this; }

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline const Aws::String& GetWorkspaceRoleArn() const{ return m_workspaceRoleArn; }

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline bool WorkspaceRoleArnHasBeenSet() const { return m_workspaceRoleArnHasBeenSet; }

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline void SetWorkspaceRoleArn(const Aws::String& value) { m_workspaceRoleArnHasBeenSet = true; m_workspaceRoleArn = value; }

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline void SetWorkspaceRoleArn(Aws::String&& value) { m_workspaceRoleArnHasBeenSet = true; m_workspaceRoleArn = std::move(value); }

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline void SetWorkspaceRoleArn(const char* value) { m_workspaceRoleArnHasBeenSet = true; m_workspaceRoleArn.assign(value); }

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline CreateWorkspaceRequest& WithWorkspaceRoleArn(const Aws::String& value) { SetWorkspaceRoleArn(value); return *this;}

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline CreateWorkspaceRequest& WithWorkspaceRoleArn(Aws::String&& value) { SetWorkspaceRoleArn(std::move(value)); return *this;}

    /**
     *
The workspace needs an IAM role that grants permissions to the Amazon Web
     * Services resources that the workspace will view data from. If you already have a
     * role that you want to use, specify it here. The permission type should be set to
     * CUSTOMER_MANAGED.

     */
    inline CreateWorkspaceRequest& WithWorkspaceRoleArn(const char* value) { SetWorkspaceRoleArn(value); return *this;}

  private:

    AccountAccessType m_accountAccessType;
    bool m_accountAccessTypeHasBeenSet;

    Aws::Vector<AuthenticationProviderTypes> m_authenticationProviders;
    bool m_authenticationProvidersHasBeenSet;

    Aws::String m_clientToken;
    bool m_clientTokenHasBeenSet;

    Aws::String m_organizationRoleName;
    bool m_organizationRoleNameHasBeenSet;

    PermissionType m_permissionType;
    bool m_permissionTypeHasBeenSet;

    Aws::String m_stackSetName;
    bool m_stackSetNameHasBeenSet;

    Aws::Map<Aws::String, Aws::String> m_tags;
    bool m_tagsHasBeenSet;

    Aws::Vector<DataSourceType> m_workspaceDataSources;
    bool m_workspaceDataSourcesHasBeenSet;

    Aws::String m_workspaceDescription;
    bool m_workspaceDescriptionHasBeenSet;

    Aws::String m_workspaceName;
    bool m_workspaceNameHasBeenSet;

    Aws::Vector<NotificationDestinationType> m_workspaceNotificationDestinations;
    bool m_workspaceNotificationDestinationsHasBeenSet;

    Aws::Vector<Aws::String> m_workspaceOrganizationalUnits;
    bool m_workspaceOrganizationalUnitsHasBeenSet;

    Aws::String m_workspaceRoleArn;
    bool m_workspaceRoleArnHasBeenSet;
  };

} // namespace Model
} // namespace ManagedGrafana
} // namespace Aws


text:
class ShiftSerializer < BaseSerializer
  attributes :id,
             :name,
             :start_time,
             :end_time,
             :employee_name,
             :employee_id,
             :shift_template_id

  delegate :user,
           to: :object

  def start_time
    object.start_time
  end

  def end_time
    object.end_time
  end

  def employee_name
    user.first_name
  end

  def employee_id
    user.id
  end
end