text:
package fixture

import (
	"bytes"
	"fmt"
	"reflect"

	"sigs.k8s.io/structured-merge-diff/fieldpath"
	"sigs.k8s.io/structured-merge-diff/merge"
	"sigs.k8s.io/structured-merge-diff/typed"
)

// State of the current test in terms of live object. One can check at
// any time that Live and Managers match the expectations.
type State struct {
	Live     typed.TypedValue
	Parser   typed.ParseableType
	Managers fieldpath.ManagedFields
	Updater  *merge.Updater
}

// FixTabsOrDie counts the number of tab characters preceding the first
// line in the given yaml object. It removes that many tabs from every
// line. It panics (it's a test funtion) if some line has fewer tabs
// than the first line.
//
// The purpose of this is to make it easier to read tests.
func FixTabsOrDie(in typed.YAMLObject) typed.YAMLObject {
	lines := bytes.Split([]byte(in), []byte{'\n'})
	if len(lines[0]) == 0 && len(lines) > 1 {
		lines = lines[1:]
	}
	// Create prefix made of tabs that we want to remove.
	var prefix []byte
	for _, c := range lines[0] {
		if c != '\t' {
			break
		}
		prefix = append(prefix, byte('\t'))
	}
	// Remove prefix from all tabs, fail otherwise.
	for i := range lines {
		line := lines[i]
		// It's OK for the last line to be blank (trailing \n)
		if i == len(lines)-1 && len(line) <= len(prefix) && bytes.TrimSpace(line) == nil {
			lines[i] = []byte{}
			break
		}
		if !bytes.HasPrefix(line, prefix) {
			panic(fmt.Errorf("line %d doesn't start with expected number (%d) of tabs: %v", i, len(prefix), line))
		}
		lines[i] = line[len(prefix):]
	}
	return typed.YAMLObject(bytes.Join(lines, []byte{'\n'}))
}

func (s *State) checkInit() error {
	if s.Live == nil {
		obj, err := s.Parser.FromYAML("{}")
		if err != nil {
			return fmt.Errorf("failed to create new empty object: %v", err)
		}
		s.Live = obj
	}
	return nil
}

// Update the current state with the passed in object
func (s *State) Update(obj typed.YAMLObject, version fieldpath.APIVersion, manager string) error {
	obj = FixTabsOrDie(obj)
	if err := s.checkInit(); err != nil {
		return err
	}
	tv, err := s.Parser.FromYAML(obj)
	s.Live , err = s.Updater.Converter.Convert(s.Live, version)
	if err != nil {
		return err
	}
	managers, err := s.Updater.Update(s.Live, tv, version, s.Managers, manager)
	if err != nil {
		return err
	}
	s.Live = tv
	s.Managers = managers

	return nil
}

// Apply the passed in object to the current state
func (s *State) Apply(obj typed.YAMLObject, version fieldpath.APIVersion, manager string, force bool) error {
	obj = FixTabsOrDie(obj)
	if err := s.checkInit(); err != nil {
		return err
	}
	tv, err := s.Parser.FromYAML(obj)
	if err != nil {
		return err
	}
	s.Live , err = s.Updater.Converter.Convert(s.Live, version)
	if err != nil {
		return err
	}
	new, managers, err := s.Updater.Apply(s.Live, tv, version, s.Managers, manager, force)
	if err != nil {
		return err
	}
	s.Live = new
	s.Managers = managers

	return nil
}

// CompareLive takes a YAML string and returns the comparison with the
// current live object or an error.
func (s *State) CompareLive(obj typed.YAMLObject) (*typed.Comparison, error) {
	obj = FixTabsOrDie(obj)
	if err := s.checkInit(); err != nil {
		return nil, err
	}
	tv, err := s.Parser.FromYAML(obj)
	if err != nil {
		return nil, err
	}
	return s.Live.Compare(tv)
}

// dummyConverter doesn't convert, it just returns the same exact object, as long as a version is provided.
type dummyConverter struct{}

var _ merge.Converter = dummyConverter{}

// Convert returns the object given in input, not doing any conversion.
func (dummyConverter) Convert(v typed.TypedValue, version fieldpath.APIVersion) (typed.TypedValue, error) {
	if len(version) == 0 {
		return nil, fmt.Errorf("cannot convert to invalid version: %q", version)
	}
	return v, nil
}

func (dummyConverter) IsMissingVersionError(err error) bool {
	return false
}

// Operation is a step that will run when building a table-driven test.
type Operation interface {
	run(*State) error
}

func hasConflict(conflicts merge.Conflicts, conflict merge.Conflict) bool {
	for i := range conflicts {
		if reflect.DeepEqual(conflict, conflicts[i]) {
			return true
		}
	}
	return false
}

func addedConflicts(one, other merge.Conflicts) merge.Conflicts {
	added := merge.Conflicts{}
	for _, conflict := range other {
		if !hasConflict(one, conflict) {
			added = append(added, conflict)
		}
	}
	return added
}

// Apply is a type of operation. It is a non-forced apply run by a
// manager with a given object. Since non-forced apply operation can
// conflict, the user can specify the expected conflicts. If conflicts
// don't match, an error will occur.
type Apply struct {
	Manager    string
	APIVersion fieldpath.APIVersion
	Object     typed.YAMLObject
	Conflicts  merge.Conflicts
}

var _ Operation = &Apply{}

func (a Apply) run(state *State) error {
	err := state.Apply(a.Object, a.APIVersion, a.Manager, false)
	if err != nil {
		if _, ok := err.(merge.Conflicts); !ok || a.Conflicts == nil {
			return err
		}
	}
	if a.Conflicts != nil {
		conflicts := merge.Conflicts{}
		if err != nil {
			conflicts = err.(merge.Conflicts)
		}
		if len(addedConflicts(a.Conflicts, conflicts)) != 0 || len(addedConflicts(conflicts, a.Conflicts)) != 0 {
			return fmt.Errorf("Expected conflicts:\n%v\ngot\n%v\nadded:\n%v\nremoved:\n%v",
				a.Conflicts.Error(),
				conflicts.Error(),
				addedConflicts(a.Conflicts, conflicts).Error(),
				addedConflicts(conflicts, a.Conflicts).Error(),
			)
		}
	}
	return nil

}

// ForceApply is a type of operation. It is a forced-apply run by a
// manager with a given object. Any error will be returned.
type ForceApply struct {
	Manager    string
	APIVersion fieldpath.APIVersion
	Object     typed.YAMLObject
}

var _ Operation = &ForceApply{}

func (f ForceApply) run(state *State) error {
	return state.Apply(f.Object, f.APIVersion, f.Manager, true)
}

// Update is a type of operation. It is a controller type of
// update. Errors are passed along.
type Update struct {
	Manager    string
	APIVersion fieldpath.APIVersion
	Object     typed.YAMLObject
}

var _ Operation = &Update{}

func (u Update) run(state *State) error {
	return state.Update(u.Object, u.APIVersion, u.Manager)
}

// TestCase is the list of operations that need to be run, as well as
// the object/managedfields as they are supposed to look like after all
// the operations have been successfully performed. If Object/Managed is
// not specified, then the comparison is not performed (any object or
// managed field will pass). Any error (conflicts aside) happen while
// running the operation, that error will be returned right away.
type TestCase struct {
	// Ops is the list of operations to run sequentially
	Ops []Operation
	// Object, if not empty, is the object as it's expected to
	// be after all the operations are run.
	Object typed.YAMLObject
	// Managed, if not nil, is the ManagedFields as expected
	// after all operations are run.
	Managed fieldpath.ManagedFields
}

// Test runs the test-case using the given parser and a dummy converter.
func (tc TestCase) Test(parser typed.ParseableType) error {
	return tc.TestWithConverter(parser, &dummyConverter{})
}

// TestWithConverter runs the test-case using the given parser and converter.
func (tc TestCase) TestWithConverter(parser typed.ParseableType, converter merge.Converter) error {
	state := State{
		Updater: &merge.Updater{Converter: converter},
		Parser:  parser,
	}
	// We currently don't have any test that converts, we can take
	// care of that later.
	for i, ops := range tc.Ops {
		err := ops.run(&state)
		if err != nil {
			return fmt.Errorf("failed operation %d: %v", i, err)
		}
	}

	// If LastObject was specified, compare it with LiveState
	if tc.Object != typed.YAMLObject("") {
		comparison, err := state.CompareLive(tc.Object)
		if err != nil {
			return fmt.Errorf("failed to compare live with config: %v", err)
		}
		if !comparison.IsSame() {
			return fmt.Errorf("expected live and config to be the same:\n%v", comparison)
		}
	}

	if tc.Managed != nil {
		if diff := state.Managers.Difference(tc.Managed); len(diff) != 0 {
			return fmt.Errorf("expected Managers to be %v, got %v", tc.Managed, state.Managers)
		}
	}

	// Fail if any empty sets are present in the managers
	for manager, set := range state.Managers {
		if set.Empty() {
			return fmt.Errorf("expected Managers to have no empty sets, but found one managed by %v", manager)
		}
	}

	return nil
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

namespace DotNetNuke.Web.Mvc.Helpers
{
    using System.Web.Mvc;
    using System.Web.Routing;

    public class DnnHtmlHelper<TModel> : DnnHtmlHelper
    {
        public DnnHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
            : this(viewContext, viewDataContainer, RouteTable.Routes)
        {
        }

        public DnnHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
            : base(new HtmlHelper<TModel>(viewContext, viewDataContainer, routeCollection))
        {
        }

        public new object ViewBag => this.HtmlHelper.ViewBag;

        public new ViewDataDictionary<TModel> ViewData => this.HtmlHelper.ViewData;

        internal new HtmlHelper<TModel> HtmlHelper => (HtmlHelper<TModel>)base.HtmlHelper;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\widgets\Pjax;
use yii\web\JsExpression;
/* @var $this \yii\web\View */
/* @var $user \common\models\LoginForm */
/* @var $title string */
$opciones_objetivos='';
foreach($objetivos as $objetivo){
    $opciones_objetivos=$opciones_objetivos.'<option value='.$objetivo->id.'>'.$objetivo->descripcion.'</option>';
}
?>

		Objetivo especifico
		Actividad
		Recursos
		¿Como conseguirlo?
		Presupuesto
		<?= ($disabled=='')?'	':'' ?>

		<?php if($planespresupuestales){?>
		    <?php $plan=0; ?>
		    <?php foreach($planespresupuestales as $planpresupuestal){?>
			<tr id='plan_presupuestal_<?= $plan ?>'>

				<div class="form-group field-proyecto-plan_presupuestal_objetivo_<?= $plan ?> required" style="margin-top: 0px">
				    <select id="proyecto-plan_presupuestal_objetivo_<?= $plan ?>" class="form-control" name="Proyecto[planes_presupuestales_objetivos][]" onchange="actividad($(this).val(),<?= $plan ?>)" <?= $disabled ?>>
					<option value>seleccionar</option>
					<?php foreach($objetivos as $objetivo){  ?>
					    <option value='<?= $objetivo->id ?>' <?= ($objetivo->id==$planpresupuestal->objetivo_especifico_id)?'selected':'' ?>><?= $objetivo->descripcion ?></option>
					<?php }  ?>
				    </select>

				<div class="form-group field-proyecto-plan_presupuestal_actividad_<?= $plan ?> required" style="margin-top: 0px">
				    <select id="proyecto-plan_presupuestal_actividad_<?= $plan ?>" class="form-control" name="Proyecto[planes_presupuestales_actividades][]" <?= $disabled ?>>
					<option value>seleccionar</option>
					<?php foreach($actividades as $actividad){  ?>
					    <option value='<?= $actividad->id ?>' <?= ($actividad->id==$planpresupuestal->actividad_id)?'selected':'' ?> ><?= $actividad->descripcion ?> </option>
					<?php } ?>
				    </select>

				<div class="form-group field-proyecto-plan_presupuestal_recurso_<?= $plan ?> required" style="margin-top: 0px">
				    <select id="proyecto-plan_presupuestal_recurso_<?= $plan ?>" class="form-control" name="Proyecto[planes_presupuestales_recursos][]" <?= $disabled ?>>
					<option value>seleccionar</option>
					<option value=1 <?= ($planpresupuestal->recurso == 1) ? 'selected' : ''; ?> >Material</option>
					<option value=2 <?= ($planpresupuestal->recurso == 2) ? 'selected' : ''; ?>>Humano</option>
				    </select>

				<div class="form-group field-proyecto-plan_presupuestal_como_conseguirlo_<?= $plan ?> required" style="margin-top: 0px">
				    <select onchange="ComoConseguirlo($(this).val(),<?= $plan ?>)" id="proyecto-plan_presupuestal_como_conseguirlo_<?= $plan ?>" class="form-control" name="Proyecto[planes_presupuestales_comos_conseguirlos][]" <?= $disabled ?>>
					<option value>seleccionar</option>
					<option value=1 <?= ($planpresupuestal->como_conseguirlo == 1) ? 'selected' : ''; ?>>Pedir</option>
					<option value=2 <?= ($planpresupuestal->como_conseguirlo == 2) ? 'selected' : ''; ?>>Crear</option>
					<option value=3 <?= ($planpresupuestal->como_conseguirlo == 3) ? 'selected' : ''; ?>>Comprar</option>
				    </select>

				<div class="form-group field-proyecto-plan_presupuestal_precio_unitario_<?= $plan ?> required" style="margin-top: 0px">
				    <input id="proyecto-plan_presupuestal_precio_unitario_<?= $plan ?>" onfocusout="Subtotal1(<?= $plan ?>,1)" class="form-control numerico" name="Proyecto[planes_presupuestales_precios_unitarios][]" placeholder="Precio unitario" value="<?= ($planpresupuestal->precio_unitario==0)?'':$planpresupuestal->precio_unitario ?>" <?= ($planpresupuestal->como_conseguirlo == 1 || $planpresupuestal->como_conseguirlo == 2) ? 'disabled' : ''; ?>  <?= $disabled ?>/>
				    <?php  if($planpresupuestal->como_conseguirlo == 1 || $planpresupuestal->como_conseguirlo == 2) {?>
					<input type="hidden"  class="form-control numerico" name="Proyecto[planes_presupuestales_precios_unitarios][]" placeholder="Precio unitario" value="0"   />
				    <?php } ?>

				<div class="form-group field-proyecto-plan_presupuestal_cantidad_<?= $plan ?> required" style="margin-top: 0px">
				    <input id="proyecto-plan_presupuestal_cantidad_<?= $plan ?>" onfocusout="Subtotal2(<?= $plan ?>,2)" class="form-control numerico" name="Proyecto[planes_presupuestales_cantidades][]" placeholder="Cantidad" value="<?= $planpresupuestal->cantidad ?>" <?= $disabled ?>/>

				<div class="form-group field-proyecto-plan_presupuestal_subtotal_<?= $plan ?> required" style="margin-top: 0px">
				    <input id="proyecto-plan_presupuestal_subtotal1_<?= $plan ?>" class="form-control numerico" name="Proyecto[planes_presupuestales_subtotales1][]" placeholder="Subtotal" value="<?= $planpresupuestal->subtotal ?>" disabled />
				    <input type="hidden" id="proyecto-plan_presupuestal_subtotal_<?= $plan ?>" class="form-control numerico" name="Proyecto[planes_presupuestales_subtotales][]" placeholder="Subtotal" value="<?= $planpresupuestal->subtotal ?>" />

			    <?php if($disabled==''){?>

				    <input class="id" type="hidden" name="Proyecto[planes_presupuestal_ids][]" value="<?= $planpresupuestal->id ?>" />

			    <?php } ?>

			<?php $plan++; ?>
		    <?php } ?>
		<?php } else {?>

				    <select id="proyecto-plan_presupuestal_objetivo_0" class="form-control" name="Proyecto[planes_presupuestales_objetivos][]" onchange="actividad($(this).val(),0)" <?= $disabled ?>>
					<option value>seleccionar</option>
					<?= $opciones_objetivos ?>
				    </select>

				    <select id="proyecto-plan_presupuestal_actividad_0" class="form-control" name="Proyecto[planes_presupuestales_actividades][]" <?= $disabled ?>>
					<option value>seleccionar</option>
				    </select>

				    <select id="proyecto-plan_presupuestal_recurso_0" class="form-control" name="Proyecto[planes_presupuestales_recursos][]" <?= $disabled ?>>
					<option value>seleccionar</option>
					<option value=1>Material</option>
					<option value=2>Humano</option>
				    </select>

				    <select onchange="ComoConseguirlo($(this).val(),0)" id="proyecto-plan_presupuestal_como_conseguirlo_0" class="form-control" name="Proyecto[planes_presupuestales_comos_conseguirlos][]" <?= $disabled ?>>
					<option value>seleccionar</option>
					<option value=1>Pedir</option>
					<option value=2>Crear</option>
					<option value=3>Comprar</option>
				    </select>

				    <input id="proyecto-plan_presupuestal_precio_unitario_0" onfocusout="Subtotal1(0,1)" class="form-control numerico" name="Proyecto[planes_presupuestales_precios_unitarios][]" placeholder="Precio unitario" <?= $disabled ?>/>
				    <input type="hidden" id="proyecto-plan_presupuestal_precio_unitario1_0"  class="form-control numerico" name="Proyecto[planes_presupuestales_precios_unitarios][]" />

				    <input id="proyecto-plan_presupuestal_cantidad_0" onfocusout="Subtotal2(0,2)" class="form-control numerico" name="Proyecto[planes_presupuestales_cantidades][]" placeholder="Cantidad" <?= $disabled ?>/>

				    <input id="proyecto-plan_presupuestal_subtotal1_0" class="form-control numerico" name="Proyecto[planes_presupuestales_subtotales1][]" placeholder="Subtotal" disabled/>
				    <input type="hidden" id="proyecto-plan_presupuestal_subtotal_0" class="form-control numerico" name="Proyecto[planes_presupuestales_subtotales][]" placeholder="Subtotal"  />

			    <?php if($disabled==''){?>

			    <?php } ?>

		<?php $plan=1; ?>
		<?php } ?>
		<tr id='plan_presupuestal_<?= $plan ?>'>

	<?php if($disabled==''){?>

Agregar

	<?php } ?>

<?php
    $eliminarplanpresupuestal= Yii::$app->getUrlManager()->createUrl('actividad/eliminarplanpresupuestal');
?>


text:
/**
 * Controller for performing signup a new user */
(function () {
    'use strict';

    angular
        .module('devops-dashboard')
        .controller('SignupController', SignupController);

    SignupController.$inject = ['$scope','signupData', '$location', '$cookies'];
    function SignupController($scope, signupData, $location, $cookies) {
        var signup = this;

        // public variables
        signup.id = '';
        signup.passwd='';
        signup.templateUrl = "app/dashboard/views/navheader.html";
        signup.userCreated = false;
        $scope.alerts = [];

        $scope.closeAlert = function(index) {
            $scope.alerts.splice(index, 1);
            if (signup.userCreated) {
                $location.path("/");
            }
        };

      //public methods
      signup.doSignup=doSignup;
        signup.doReset = doReset;

        function doSignup(valid)
      {
          console.log("Submit was pressed and form was" + valid);
          if (valid) {
              signupData.signup(document.suf.myusername.value, document.suf.mypassword.value).then(processResponse);
          }
          else {
              $scope.alerts.splice(0, $scope.alerts.length);
              $scope.alerts.push({type: 'info', msg: "Please fill all the form fields correctly"});
          }
      }

        function doReset() {
            signup.id = '';
            signup.password = '';
            signup.passwordConfirm = '';
        }

      function processResponse(data) {
          console.log(data);
          if (data == 'User already Exist') {
              $scope.alerts.splice(0, $scope.alerts.length);

              $scope.alerts.push({type: 'danger', msg: data});
          }
          else {
              $scope.alerts.splice(0, $scope.alerts.length);
              $scope.alerts.push({type: 'success', msg: data});
              signup.userCreated = true;

          }

      }

    }
})();


text: <childCustomWorkspace>lorem</childCustomWorkspace>


text:
package scouter.client.stack.data;

import java.io.Serializable;

public abstract class AbstractInfo implements Serializable {
    /**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private String name;

    /**
     * get the name of the node.
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * set the name of the node.
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }
}


text: open -a Xcode ios/RNBackgroundGeolocationSample.xcworkspace


text:
using OSIsoft.AF.Asset;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMultWebService
{
    public class PIValuesList : List<PIValues>
    {
        public PIValuesList()
        {

        }

        public PIValuesList(IEnumerable<AFValues> valuesList)
        {
            foreach (AFValues values in valuesList)
            {
                PIValues vals = ConvertToPIValues(values);
                this.Add(vals);
            }
        }

        public PIValuesList(dynamic valuesList)
        {
            foreach (dynamic values in valuesList.Items)
            {
                PIValues vals = ConvertToPIValues(values);
                this.Add(vals);
            }
        }

        private PIValues ConvertToPIValues(dynamic values)
        {
            PIValues piValues = new PIValues();
            foreach (var value in values.Items)
            {
                try
                {
                    double dValue = Convert.ToDouble(value.Value);
                    DateTime dt = Convert.ToDateTime(value.Timestamp);
                    piValues.Add(new PIValue(dValue, dt));
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                }

            }
            piValues.Name = values.Name;
            return piValues;
        }

        private PIValues ConvertToPIValues(AFValues values)
        {
            PIValues piValues = new PIValues();
            foreach (var value in values)
            {
                try
                {
                    double dValue = value.ValueAsDouble();
                    piValues.Add(new PIValue(dValue, value.Timestamp.LocalTime));
                }
                catch (Exception ex)
                {

                }

            }
            piValues.Name = values.PIPoint.Name;
            return piValues;
        }
    }
}


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>BUYAddress Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1333)">

				Mobile Buy SDK

				Shopify

Index

Hierarchy

							On This Page

							<select id="jump-to">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<optgroup label="Properties">

		<option value="//api/name/address1">address1</option>

		<option value="//api/name/address2">address2</option>

		<option value="//api/name/city">city</option>

		<option value="//api/name/company">company</option>

		<option value="//api/name/country">country</option>

		<option value="//api/name/countryCode">countryCode</option>

		<option value="//api/name/firstName">firstName</option>

		<option value="//api/name/lastName">lastName</option>

		<option value="//api/name/phone">phone</option>

		<option value="//api/name/province">province</option>

		<option value="//api/name/provinceCode">provinceCode</option>

		<option value="//api/name/zip">zip</option>

	</optgroup>

	<optgroup label="Class Methods">

		<option value="//api/name/buy_addressFromContact:">+ buy_addressFromContact:</option>

		<option value="//api/name/buy_addressFromRecord:">+ buy_addressFromRecord:</option>

	</optgroup>

</select>

BUYAddress Class Reference

	Inherits from
	BUYObject : NSObject

	Conforms to
	BUYSerializable

	Declared in
	BUYAddress.h

Overview

A BUYAddress represents a shipping or billing address on an order. This will be associated with the customer upon completion.

Other Methods

  address1

The street address of the address.

@property (nonatomic, copy) NSString *address1

Declared In

BUYAddress.h

  address2

An optional additional field for the street address of the address.

@property (nonatomic, copy) NSString *address2

Declared In

BUYAddress.h

  city

The city of the address.

@property (nonatomic, copy) NSString *city

Declared In

BUYAddress.h

  company

The company of the person associated with the address (optional).

@property (nonatomic, copy) NSString *company

Declared In

BUYAddress.h

  firstName

The first name of the person associated with the payment method.

@property (nonatomic, copy) NSString *firstName

Declared In

BUYAddress.h

  lastName

The last name of the person associated with the payment method.

@property (nonatomic, copy) NSString *lastName

Declared In

BUYAddress.h

  phone

The phone number at the address.

@property (nonatomic, copy) NSString *phone

Declared In

BUYAddress.h

  country

The name of the country of the address.

@property (nonatomic, copy) NSString *country

Declared In

BUYAddress.h

  countryCode

The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country of the address.

@property (nonatomic, copy) NSString *countryCode

Declared In

BUYAddress.h

  province

The name of the state or province of the address

@property (nonatomic, copy) NSString *province

Declared In

BUYAddress.h

  provinceCode

The two-letter abbreviation of the state or province of the address.

@property (nonatomic, copy) NSString *provinceCode

Declared In

BUYAddress.h

  zip

The zip or postal code of the address.

@property (nonatomic, copy) NSString *zip

Declared In

BUYAddress.h

ApplePay Methods

+ buy_addressFromRecord:

Creates a BUYAddress from an ABRecordRef

+ (nonnull BUYAddress *)buy_addressFromRecord:(nullable ABRecordRef)record

Parameters

						record

ABRecordRef to create a BUYAddress from

Return Value

The BUYAddress created from an ABRecordRef

Declared In

BUYApplePayAdditions.h

+ buy_addressFromContact:

Creates a BUYAddress from a PKContact

+ (nonnull BUYAddress *)buy_addressFromContact:(nullable PKContact *)contact

Parameters

						contact

PKContact to create a BUYAddress from

Return Value

The BUYAddress created from a PKContact

Declared In

BUYApplePayAdditions.h

Copyright © 2015 Shopify. All rights reserved. Updated: 2015-12-15

Generated by appledoc 2.2.1 (build 1333).


text:
layout: data_model
title: InformationSourceTypeVocab-1.0
this_version: 1.1.1
---

  Heads up! These docs are for STIX 1.1.1, which is not the latest version (1.2). View the latest!

InformationSourceTypeVocab-1.0CybOX Vocabularies Schema

The InformationSourceTypeVocab is the default CybOX vocabulary for information source types, used in the MeasureSourceType/Information_Source_Type element in CybOX Common.

      <form id="nav-version">
        <select>

            <option value="1.2" >STIX 1.2</option>

            <option value="1.1.1" selected="selected">STIX 1.1.1</option>

            <option value="1.1" >STIX 1.1</option>

            <option value="1.0.1" >STIX 1.0.1</option>

            <option value="1.0" >STIX 1.0</option>

        </select>
      </form>

Vocabulary Items

      Item
      Description

      Comm Logs
      The Comm Logs value specifies a cyber observation coming from communications logs.

      Application Logs
      The Application Logs value specifies a cyber observation coming from application logs.

      Web Logs
      The Web Logs value specifies a cyber observation coming from web logs.

      DBMS Log
      The DBMS Log value specifies a cyber observation coming from the Database Management System log.

      OS/Device Driver APIs
      The OS/Device Driver APIs value specifies a cyber observation coming from OS/Device Driver APIs.

      Frameworks
      The Frameworks value specifies a cyber observation coming from Frameworks.

      VM Hypervisor
      The VM Hypervisor value specifies a cyber observation coming from the VM hypervisor data.

      TPM
      The TPM value specifies a cyber observation made using TPM output data.

      Application Framework
      The Application Framework value specifies a cyber observation coming from an application framework.

      Help Desk
      The Help Desk value specifies a cyber observation coming from an human or automated help desk.

      Incident Management
      The Incident Management value specifies a cyber observation made using information provided by Incident Management services.

      IAVM
      The IAVM value specifies a cyber observation made using information provided by Information Assurance Vulnerability Management mechanisms.

Fields

      Field Name
      Type
      Description

      @conditionoptional

          ConditionTypeEnum

This field is optional and defines the relevant condition to apply to the value.

      @is_case_sensitiveoptional

          boolean

The is_case_sensitive field is optional and should be used when specifying the case-sensitivity of a pattern which uses an Equals, DoesNotEqual, Contains, DoesNotContain, StartsWith, EndsWith, or FitsPattern condition. The default value for this field is "true" which indicates that pattern evaluations are to be considered case-sensitive.

      @apply_conditionoptional

          ConditionApplicationEnum

This field indicates how a condition should be applied when the field body contains a list of values. (Its value is moot if the field value contains only a single value - both possible values for this field would have the same behavior.) If this field is set to ANY, then a pattern is considered to be matched if the provided condition successfully evaluates for any of the values in the field body. If the field is set to ALL, then the patern only matches if the provided condition successfully evaluates for every value in the field body.

      @delimiteroptional

          string

The delimiter field specifies the delimiter used when defining lists of values. The default value is "##comma##".

      @bit_maskoptional

          hexBinary

Used to specify a bit_mask in conjunction with one of the defined binary conditions (bitwiseAnd, bitwiseOr, and bitwiseXor). This bitmask is then uses as one operand in the indicated bitwise computation.

      @pattern_typeoptional

          PatternTypeEnum

This field is optional and defines the type of pattern used if one is specified for the field value. This is applicable only if the Condition field is set to 'FitsPattern'.

      @regex_syntaxoptional

          string

This field is optional and defines the syntax format used for a regular expression, if one is specified for the field value. This is applicable only if the Condition field is set to 'FitsPattern'.

Setting this attribute with an empty value (e.g., "") or omitting it entirely notifies CybOX consumers and pattern evaluators that the corresponding regular expression utilizes capabilities, character classes, escapes, and other lexical tokens defined by the CybOX Language Specification.

Setting this attribute with a non-empty value notifies CybOX consumers and pattern evaluators that the corresponding regular expression utilizes capabilities not defined by the CybOX Language Specification. The regular expression must be evaluated through a compatible regular expression engine in this case.

      @has_changedoptional

          boolean

This field is optional and conveys a targeted observation pattern of whether the associated field value has changed. This field would be leveraged within a pattern observable triggering on whether the value of a single field value has changed.

      @trendoptional

          boolean

This field is optional and conveys a targeted observation pattern of the nature of any trend in the associated field value. This field would be leveraged within a pattern observable triggering on the matching of a specified trend in the value of a single specified field.

      @vocab_nameoptional

          string

The vocab_name field specifies the name of the controlled vocabulary.

      @vocab_referenceoptional

          anyURI

The vocab_reference field specifies the URI to the location of where the controlled vocabulary is defined, e.g., in an externally located XML schema file.


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;

namespace Microsoft.Azure.Commands.ActiveDirectory
{
    /// <summary>
    /// Get AD groups members.
    /// </summary>
    [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ADGroupMember", DefaultParameterSetName = ParameterSet.ObjectId, SupportsPaging = true), OutputType(typeof(PSADObject))]
    public class GetAzureADGroupMemberCommand : ActiveDirectoryBaseCmdlet
    {
        [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, HelpMessage = "Object Id of the group.")]
        [ValidateNotNullOrEmpty]
        [Alias("Id", "ObjectId")]
        public Guid GroupObjectId { get; set; }

        [Parameter(Mandatory = true, ParameterSetName = ParameterSet.DisplayName, HelpMessage = "The display name of the group.")]
        [ValidateNotNullOrEmpty]
        public string GroupDisplayName { get; set; }

        [Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = ParameterSet.GroupObject, HelpMessage = "The group object.")]
        [ValidateNotNullOrEmpty]
        public PSADGroup GroupObject { get; set; }

        public override void ExecuteCmdlet()
        {
            ExecutionBlock(() =>
            {
                if (this.IsParameterBound(c => c.GroupObject))
                {
                    GroupObjectId = GroupObject.Id;
                }
                else if (this.IsParameterBound(c => c.GroupDisplayName))
                {
                    var targetGroup = ActiveDirectoryClient.GetGroupByDisplayName(GroupDisplayName);
                    GroupObjectId = targetGroup.Id;
                }

                ADObjectFilterOptions options = new ADObjectFilterOptions
                {
                    Id = GroupObjectId == Guid.Empty ? null : GroupObjectId.ToString(),
                    Paging = true
                };

                PSADObject group = ActiveDirectoryClient.FilterGroups(options).FirstOrDefault();
                if (group == null)
                {
                    throw new KeyNotFoundException(string.Format(ProjectResources.GroupDoesntExist, GroupObjectId));
                }

                ulong first = MyInvocation.BoundParameters.ContainsKey("First") ? this.PagingParameters.First : ulong.MaxValue;
                ulong skip = MyInvocation.BoundParameters.ContainsKey("Skip") ? this.PagingParameters.Skip : 0;
                WriteObject(ActiveDirectoryClient.GetGroupMembers(options, first, skip), true);
            });
        }
    }
}


text:
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace XboxMediaRemote.App.Views
{
    public class ViewBase : Page, IView
    {
        public void GoToState(string stateName, bool useTransitions = true)
        {
            VisualStateManager.GoToState(this, stateName, useTransitions);
        }
    }
}


text:
<?php

namespace Drupal\paragraphs\Tests\Classic;

use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Entity\Entity\EntityFormDisplay;
use Drupal\Core\Language\LanguageInterface;
use Drupal\paragraphs\Entity\Paragraph;
use Drupal\node\Entity\Node;

/**
 * Tests the configuration of paragraphs.
 *
 * @group paragraphs
 */
class ParagraphsTranslationTest extends ParagraphsTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = array(
    'paragraphs_demo',
    'content_translation',
    'link',
  );

  /**
   * A user with admin permissions.
   *
   * @var array
   */
  protected $admin_user;

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->loginAsAdmin([
      'administer site configuration',
      'create paragraphed_content_demo content',
      'edit any paragraphed_content_demo content',
      'delete any paragraphed_content_demo content',
      'administer content translation',
      'translate any entity',
      'create content translations',
      'administer languages',
    ]);
    $edit = [
      'settings[paragraph][nested_paragraph][translatable]' => TRUE,
      'settings[paragraph][nested_paragraph][settings][language][language_alterable]' => TRUE,
      'settings[paragraph][images][fields][field_images_demo]' => TRUE,
    ];
    $this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save configuration'));
  }

  /**
   * Tests the paragraph translation.
   */
  public function testParagraphTranslation() {
    $this->drupalGet('admin/config/regional/content-language');

    // Check the settings are saved correctly.
    $this->assertFieldChecked('edit-entity-types-paragraph');
    $this->assertFieldChecked('edit-settings-node-paragraphed-content-demo-translatable');
    $this->assertFieldChecked('edit-settings-paragraph-text-image-translatable');
    $this->assertFieldChecked('edit-settings-paragraph-images-columns-field-images-demo-alt');
    $this->assertFieldChecked('edit-settings-paragraph-images-columns-field-images-demo-title');

    // Set the form display to classic.
    $form_display = EntityFormDisplay::load('node.paragraphed_content_demo.default')
      ->setComponent('field_paragraphs_demo', ['type' => 'entity_reference_paragraphs']);
    $form_display->save();

    // Check if the publish/unpublish option works.
    $this->drupalGet('admin/structure/paragraphs_type/text_image/form-display');
    $edit = array(
      'fields[status][type]' => 'boolean_checkbox',
      'fields[status][region]' => 'content',
    );

    $this->drupalPostForm(NULL, $edit, t('Save'));
    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->drupalPostForm(NULL, NULL, t('Add Text + Image'));
    $this->assertRaw('edit-field-paragraphs-demo-0-subform-status-value');
    $edit = [
      'title[0][value]' => 'example_publish_unpublish',
      'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'Example published and unpublished',
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and publish'));
    $this->assertText(t('Example published and unpublished'));
    $this->clickLink(t('Edit'));

    $this->drupalPostAjaxForm(NULL, NULL, 'field_paragraphs_demo_nested_paragraph_add_more');
    $this->drupalPostAjaxForm(NULL, NULL, 'field_paragraphs_demo_1_subform_field_paragraphs_demo_text_add_more');
    $edit = [
      'field_paragraphs_demo[0][subform][status][value]' => FALSE,
      'field_paragraphs_demo[1][subform][field_paragraphs_demo][0][subform][field_text_demo][0][value]' => 'Dummy text'
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
    $this->assertNoText(t('Example published and unpublished'));

    // Check the parent fields are set properly. Get the node.
    $node = $this->drupalGetNodeByTitle('example_publish_unpublish');
    // Loop over the paragraphs of the node.
    foreach ($node->field_paragraphs_demo->referencedEntities() as $paragraph) {
      $node_paragraph = Paragraph::load($paragraph->id())->toArray();
      // Check if the fields are set properly.
      $this->assertEqual($node_paragraph['parent_id'][0]['value'], $node->id());
      $this->assertEqual($node_paragraph['parent_type'][0]['value'], 'node');
      $this->assertEqual($node_paragraph['parent_field_name'][0]['value'], 'field_paragraphs_demo');
      // If the paragraph is nested type load the child.
      if ($node_paragraph['type'][0]['target_id'] == 'nested_paragraph') {
        $nested_paragraph = Paragraph::load($node_paragraph['field_paragraphs_demo'][0]['target_id'])->toArray();
        // Check if the fields are properly set.
        $this->assertEqual($nested_paragraph['parent_id'][0]['value'], $paragraph->id());
        $this->assertEqual($nested_paragraph['parent_type'][0]['value'], 'paragraph');
        $this->assertEqual($nested_paragraph['parent_field_name'][0]['value'], 'field_paragraphs_demo');
      }
    }

    // Add paragraphed content.
    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->drupalPostForm(NULL, NULL, t('Add Text + Image'));
    $edit = array(
      'title[0][value]' => 'Title in english',
      'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'Text in english',
    );
    // The button to remove a paragraph is present.
    $this->assertRaw(t('Remove'));
    $this->drupalPostForm(NULL, $edit, t('Save and publish'));
    $node = $this->drupalGetNodeByTitle('Title in english');
    // The text is present when editing again.
    $this->clickLink(t('Edit'));
    $this->assertText('Title in english');
    $this->assertText('Text in english');

    // Add french translation.
    $this->clickLink(t('Translate'));
    $this->clickLink(t('Add'), 1);
    // Make sure the Add / Remove paragraph buttons are hidden.
    $this->assertNoRaw(t('Remove'));
    $this->assertNoRaw(t('Add Text + Image'));
    // Make sure that the original paragraph text is displayed.
    $this->assertText('Text in english');

    $edit = array(
      'title[0][value]' => 'Title in french',
      'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'Text in french',
      'revision' => TRUE,
      'revision_log[0][value]' => 'french 1',
    );
    $this->drupalPostForm(NULL, $edit, t('Save and keep published (this translation)'));
    $this->assertText('Paragraphed article Title in french has been updated.');

    // Check the english translation.
    $this->drupalGet('node/' . $node->id());
    $this->assertText('Title in english');
    $this->assertText('Text in english');
    $this->assertNoText('Title in french');
    $this->assertNoText('Text in french');

    // Check the french translation.
    $this->drupalGet('fr/node/' . $node->id());
    $this->assertText('Title in french');
    $this->assertText('Text in french');
    $this->assertNoText('Title in english');
    // The translation is still present when editing again.
    $this->clickLink(t('Edit'));
    $this->assertText('Title in french');
    $this->assertText('Text in french');
    $edit = array(
      'title[0][value]' => 'Title Change in french',
      'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'New text in french',
      'revision' => TRUE,
      'revision_log[0][value]' => 'french 2',
    );
    $this->drupalPostForm(NULL, $edit, t('Save and keep published (this translation)'));
    $this->assertText('Title Change in french');
    $this->assertText('New text in french');

    // Back to the source language.
    $this->drupalGet('node/' . $node->id());
    $this->clickLink(t('Edit'));
    $this->assertText('Title in english');
    $this->assertText('Text in english');
    // Save the original content on second request.
    $this->drupalPostForm(NULL, NULL, t('Save and keep published (this translation)'));
    $this->assertText('Paragraphed article Title in english has been updated.');

    // Test if reverting to old paragraphs revisions works, make sure that
    // the reverted node can be saved again.
    $this->drupalGet('fr/node/' . $node->id() . '/revisions');
    $this->clickLink(t('Revert'));
    $this->drupalPostForm(NULL, ['revert_untranslated_fields' => TRUE], t('Revert'));
    $this->clickLink(t('Edit'));
    $this->assertRaw('Title in french');
    $this->assertText('Text in french');
    $this->drupalPostForm(NULL, [], t('Save and keep published (this translation)'));
    $this->assertNoRaw('The content has either been modified by another user, or you have already submitted modifications');
    $this->assertText('Text in french');

    //Add paragraphed content with untranslatable language
    $this->drupalGet('node/add/paragraphed_content_demo');
    $edit = array('langcode[0][value]' => LanguageInterface::LANGCODE_NOT_SPECIFIED);
    $this->drupalPostForm(NULL, $edit, t('Add Text + Image'));
    $this->assertResponse(200);

    // Make 'Images' paragraph field translatable, enable alt and title fields.
    $this->drupalGet('admin/structure/paragraphs_type/images/fields');
    $this->clickLink('Edit');
    $edit = [
      'translatable' => 1,
      'settings[alt_field]' => 1,
      'settings[title_field]' => 1,
    ];
    $this->drupalPostForm(NULL, $edit, t('Save settings'));

    // Create a node with an image paragraph, its alt and title text.
    $text = 'Trust me I\'m an image';
    file_put_contents('temporary://Image.jpg', $text);
    $file_path = $this->container->get('file_system')->realpath('temporary://Image.jpg');
    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->drupalPostForm(NULL, [], t('Add Images'));
    $this->drupalPostForm(NULL, ['files[field_paragraphs_demo_0_subform_field_images_demo_0][]' => $file_path], t('Upload'));
    $edit = [
      'title[0][value]' => 'Title EN',
      'field_paragraphs_demo[0][subform][field_images_demo][0][alt]' => 'Image alt',
      'field_paragraphs_demo[0][subform][field_images_demo][0][title]' => 'Image title',
      'field_paragraphs_demo[0][subform][field_images_demo][0][width]' => 100,
      'field_paragraphs_demo[0][subform][field_images_demo][0][height]' => 100,
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and publish'));

    // Translate the node with the image paragraph.
    $this->clickLink('Translate');
    $this->clickLink(t('Add'), 1);
    $edit = [
      'title[0][value]' => 'Title FR',
      'field_paragraphs_demo[0][subform][field_images_demo][0][alt]' => 'Image alt FR',
      'field_paragraphs_demo[0][subform][field_images_demo][0][title]' => 'Image title FR',
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and keep published (this translation)'));
    $this->assertRaw('Title FR');

    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->drupalPostForm(NULL, [], t('Add Text'));
    $edit = [
      'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'texto',
      'title[0][value]' => 'titulo',
      'langcode[0][value]' => 'de',
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and publish'));
    $node = $this->drupalGetNodeByTitle('titulo');
    $this->assertParagraphsLangcode($node->id(), 'de');

    // Test langcode matching when Paragraphs and node have different language.
    $paragraph_1 = Paragraph::create([
      'title' => 'Paragraph',
      'type' => 'text',
      'langcode' => 'en',
      'field_text_demo' => 'english_text_1',
    ]);
    $paragraph_1->save();

    $paragraph_2 = Paragraph::create([
      'title' => 'Paragraph',
      'type' => 'text',
      'langcode' => 'en',
      'field_text_demo' => 'english_text_2',
    ]);
    $paragraph_2->save();

    $paragraph_data = $paragraph_2->toArray();
    $paragraph_data['field_text_demo'] = 'german_text_2';
    $paragraph_2->addTranslation('de', $paragraph_data);
    $paragraph_2->save();
    $translated_paragraph = $paragraph_2->getTranslation('en');

    $node = $this->createNode([
      'langcode' => 'de',
      'type' => 'paragraphed_content_demo',
      'field_paragraphs_demo' => [$paragraph_1, $translated_paragraph],
    ]);
    $this->drupalGet('node/' . $node->id() . '/edit');
    $this->drupalPostForm(NULL, [], t('Save and keep published'));
    $this->assertText('Paragraphed article ' . $node->label() . ' has been updated.');
    // Check that first paragraph langcode has been updated.
    $paragraph = Paragraph::load($paragraph_1->id());
    $this->assertEqual($paragraph->language()->getId(), 'de');
    $this->assertFalse($paragraph->hasTranslation('en'));
    // Check that second paragraph has two translations.
    $paragraph = Paragraph::load($paragraph_2->id());
    $this->assertTrue($paragraph->hasTranslation('de'));
    $this->assertTrue($paragraph->hasTranslation('en'));
    $this->assertRaw('german_text');

    // Create an english translation of the node.
    $edit = [
      'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'english_translation_1',
      'field_paragraphs_demo[1][subform][field_text_demo][0][value]' => 'english_translation_2',
    ];
    $this->drupalPostForm('node/' . $node->id() . '/translations/add/de/en', $edit, t('Save and keep published (this translation)'));
    // Attempt to create a french translation.
    $this->drupalGet('node/' . $node->id() . '/translations/add/de/fr');
    // Check that the german translation of the paragraphs is displayed.
    $this->assertFieldByName('field_paragraphs_demo[0][subform][field_text_demo][0][value]', 'english_text_1');
    $this->assertFieldByName('field_paragraphs_demo[1][subform][field_text_demo][0][value]', 'german_text_2');
    $this->drupalPostForm(NULL, ['source_langcode[source]' => 'en'], t('Change'));
    // Check that the english translation of the paragraphs is displayed.
    $this->assertFieldByName('field_paragraphs_demo[0][subform][field_text_demo][0][value]', 'english_translation_1');
    $this->assertFieldByName('field_paragraphs_demo[1][subform][field_text_demo][0][value]', 'english_translation_2');

    // Create a node with empty Paragraphs.
    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->drupalPostForm(NULL, [], t('Add Nested Paragraph'));
    $this->drupalPostForm(NULL, ['title[0][value]' => 'empty_node'], t('Save and publish'));
    // Attempt to translate it.
    $this->clickLink(t('Translate'));
    $this->clickLink(t('Add'));
    // Check the add button is not displayed.
    $this->assertEqual(count($this->xpath('//*[@name="field_paragraphs_demo_0_subform_field_paragraphs_demo_images_add_more"]')), 0);

    // Add a non translatable field to Text Paragraph type.
    $edit = [
      'new_storage_type' => 'text_long',
      'label' => 'untranslatable_field',
      'field_name' => 'untranslatable_field',
    ];
    $this->drupalPostForm('admin/structure/paragraphs_type/text/fields/add-field', $edit, t('Save and continue'));
    $this->drupalPostForm(NULL, [], t('Save field settings'));
    $this->drupalPostForm(NULL, [], t('Save settings'));

    // Add a non translatable reference field.
    $edit = [
      'new_storage_type' => 'field_ui:entity_reference:node',
      'label' => 'untranslatable_ref_field',
      'field_name' => 'untranslatable_ref_field',
    ];
    $this->drupalPostForm('admin/structure/paragraphs_type/text/fields/add-field', $edit, t('Save and continue'));
    $this->drupalPostForm(NULL, [], t('Save field settings'));
    $this->drupalPostForm(NULL, ['settings[handler_settings][target_bundles][paragraphed_content_demo]' => TRUE], t('Save settings'));

    // Add a non translatable link field.
    $edit = [
      'new_storage_type' => 'link',
      'label' => 'untranslatable_link_field',
      'field_name' => 'untranslatable_link_field',
    ];
    $this->drupalPostForm('admin/structure/paragraphs_type/text/fields/add-field', $edit, t('Save and continue'));
    $this->drupalPostForm(NULL, [], t('Save field settings'));
    $this->drupalPostForm(NULL, [], t('Save settings'));

    // Attempt to add a translation.
    $this->drupalGet('node/' . $node->id() . '/translations/add/de/fr');
    $this->assertText('untranslatable_field (all languages)');
    $this->assertText('untranslatable_ref_field (all languages)');
    $this->assertText('untranslatable_link_field (all languages)');
    $this->assertNoText('Text (all languages)');

    // Enable translations for the reference and link field.
    $edit = [
      'translatable' => TRUE,
    ];
    $this->drupalPostForm('admin/structure/paragraphs_type/text/fields/paragraph.text.field_untranslatable_ref_field', $edit, t('Save settings'));
    $this->drupalPostForm('admin/structure/paragraphs_type/text/fields/paragraph.text.field_untranslatable_link_field', $edit, t('Save settings'));

    // Attempt to add a translation.
    $this->drupalGet('node/' . $node->id() . '/translations/add/de/fr');
    $this->assertText('untranslatable_field (all languages)');
    $this->assertNoText('untranslatable_link_field (all languages)');
    $this->assertNoText('untranslatable_ref_field (all languages)');
    $this->assertNoText('Text (all languages)');
  }

  /**
   * Tests the paragraph buttons presence in translation multilingual workflow.
   *
   * This test covers the following test cases:
   * 1) original node langcode in EN, translate in FR, change to DE.
   * 2) original node langcode in DE, change site langcode to DE, change node
   *    langcode to EN.
   */
  public function testParagraphTranslationMultilingual() {
    // Case 1: original node langcode in EN, translate in FR, change to DE.

    // Set the form display to classic.
    $form_display = EntityFormDisplay::load('node.paragraphed_content_demo.default')
      ->setComponent('field_paragraphs_demo', ['type' => 'entity_reference_paragraphs']);
    $form_display->save();

    // Add 'Images' paragraph and check the paragraphs buttons are displayed.
    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->drupalPostForm(NULL, NULL, t('Add Images'));
    $this->assertParagraphsButtons(1);
    // Upload an image and check the paragraphs buttons are still displayed.
    $images = $this->drupalGetTestFiles('image')[0];
    $edit = [
      'title[0][value]' => 'Title in english',
      'files[field_paragraphs_demo_0_subform_field_images_demo_0][]' => $images->uri,
    ];
    $this->drupalPostForm(NULL, $edit, t('Upload'));
    $this->assertParagraphsButtons(1);
    $this->drupalPostForm(NULL, NULL, t('Save and publish'));
    $this->assertText('Title in english');
    $node = $this->drupalGetNodeByTitle('Title in english');
    // Check the paragraph langcode is 'en'.
    $this->assertParagraphsLangcode($node->id());

    // Add french translation.
    $this->clickLink(t('Translate'));
    $this->clickLink(t('Add'), 1);
    // Make sure the host entity and its paragraphs have valid source language
    // and check that the paragraphs buttons are hidden.
    $this->assertNoParagraphsButtons(1);
    $edit = [
      'title[0][value]' => 'Title in french',
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and keep published (this translation)'));
    $this->assertParagraphsLangcode($node->id(), 'en', 'fr');
    $this->assertText('Paragraphed article Title in french has been updated.');
    $this->assertText('Title in french');
    $this->assertNoText('Title in english');
    // Check the original node and the paragraph langcode is still 'en'.
    $this->assertParagraphsLangcode($node->id());

    // Edit the french translation and upload a new image.
    $this->clickLink('Edit');
    $images = $this->drupalGetTestFiles('image')[1];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_0_subform_field_images_demo_1][]' => $images->uri,
    ], t('Upload'));
    // Check editing a translation does not affect the source langcode and
    // check that the paragraphs buttons are still hidden.
    $this->assertParagraphsLangcode($node->id(), 'en', 'fr');
    $this->assertNoParagraphsButtons(1);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published (this translation)'));
    $this->assertText('Title in french');
    $this->assertNoText('Title in english');

    // Back to the original node.
    $this->drupalGet('node/' . $node->id());
    $this->assertText('Title in english');
    $this->assertNoText('Title in french');
    // Check the original node and the paragraph langcode are still 'en' and
    // check that the paragraphs buttons are still displayed.
    $this->clickLink('Edit');
    $this->assertParagraphsLangcode($node->id());
    $this->assertParagraphsButtons(1);
    // Change the node langcode to 'german', add a 'Nested Paragraph', check
    // the paragraphs langcode are still 'en' and their buttons are displayed.
    $edit = [
      'title[0][value]' => 'Title in english (de)',
      'langcode[0][value]' => 'de',
    ];
    $this->drupalPostForm(NULL, $edit, t('Add Nested Paragraph'));
    $this->assertParagraphsLangcode($node->id());
    $this->assertParagraphsButtons(2);
    // Add an 'Images' paragraph inside the nested one, check the paragraphs
    // langcode are still 'en' and the paragraphs buttons are still displayed.
    $this->drupalPostAjaxForm(NULL, NULL, 'field_paragraphs_demo_1_subform_field_paragraphs_demo_images_add_more');
    $this->assertParagraphsLangcode($node->id());
    $this->assertParagraphsButtons(2);
    // Upload a new image, check the paragraphs langcode are still 'en' and the
    // paragraphs buttons are displayed.
    $images = $this->drupalGetTestFiles('image')[2];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_1_subform_field_paragraphs_demo_0_subform_field_images_demo_0][]' => $images->uri,
    ], t('Upload'));
    $this->assertParagraphsLangcode($node->id());
    $this->assertParagraphsButtons(2);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published (this translation)'));
    $this->assertText('Title in english (de)');
    $this->assertNoText('Title in french');
    // Check the original node and the paragraphs langcode are now 'de'.
    $this->assertParagraphsLangcode($node->id(), 'de');

    // Check the french translation.
    $this->drupalGet('fr/node/' . $node->id());
    $this->assertText('Title in french');
    $this->assertNoText('Title in english (de)');
    // Check editing a translation does not affect the source langcode and
    // check that the paragraphs buttons are still hidden.
    $this->clickLink('Edit');
    $this->assertParagraphsLangcode($node->id(), 'de', 'fr');
    $this->assertNoParagraphsButtons(2);

    // Case 2: original node langcode in DE, change site langcode to DE, change
    // node langcode to EN.

    // Change the site langcode to french.
    $this->drupalPostForm('admin/config/regional/language', [
      'site_default_language' => 'fr',
    ], t('Save configuration'));

    // Check the original node and its paragraphs langcode are still 'de'
    // and the paragraphs buttons are still displayed.
    $this->drupalGet('node/' . $node->id() . '/edit');
    $this->assertParagraphsLangcode($node->id(), 'de');
    $this->assertParagraphsButtons(2);

    // Go to the french translation.
    $this->drupalGet('node/' . $node->id() . '/translations');
    $this->clickLink(t('Edit'), 1);
    // Check editing a translation does not affect the source langcode and
    // check that the paragraphs buttons are still hidden.
    $this->assertParagraphsLangcode($node->id(), 'de', 'fr');
    $this->assertNoParagraphsButtons(2);
    // Upload another image.
    $images = $this->drupalGetTestFiles('image')[3];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_1_subform_field_paragraphs_demo_0_subform_field_images_demo_1][]' => $images->uri,
    ], t('Upload'));
    // Check editing a translation does not affect the source langcode and
    // check that the paragraphs buttons are still hidden.
    $this->assertParagraphsLangcode($node->id(), 'de', 'fr');
    $this->assertNoParagraphsButtons(2);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published (this translation)'));
    // Check the paragraphs langcode are still 'de' after saving the translation.
    $this->assertParagraphsLangcode($node->id(), 'de', 'fr');
    $this->assertText('Title in french');
    $this->assertNoText('Title in english (de)');

    // Back to the original node.
    $this->drupalGet('node/' . $node->id());
    $this->assertText('Title in english (de)');
    $this->assertNoText('Title in french');
    // Check the original node and the paragraphs langcode are still 'de' and
    // check that the paragraphs buttons are still displayed.
    $this->clickLink('Edit');
    $this->assertParagraphsLangcode($node->id(), 'de');
    $this->assertParagraphsButtons(2);
    // Change the node langcode back to 'english', add an 'Images' paragraph,
    // check the paragraphs langcode are still 'de' and their buttons are shown.
    $edit = [
      'title[0][value]' => 'Title in english',
      'langcode[0][value]' => 'en',
    ];
    $this->drupalPostForm(NULL, $edit, t('Add Images'));
    $this->assertParagraphsLangcode($node->id(), 'de');
    $this->assertParagraphsButtons(3);
    // Upload a new image, check the paragraphs langcode are still 'de' and the
    // paragraphs buttons are displayed.
    $images = $this->drupalGetTestFiles('image')[4];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_2_subform_field_images_demo_0][]' => $images->uri,
    ], t('Upload'));
    $this->assertParagraphsLangcode($node->id(), 'de');
    $this->assertParagraphsButtons(3);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published (this translation)'));
    // Check the original node and the paragraphs langcode are now 'en'.
    $this->assertParagraphsLangcode($node->id());
  }

  /**
   * Tests the paragraphs buttons presence in multilingual workflow.
   *
   * This test covers the following test cases:
   * 1) original node langcode in german, change to english.
   * 2) original node langcode in english, change to german.
   * 3) original node langcode in english, change site langcode to german,
   *   change node langcode to german.
   */
  public function testParagraphsMultilingualWorkflow() {
    // Case 1: Check the paragraphs buttons after changing the NODE language
    // (original node langcode in GERMAN, default site langcode in english).

    // Set the form display to classic.
    $form_display = EntityFormDisplay::load('node.paragraphed_content_demo.default')
      ->setComponent('field_paragraphs_demo', ['type' => 'entity_reference_paragraphs']);
    $form_display->save();

    // Create a node and check that the node langcode is 'english'.
    $this->drupalGet('node/add/paragraphed_content_demo');
    $this->assertOptionSelected('edit-langcode-0-value', 'en');
    // Change the node langcode to 'german' and add a 'Nested Paragraph'.
    $edit = [
      'title[0][value]' => 'Title in german',
      'langcode[0][value]' => 'de',
    ];
    $this->drupalPostForm(NULL, $edit, t('Add Nested Paragraph'));
    // Check that the paragraphs buttons are displayed and add an 'Images'
    // paragraph inside the nested paragraph.
    $this->assertParagraphsButtons(1);
    $this->drupalPostAjaxForm(NULL, NULL, 'field_paragraphs_demo_0_subform_field_paragraphs_demo_images_add_more');
    // Upload an image and check the paragraphs buttons are still displayed.
    $images = $this->drupalGetTestFiles('image')[0];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_0_subform_field_paragraphs_demo_0_subform_field_images_demo_0][]' => $images->uri,
    ], t('Upload'));
    $this->assertParagraphsButtons(1);
    $this->drupalPostForm(NULL, NULL, t('Save and publish'));
    $this->assertText('Title in german');
    $node1 = $this->getNodeByTitle('Title in german');

    // Check the paragraph langcode is 'de' and its buttons are displayed.
    // @todo check for the nested children paragraphs buttons and langcode
    // when it's supported.
    $this->clickLink(t('Edit'));
    $this->assertParagraphsLangcode($node1->id(), 'de');
    $this->assertParagraphsButtons(1);
    // Change the node langcode to 'english' and upload another image.
    $images = $this->drupalGetTestFiles('image')[1];
    $edit = [
      'title[0][value]' => 'Title in german (en)',
      'langcode[0][value]' => 'en',
      'files[field_paragraphs_demo_0_subform_field_paragraphs_demo_0_subform_field_images_demo_1][]' => $images->uri,
    ];
    $this->drupalPostForm(NULL, $edit, t('Upload'));
    // Check the paragraph langcode is still 'de' and its buttons are shown.
    $this->assertParagraphsLangcode($node1->id(), 'de');
    $this->assertParagraphsButtons(1);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published'));
    // Check the paragraph langcode is now 'en' after saving.
    $this->assertParagraphsLangcode($node1->id());

    // Check the paragraph langcode is 'en' and its buttons are still shown.
    $this->clickLink(t('Edit'));
    $this->assertParagraphsLangcode($node1->id());
    $this->assertParagraphsButtons(1);

    // Case 2: Check the paragraphs buttons after changing the NODE language
    // (original node langcode in ENGLISH, default site langcode in english).

    // Create another node.
    $this->drupalGet('node/add/paragraphed_content_demo');
    // Check that the node langcode is 'english' and add a 'Nested Paragraph'.
    $this->assertOptionSelected('edit-langcode-0-value', 'en');
    $this->drupalPostForm(NULL, NULL, t('Add Nested Paragraph'));
    // Check that the paragraphs buttons are displayed and add an 'Images'
    // paragraph inside the nested paragraph.
    $this->assertParagraphsButtons(1);
    $this->drupalPostAjaxForm(NULL, NULL, 'field_paragraphs_demo_0_subform_field_paragraphs_demo_images_add_more');
    // Upload an image and check the paragraphs buttons are still displayed.
    $images = $this->drupalGetTestFiles('image')[0];
    $edit = [
      'title[0][value]' => 'Title in english',
      'files[field_paragraphs_demo_0_subform_field_paragraphs_demo_0_subform_field_images_demo_0][]' => $images->uri,
    ];
    $this->drupalPostForm(NULL, $edit, t('Upload'));
    $this->assertParagraphsButtons(1);
    $this->drupalPostForm(NULL, NULL, t('Save and publish'));
    $this->assertText('Title in english');
    $node2 = $this->drupalGetNodeByTitle('Title in english');

    // Check the paragraph langcode is 'en' and its buttons are displayed.
    // @todo check for the nested children paragraphs buttons and langcode
    // when it's supported.
    $this->clickLink(t('Edit'));
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(1);
    // Change the node langcode to 'german' and add another 'Images' paragraph.
    $edit = [
      'title[0][value]' => 'Title in english (de)',
      'langcode[0][value]' => 'de',
    ];
    $this->drupalPostForm(NULL, $edit, t('Add Images'));
    // Check the paragraphs langcode are still 'en' and their buttons are shown.
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(2);
    // Upload an image, check the paragraphs langcode are still 'en' and their
    // buttons are displayed.
    $images = $this->drupalGetTestFiles('image')[1];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_1_subform_field_images_demo_0][]' => $images->uri,
    ], t('Upload'));
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(2);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published'));
    // Check the paragraphs langcode are now 'de' after saving.
    $this->assertParagraphsLangcode($node2->id(), 'de');

    // Change node langcode back to 'english' and save.
    $this->clickLink(t('Edit'));
    $edit = [
      'title[0][value]' => 'Title in english',
      'langcode[0][value]' => 'en',
    ];
    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
    // Check the paragraphs langcode are now 'en' after saving.
    $this->assertParagraphsLangcode($node2->id());

    // Case 3: Check the paragraphs buttons after changing the SITE language.

    // Change the site langcode to german.
    $edit = [
      'site_default_language' => 'de',
    ];
    $this->drupalPostForm('admin/config/regional/language', $edit, t('Save configuration'));

    // Check the original node and the paragraphs langcode are still 'en' and
    // check that the paragraphs buttons are still displayed.
    $this->drupalGet('node/' . $node2->id() . '/edit');
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(2);
    // Add another 'Images' paragraph with node langcode as 'english'.
    $this->drupalPostForm(NULL, NULL, t('Add Images'));
    // Check the paragraph langcode are still 'en' and their buttons are shown.
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(3);
    // Upload an image, check the paragraphs langcode are still 'en' and their
    // buttons are displayed.
    $images = $this->drupalGetTestFiles('image')[2];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_2_subform_field_images_demo_0][]' => $images->uri,
    ], t('Upload'));
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(3);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published'));
    // Check the paragraphs langcode are still 'en' after saving.
    $this->assertParagraphsLangcode($node2->id());

    // Check the paragraphs langcode are still 'en' and their buttons are shown.
    $this->clickLink(t('Edit'));
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(3);
    // Change node langcode to 'german' and add another 'Images' paragraph.
    $edit = [
      'title[0][value]' => 'Title in english (de)',
      'langcode[0][value]' => 'de',
    ];
    $this->drupalPostForm(NULL, $edit, t('Add Images'));
    // Check the paragraphs langcode are still 'en' and their buttons are shown.
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(4);
    // Upload an image, check the paragraphs langcode are still 'en' and their
    // buttons are displayed.
    $images = $this->drupalGetTestFiles('image')[3];
    $this->drupalPostForm(NULL, [
      'files[field_paragraphs_demo_3_subform_field_images_demo_0][]' => $images->uri,
    ], t('Upload'));
    $this->assertParagraphsLangcode($node2->id());
    $this->assertParagraphsButtons(4);
    $this->drupalPostForm(NULL, NULL, t('Save and keep published'));
    // Check the paragraphs langcode are now 'de' after saving.
    $this->assertParagraphsLangcode($node2->id(), 'de');
  }

  /**
   * Passes if the paragraphs buttons are present.
   *
   * @param int $count
   *   Number of paragraphs buttons to look for.
   */
  protected function assertParagraphsButtons($count) {
    $this->assertParagraphsButtonsHelper($count, FALSE);
  }

  /**
   * Passes if the paragraphs buttons are NOT present.
   *
   * @param int $count
   *   Number of paragraphs buttons to look for.
   */
  protected function assertNoParagraphsButtons($count) {
    $this->assertParagraphsButtonsHelper($count, TRUE);
  }

  /**
   * Helper for assertParagraphsButtons and assertNoParagraphsButtons.
   *
   * @param int $count
   *   Number of paragraphs buttons to look for.
   * @param bool $hidden
   *   TRUE if these buttons should not be shown, FALSE otherwise.
   *   Defaults to TRUE.
   */
  protected function assertParagraphsButtonsHelper($count, $hidden = TRUE) {
    for ($i = 0; $i < $count; $i++) {
      $remove_button = $this->xpath('//*[@name="field_paragraphs_demo_' . $i . '_remove"]');
      if (!$hidden) {
        $this->assertNotEqual(count($remove_button), 0);
      }
      else {
        $this->assertEqual(count($remove_button), 0);
      }
    }

    // It is enough to check for the specific paragraph type 'Images' to assert
    // the add more buttons presence for this test class.
    $add_button = $this->xpath('//input[@value="Add Images"]');
    if (!$hidden) {
      $this->assertNotEqual(count($add_button), 0);
    }
    else {
      $this->assertEqual(count($add_button), 0);
    }
  }

  /**
   * Assert each paragraph items have the same langcode as the node one.
   *
   * @param string $node_id
   *   The node ID which contains the paragraph items to be checked.
   * @param string $source_lang
   *   The expected node source langcode. Defaults to 'en'.
   * @param string $trans_lang
   *   The expected translated node langcode. Defaults to NULL.
   */
  protected function assertParagraphsLangcode($node_id, $source_lang = 'en', $trans_lang = NULL) {
    // Update the outdated node and check all the paragraph items langcodes.
    \Drupal::entityTypeManager()->getStorage('node')->resetCache([$node_id]);
    /** @var \Drupal\node\NodeInterface $node */
    $node = Node::load($node_id);
    $node_langcode = $node->langcode->value;
    $this->assertEqual($node_langcode, $source_lang, 'Host langcode matches.');

    /** @var \Drupal\Core\Entity\ContentEntityBase $paragraph */
    foreach ($node->field_paragraphs_demo->referencedEntities() as $paragraph) {
      $paragraph_langcode = $paragraph->language()->getId();
      $message = new FormattableMarkup('Node langcode is "@node", paragraph item langcode is "@item".', ['@node' => $source_lang, '@item' => $paragraph_langcode]);
      $this->assertEqual($paragraph_langcode, $source_lang, $message);
    }

    // Check the translation.
    if (!empty($trans_lang)) {
      $this->assertTrue($node->hasTranslation($trans_lang), 'Translation exists.');
    }
    if ($node->hasTranslation($trans_lang)) {
      $trans_node = $node->getTranslation($trans_lang);
      $trans_node_langcode = $trans_node->language()->getId();
      $this->assertEqual($trans_node_langcode, $trans_lang, 'Translated node langcode matches.');

      // Check the paragraph item langcode matching the translated node langcode.
      foreach ($trans_node->field_paragraphs_demo->referencedEntities() as $paragraph) {
        if ($paragraph->hasTranslation($trans_lang)) {
          $trans_item = $paragraph->getTranslation($trans_lang);
          $paragraph_langcode = $trans_item->language()->getId();
          $message = new FormattableMarkup('Translated node langcode is "@node", paragraph item langcode is "@item".', ['@node' => $trans_lang, '@item' => $paragraph_langcode]);
          $this->assertEqual($paragraph_langcode, $trans_lang, $message);
        }
      }
    }
  }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/data/v1alpha/analytics_data_api.proto

namespace Google\Analytics\Data\V1alpha;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The request to generate a pivot report.
 *
 * Generated from protobuf message google.analytics.data.v1alpha.RunPivotReportRequest
 */
class RunPivotReportRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * A property whose events are tracked. Within a batch request, this entity
     * should either be unspecified or consistent with the batch-level entity.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
     */
    private $entity = null;
    /**
     * The dimensions requested. All defined dimensions must be used by one of the
     * following: dimension_expression, dimension_filter, pivots, order_bys.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
     */
    private $dimensions;
    /**
     * The metrics requested, at least one metric needs to be specified. All
     * defined metrics must be used by one of the following: metric_expression,
     * metric_filter, order_bys.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
     */
    private $metrics;
    /**
     * The filter clause of dimensions. Dimensions must be requested to be used in
     * this filter. Metrics cannot be used in this filter.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 4;
     */
    private $dimension_filter = null;
    /**
     * The filter clause of metrics. Applied at post aggregation phase, similar to
     * SQL having-clause. Metrics must be requested to be used in this filter.
     * Dimensions cannot be used in this filter.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 5;
     */
    private $metric_filter = null;
    /**
     * Describes the visual format of the report's dimensions in columns or rows.
     * The union of the fieldNames (dimension names) in all pivots must be a
     * subset of dimension names defined in Dimensions. No two pivots can share a
     * dimension. A dimension is only visible if it appears in a pivot.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Pivot pivots = 6;
     */
    private $pivots;
    /**
     * The date range to retrieve event data for the report. If multiple date
     * ranges are specified, event data from each date range is used in the
     * report. A special dimension with field name "dateRange" can be included in
     * a Pivot's field names; if included, the report compares between date
     * ranges. In a cohort request, this `dateRanges` must be unspecified.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 7;
     */
    private $date_ranges;
    /**
     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
     * If the field is empty, the report uses the entity's default currency.
     *
     * Generated from protobuf field string currency_code = 8;
     */
    private $currency_code = '';
    /**
     * Cohort group associated with this request. If there is a cohort group
     * in the request the 'cohort' dimension must be present.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 9;
     */
    private $cohort_spec = null;
    /**
     * If false or unspecified, each row with all metrics equal to 0 will not be
     * returned. If true, these rows will be returned if they are not separately
     * removed by a filter.
     *
     * Generated from protobuf field bool keep_empty_rows = 10;
     */
    private $keep_empty_rows = false;
    /**
     * Toggles whether to return the current state of this Analytics Property's
     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
     *
     * Generated from protobuf field bool return_property_quota = 11;
     */
    private $return_property_quota = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\Entity $entity
     *           A property whose events are tracked. Within a batch request, this entity
     *           should either be unspecified or consistent with the batch-level entity.
     *     @type \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $dimensions
     *           The dimensions requested. All defined dimensions must be used by one of the
     *           following: dimension_expression, dimension_filter, pivots, order_bys.
     *     @type \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
     *           The metrics requested, at least one metric needs to be specified. All
     *           defined metrics must be used by one of the following: metric_expression,
     *           metric_filter, order_bys.
     *     @type \Google\Analytics\Data\V1alpha\FilterExpression $dimension_filter
     *           The filter clause of dimensions. Dimensions must be requested to be used in
     *           this filter. Metrics cannot be used in this filter.
     *     @type \Google\Analytics\Data\V1alpha\FilterExpression $metric_filter
     *           The filter clause of metrics. Applied at post aggregation phase, similar to
     *           SQL having-clause. Metrics must be requested to be used in this filter.
     *           Dimensions cannot be used in this filter.
     *     @type \Google\Analytics\Data\V1alpha\Pivot[]|\Google\Protobuf\Internal\RepeatedField $pivots
     *           Describes the visual format of the report's dimensions in columns or rows.
     *           The union of the fieldNames (dimension names) in all pivots must be a
     *           subset of dimension names defined in Dimensions. No two pivots can share a
     *           dimension. A dimension is only visible if it appears in a pivot.
     *     @type \Google\Analytics\Data\V1alpha\DateRange[]|\Google\Protobuf\Internal\RepeatedField $date_ranges
     *           The date range to retrieve event data for the report. If multiple date
     *           ranges are specified, event data from each date range is used in the
     *           report. A special dimension with field name "dateRange" can be included in
     *           a Pivot's field names; if included, the report compares between date
     *           ranges. In a cohort request, this `dateRanges` must be unspecified.
     *     @type string $currency_code
     *           A currency code in ISO4217 format, such as "AED", "USD", "JPY".
     *           If the field is empty, the report uses the entity's default currency.
     *     @type \Google\Analytics\Data\V1alpha\CohortSpec $cohort_spec
     *           Cohort group associated with this request. If there is a cohort group
     *           in the request the 'cohort' dimension must be present.
     *     @type bool $keep_empty_rows
     *           If false or unspecified, each row with all metrics equal to 0 will not be
     *           returned. If true, these rows will be returned if they are not separately
     *           removed by a filter.
     *     @type bool $return_property_quota
     *           Toggles whether to return the current state of this Analytics Property's
     *           quota. Quota is returned in [PropertyQuota](#PropertyQuota).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
        parent::__construct($data);
    }

    /**
     * A property whose events are tracked. Within a batch request, this entity
     * should either be unspecified or consistent with the batch-level entity.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
     * @return \Google\Analytics\Data\V1alpha\Entity|null
     */
    public function getEntity()
    {
        return isset($this->entity) ? $this->entity : null;
    }

    public function hasEntity()
    {
        return isset($this->entity);
    }

    public function clearEntity()
    {
        unset($this->entity);
    }

    /**
     * A property whose events are tracked. Within a batch request, this entity
     * should either be unspecified or consistent with the batch-level entity.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.Entity entity = 1;
     * @param \Google\Analytics\Data\V1alpha\Entity $var
     * @return $this
     */
    public function setEntity($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\Entity::class);
        $this->entity = $var;

        return $this;
    }

    /**
     * The dimensions requested. All defined dimensions must be used by one of the
     * following: dimension_expression, dimension_filter, pivots, order_bys.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDimensions()
    {
        return $this->dimensions;
    }

    /**
     * The dimensions requested. All defined dimensions must be used by one of the
     * following: dimension_expression, dimension_filter, pivots, order_bys.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Dimension dimensions = 2;
     * @param \Google\Analytics\Data\V1alpha\Dimension[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDimensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Dimension::class);
        $this->dimensions = $arr;

        return $this;
    }

    /**
     * The metrics requested, at least one metric needs to be specified. All
     * defined metrics must be used by one of the following: metric_expression,
     * metric_filter, order_bys.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMetrics()
    {
        return $this->metrics;
    }

    /**
     * The metrics requested, at least one metric needs to be specified. All
     * defined metrics must be used by one of the following: metric_expression,
     * metric_filter, order_bys.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Metric metrics = 3;
     * @param \Google\Analytics\Data\V1alpha\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMetrics($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Metric::class);
        $this->metrics = $arr;

        return $this;
    }

    /**
     * The filter clause of dimensions. Dimensions must be requested to be used in
     * this filter. Metrics cannot be used in this filter.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 4;
     * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
     */
    public function getDimensionFilter()
    {
        return isset($this->dimension_filter) ? $this->dimension_filter : null;
    }

    public function hasDimensionFilter()
    {
        return isset($this->dimension_filter);
    }

    public function clearDimensionFilter()
    {
        unset($this->dimension_filter);
    }

    /**
     * The filter clause of dimensions. Dimensions must be requested to be used in
     * this filter. Metrics cannot be used in this filter.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression dimension_filter = 4;
     * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
     * @return $this
     */
    public function setDimensionFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
        $this->dimension_filter = $var;

        return $this;
    }

    /**
     * The filter clause of metrics. Applied at post aggregation phase, similar to
     * SQL having-clause. Metrics must be requested to be used in this filter.
     * Dimensions cannot be used in this filter.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 5;
     * @return \Google\Analytics\Data\V1alpha\FilterExpression|null
     */
    public function getMetricFilter()
    {
        return isset($this->metric_filter) ? $this->metric_filter : null;
    }

    public function hasMetricFilter()
    {
        return isset($this->metric_filter);
    }

    public function clearMetricFilter()
    {
        unset($this->metric_filter);
    }

    /**
     * The filter clause of metrics. Applied at post aggregation phase, similar to
     * SQL having-clause. Metrics must be requested to be used in this filter.
     * Dimensions cannot be used in this filter.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.FilterExpression metric_filter = 5;
     * @param \Google\Analytics\Data\V1alpha\FilterExpression $var
     * @return $this
     */
    public function setMetricFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FilterExpression::class);
        $this->metric_filter = $var;

        return $this;
    }

    /**
     * Describes the visual format of the report's dimensions in columns or rows.
     * The union of the fieldNames (dimension names) in all pivots must be a
     * subset of dimension names defined in Dimensions. No two pivots can share a
     * dimension. A dimension is only visible if it appears in a pivot.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Pivot pivots = 6;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPivots()
    {
        return $this->pivots;
    }

    /**
     * Describes the visual format of the report's dimensions in columns or rows.
     * The union of the fieldNames (dimension names) in all pivots must be a
     * subset of dimension names defined in Dimensions. No two pivots can share a
     * dimension. A dimension is only visible if it appears in a pivot.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.Pivot pivots = 6;
     * @param \Google\Analytics\Data\V1alpha\Pivot[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPivots($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\Pivot::class);
        $this->pivots = $arr;

        return $this;
    }

    /**
     * The date range to retrieve event data for the report. If multiple date
     * ranges are specified, event data from each date range is used in the
     * report. A special dimension with field name "dateRange" can be included in
     * a Pivot's field names; if included, the report compares between date
     * ranges. In a cohort request, this `dateRanges` must be unspecified.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 7;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDateRanges()
    {
        return $this->date_ranges;
    }

    /**
     * The date range to retrieve event data for the report. If multiple date
     * ranges are specified, event data from each date range is used in the
     * report. A special dimension with field name "dateRange" can be included in
     * a Pivot's field names; if included, the report compares between date
     * ranges. In a cohort request, this `dateRanges` must be unspecified.
     *
     * Generated from protobuf field repeated .google.analytics.data.v1alpha.DateRange date_ranges = 7;
     * @param \Google\Analytics\Data\V1alpha\DateRange[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDateRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\DateRange::class);
        $this->date_ranges = $arr;

        return $this;
    }

    /**
     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
     * If the field is empty, the report uses the entity's default currency.
     *
     * Generated from protobuf field string currency_code = 8;
     * @return string
     */
    public function getCurrencyCode()
    {
        return $this->currency_code;
    }

    /**
     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
     * If the field is empty, the report uses the entity's default currency.
     *
     * Generated from protobuf field string currency_code = 8;
     * @param string $var
     * @return $this
     */
    public function setCurrencyCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->currency_code = $var;

        return $this;
    }

    /**
     * Cohort group associated with this request. If there is a cohort group
     * in the request the 'cohort' dimension must be present.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 9;
     * @return \Google\Analytics\Data\V1alpha\CohortSpec|null
     */
    public function getCohortSpec()
    {
        return isset($this->cohort_spec) ? $this->cohort_spec : null;
    }

    public function hasCohortSpec()
    {
        return isset($this->cohort_spec);
    }

    public function clearCohortSpec()
    {
        unset($this->cohort_spec);
    }

    /**
     * Cohort group associated with this request. If there is a cohort group
     * in the request the 'cohort' dimension must be present.
     *
     * Generated from protobuf field .google.analytics.data.v1alpha.CohortSpec cohort_spec = 9;
     * @param \Google\Analytics\Data\V1alpha\CohortSpec $var
     * @return $this
     */
    public function setCohortSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\CohortSpec::class);
        $this->cohort_spec = $var;

        return $this;
    }

    /**
     * If false or unspecified, each row with all metrics equal to 0 will not be
     * returned. If true, these rows will be returned if they are not separately
     * removed by a filter.
     *
     * Generated from protobuf field bool keep_empty_rows = 10;
     * @return bool
     */
    public function getKeepEmptyRows()
    {
        return $this->keep_empty_rows;
    }

    /**
     * If false or unspecified, each row with all metrics equal to 0 will not be
     * returned. If true, these rows will be returned if they are not separately
     * removed by a filter.
     *
     * Generated from protobuf field bool keep_empty_rows = 10;
     * @param bool $var
     * @return $this
     */
    public function setKeepEmptyRows($var)
    {
        GPBUtil::checkBool($var);
        $this->keep_empty_rows = $var;

        return $this;
    }

    /**
     * Toggles whether to return the current state of this Analytics Property's
     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
     *
     * Generated from protobuf field bool return_property_quota = 11;
     * @return bool
     */
    public function getReturnPropertyQuota()
    {
        return $this->return_property_quota;
    }

    /**
     * Toggles whether to return the current state of this Analytics Property's
     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
     *
     * Generated from protobuf field bool return_property_quota = 11;
     * @param bool $var
     * @return $this
     */
    public function setReturnPropertyQuota($var)
    {
        GPBUtil::checkBool($var);
        $this->return_property_quota = $var;

        return $this;
    }

}


text:
<metadata xml:lang="en">
  <Esri>
    <CreaDate>20101229</CreaDate>
    <CreaTime>14124600</CreaTime>
    <ArcGISFormat>1.0</ArcGISFormat>
    <SyncOnce>TRUE</SyncOnce>
    <ArcGISProfile>ItemDescription</ArcGISProfile>
  </Esri>
  <tool xmlns="" name="DeleteTaskAssistantWorkbook" displayname="Delete Task Assistant Workbook" toolboxalias="WMXAdminUtils" softwarerestriction="none">

This tool can be used to remove a Task Assistant workflow from the Workflow Manager database.

    <usage>

The default Workflow Manager database must be set before running this tool.

The user running this tool must have administrative access to the Workflow Manager database.

</usage>
    <parameters>
      <param sync="true" name="in_string_taWorkbookName" displayname="Task Assistant workbook to be deleted from the Workflow Manager database" datatype="String" direction="Input" expression="in_string_taWorkbookName" type="Required">
        <dialogReference>

Takes the name of the Task Assistant workbook to be removed from the database.

The domain for this parameter is built dynamically, based on the Task Assistant workbooks present in the Workflow Manager database.

</dialogReference>
        <pythonReference>

Takes the name of the Task Assistant workbook to be removed from the database.

The domain for this parameter is built dynamically, based on the Task Assistant workbooks present in the Workflow Manager database.

</pythonReference>
      </param>
      <param sync="true" name="in_string_wmxDatabaseAlias" displayname="Workflow Manager database alias" datatype="String" direction="Input" expression="in_string_wmxDatabaseAlias" type="Optional">
        <dialogReference>

An optional parameter specifying that this tool should run on some database other than the default Workflow Manager database. If left blank, the default Workflow Manager database will be used.

</dialogReference>
        <pythonReference>

An optional parameter specifying that this tool should run on some database other than the default Workflow Manager database. If left blank, the default Workflow Manager database will be used.

</pythonReference>
      </param>
    </parameters>
  </tool>
  <dataIdInfo>
    <idAbs>

This tool can be used to remove a Task Assistant workflow from the Workflow Manager database.

</idAbs>
    <idCitation>
      <resTitle>Delete Task Assistant Workbook</resTitle>
    </idCitation>
    <searchKeys>
      <keyword>delete</keyword>
      <keyword>erase</keyword>
      <keyword>remove</keyword>
      <keyword>task</keyword>
      <keyword>assistant</keyword>
      <keyword>manager</keyword>
      <keyword>workbook</keyword>
      <keyword>workflow</keyword>
      <keyword>ta</keyword>
      <keyword>tam</keyword>
    </searchKeys>
  </dataIdInfo>
</metadata>